public static string CL1NewDTFiller(string RiseTagID, string RiseEqp, string RiseStatus, uint real) { string formid = FormID.GetFormID(); try { KMStatus status = KAGStatus.GetStatus(real); DTFiller data = new DTFiller(); data.Start_time = DateTime.Now; data.End_time = DateTime.Now.AddMinutes(0.3); data.create_time = DateTime.Now; data.Duration = 0.2; data.FormID = formid; data.PDate = DateTime.Now; data.TagID = "101001"; data.LineID = "CL1"; data.DeviceID = "Filler"; if (status.ISDown) { data.IsDown = "Y"; } else { data.IsDown = "N"; } data.Status = status.Status; data.Create_by = "DTCal"; data.RiseEqp = EqpName.GetEqpName(RiseTagID); data.RiseTagID = RiseTagID; DTFiller.CreateNew(data); } catch (Exception ex) { formid = null; Log.Error(ex.ToString()); } return(formid); }
private static void GetStatus() { DTFormStatus data = new DTFormStatus(); data.FormID = FormID; data.LineID = "CL1"; data.create_by = "DTCal"; DepackS = KAGStatus.GetStatus(RealData.dic["101101"]).Status; data.DeviceID = "DePack"; data.TagID = "101101"; data.Status = DepackS; DTFormStatus.CreateNew(data); FillerS = KAGStatus.GetStatus(RealData.dic["101001"]).Status; data.DeviceID = "CL1_Filler"; data.TagID = "101001"; data.Status = FillerS; DTFormStatus.CreateNew(data); CIPS = KAGStatus.GetStatus(RealData.dic["101201"]).Status; data.DeviceID = "CL1_CIP"; data.TagID = "101201"; data.Status = CIPS; DTFormStatus.CreateNew(data); PasteurizerS = KAGStatus.GetStatus(RealData.dic["102001"]).Status; data.DeviceID = "CL1_Pasteurizer"; data.TagID = "102001"; data.Status = PasteurizerS; DTFormStatus.CreateNew(data); Pack3S = KAGStatus.GetStatus(RealData.dic["101301"]).Status; data.DeviceID = "CL1_Pack3"; data.TagID = "101301"; data.Status = Pack3S; DTFormStatus.CreateNew(data); Pack4S = KAGStatus.GetStatus(RealData.dic["101401"]).Status; data.DeviceID = "CL1_Pack4"; data.TagID = "101401"; data.Status = Pack4S; DTFormStatus.CreateNew(data); Palletizer1S = KAGStatus.GetStatus(RealData.dic["101501"]).Status; data.DeviceID = "CL1_Palletizer1"; data.TagID = "101501"; data.Status = Palletizer1S; DTFormStatus.CreateNew(data); Palletizer2S = KAGStatus.GetStatus(RealData.dic["101601"]).Status; data.DeviceID = "CL1_Palletizer2"; data.TagID = "101601"; data.Status = Palletizer2S; DTFormStatus.CreateNew(data); WrapS = KAGStatus.GetStatus(RealData.dic["101701"]).Status; data.DeviceID = "CL1_Wrap"; data.TagID = "101701"; data.Status = WrapS; DTFormStatus.CreateNew(data); // OEM1S= KAGStatus.GetStatus(RealData.dic[""]).Status; // OEM2S= KAGStatus.GetStatus(RealData.dic[""]).Status; }