partial void DeleteC_EARLY_WARNING(C_EARLY_WARNING instance);
partial void InsertC_EARLY_WARNING(C_EARLY_WARNING instance);
partial void UpdateC_EARLY_WARNING(C_EARLY_WARNING instance);
/// <summary> /// 预警信息主表新增 /// </summary> /// <param name="UserID"></param> /// <param name="ALIAS"></param> /// <param name="PERIOD"></param> /// <param name="C_TYPE"></param> /// <param name="dbsource"></param> /// <returns></returns> public static int YjInsert(int UserID, string ALIAS, int PERIOD, string BeiZhu, int C_TYPE, string dbsource,int status) { C_EARLY_WARNING tb = new C_EARLY_WARNING(); tb.USER_ID = UserID; tb.ALIAS = ALIAS; tb.PERIOD = PERIOD; tb.BEIZHU = BeiZhu; tb.C_DATE = DateTime.Now; tb.C_TYPE = C_TYPE; tb.dbsource = dbsource; tb.Status = status; using (DataClasses1DataContext db = new DataClasses1DataContext()) { db.Log = Console.Out; db.C_EARLY_WARNING.InsertOnSubmit(tb); db.SubmitChanges(); } return tb.C_ID; }