using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; using WindowsFormsApp1.mod; using WindowsFormsApp1.mod.server; namespace WindowsFormsApp1.server { public class ApiFormResult { private ApiFormResult(bool success, mesresult mesresult, bool isShow, string msg, plcdata data,DateTime requesttime) { Success = success; Msg = msg; Data = data; Mesresult = mesresult; IsShow = isShow; Requesttime = requesttime; } public bool Success { get; set; } public string Msg { get; set; } public plcdata Data { get; set; } public mesresult Mesresult { get; set; } public bool IsShow { get; set; } public DateTime Requesttime { get; set; } public static ApiFormResult Sucess(mesresult mesresult, bool isShow, string msg, plcdata data, DateTime requesttime) { return new ApiFormResult(true, mesresult, isShow, msg, data, requesttime); } public static ApiFormResult Error(mesresult mesresult, bool isShow, string msg, plcdata data, DateTime requesttime) { return new ApiFormResult(false, mesresult, isShow, msg, data,requesttime); } } }