/// <summary> /// 馈电信息表记录入库 /// </summary> /// <param name="JCKD"></param> public static void addJCKDRecordToDB(Jc_KdInfo JCKD) { IInsertToDbService <Jc_KdInfo> kdDataTodbService = ServiceFactory.Create <IInsertToDbService <Jc_KdInfo> >(); DataToDbAddRequest <Jc_KdInfo> dataToDbAddRequest = new DataToDbAddRequest <Jc_KdInfo>(); dataToDbAddRequest.Item = JCKD; kdDataTodbService.AddItem(dataToDbAddRequest); }
/// <summary> /// 生成馈电记录结构体 /// </summary> /// <param name="BJID">报警ID</param> /// <param name="KDID">馈电ID</param> /// <param name="stime">报警开始时间</param> /// <returns></returns> private Jc_KdInfo GetNewJCKDInfo(string BJID, string KDID, DateTime stime) { Jc_KdInfo jk = new Jc_KdInfo(); jk.ID = IdHelper.CreateLongId().ToString(); jk.BJID = BJID; jk.KDID = KDID; jk.Timer = stime; jk.InfoState = InfoState.AddNew; return(jk); }