/// <summary> /// 添加系统运行日志 Sys_RunLog对象(即:一条记录) /// </summary> public int Add(Sys_RunLog sys_RunLog) { string sql = "INSERT INTO Sys_RunLog (Log_Date,Log_SQL,Log_Author,Log_Fun,Log_SQLParameter,Log_Error) VALUES (@Log_Date,@Log_SQL,@Log_Author,@Log_Fun,@Log_SQLParameter,@Log_Error)"; if (sys_RunLog.Log_Date == DateTime.MinValue) { idb.AddParameter("@Log_Date", DBNull.Value); } else { idb.AddParameter("@Log_Date", sys_RunLog.Log_Date); } if (string.IsNullOrEmpty(sys_RunLog.Log_SQL)) { idb.AddParameter("@Log_SQL", DBNull.Value); } else { idb.AddParameter("@Log_SQL", sys_RunLog.Log_SQL); } if (string.IsNullOrEmpty(sys_RunLog.Log_Author)) { idb.AddParameter("@Log_Author", DBNull.Value); } else { idb.AddParameter("@Log_Author", sys_RunLog.Log_Author); } if (string.IsNullOrEmpty(sys_RunLog.Log_Fun)) { idb.AddParameter("@Log_Fun", DBNull.Value); } else { idb.AddParameter("@Log_Fun", sys_RunLog.Log_Fun); } if (string.IsNullOrEmpty(sys_RunLog.Log_SQLParameter)) { idb.AddParameter("@Log_SQLParameter", DBNull.Value); } else { idb.AddParameter("@Log_SQLParameter", sys_RunLog.Log_SQLParameter); } if (string.IsNullOrEmpty(sys_RunLog.Log_Error)) { idb.AddParameter("@Log_Error", DBNull.Value); } else { idb.AddParameter("@Log_Error", sys_RunLog.Log_Error); } return(idb.ExeCmd(sql)); }
/// <summary> /// 添加Sys_PD_GridFormat对象(即:一条记录) /// </summary> public int Add(Sys_PD_GridFormat sys_PD_GridFormat) { string sql = "INSERT INTO Sys_PD_GridFormat (Empl_NO,ColFor_Code,ColFor_ColName,ColFor_ColOrder,ColFor_ColWidth,Stat) VALUES (@Empl_NO,@ColFor_Code,@ColFor_ColName,@ColFor_ColOrder,@ColFor_ColWidth,@Stat)"; if (string.IsNullOrEmpty(sys_PD_GridFormat.Empl_NO)) { idb.AddParameter("@Empl_NO", DBNull.Value); } else { idb.AddParameter("@Empl_NO", sys_PD_GridFormat.Empl_NO); } if (string.IsNullOrEmpty(sys_PD_GridFormat.ColFor_Code)) { idb.AddParameter("@ColFor_Code", DBNull.Value); } else { idb.AddParameter("@ColFor_Code", sys_PD_GridFormat.ColFor_Code); } if (string.IsNullOrEmpty(sys_PD_GridFormat.ColFor_ColName)) { idb.AddParameter("@ColFor_ColName", DBNull.Value); } else { idb.AddParameter("@ColFor_ColName", sys_PD_GridFormat.ColFor_ColName); } if (sys_PD_GridFormat.ColFor_ColOrder == 0) { idb.AddParameter("@ColFor_ColOrder", 0); } else { idb.AddParameter("@ColFor_ColOrder", sys_PD_GridFormat.ColFor_ColOrder); } if (string.IsNullOrEmpty(sys_PD_GridFormat.ColFor_ColWidth)) { idb.AddParameter("@ColFor_ColWidth", DBNull.Value); } else { idb.AddParameter("@ColFor_ColWidth", sys_PD_GridFormat.ColFor_ColWidth); } if (sys_PD_GridFormat.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", sys_PD_GridFormat.Stat); } return(idb.ExeCmd(sql)); }
/// <summary> /// 添加审核模板 Verify_Template对象(即:一条记录) /// </summary> public int Add(Verify_Template verify_Template) { string sql = "INSERT INTO Verify_Template (VT_Key,VT_No,VerifyNode_Code4,VerifyNode_Name3,Flag) VALUES (@VT_Key,@VT_No,@VerifyNode_Code4,@VerifyNode_Name3,@Flag)"; if (string.IsNullOrEmpty(verify_Template.VT_Key)) { idb.AddParameter("@VT_Key", DBNull.Value); } else { idb.AddParameter("@VT_Key", verify_Template.VT_Key); } if (string.IsNullOrEmpty(verify_Template.VT_No)) { idb.AddParameter("@VT_No", DBNull.Value); } else { idb.AddParameter("@VT_No", verify_Template.VT_No); } if (string.IsNullOrEmpty(verify_Template.VerifyNode_Code4)) { idb.AddParameter("@VerifyNode_Code4", DBNull.Value); } else { idb.AddParameter("@VerifyNode_Code4", verify_Template.VerifyNode_Code4); } if (string.IsNullOrEmpty(verify_Template.VerifyNode_Name3)) { idb.AddParameter("@VerifyNode_Name3", DBNull.Value); } else { idb.AddParameter("@VerifyNode_Name3", verify_Template.VerifyNode_Name3); } if (verify_Template.Flag == 0) { idb.AddParameter("@Flag", DBNull.Value); } else { idb.AddParameter("@Flag", verify_Template.Flag); } return(idb.ExeCmd(sql)); }
/// <summary> /// 添加顶部快捷方式 System_TopMenu对象(即:一条记录) /// </summary> public int Add(System_TopMenu system_TopMenu) { string sql = "INSERT INTO System_TopMenu (Menu_User,Menu_Links) VALUES (@Menu_User,@Menu_Links)"; if (string.IsNullOrEmpty(system_TopMenu.Menu_User)) { idb.AddParameter("@Menu_User", DBNull.Value); } else { idb.AddParameter("@Menu_User", system_TopMenu.Menu_User); } if (string.IsNullOrEmpty(system_TopMenu.Menu_Links)) { idb.AddParameter("@Menu_Links", DBNull.Value); } else { idb.AddParameter("@Menu_Links", system_TopMenu.Menu_Links); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加付款条款 Pay_Clause对象(即:一条记录) /// </summary> public int Add(Pay_Clause pay_Clause) { string sql = "INSERT INTO Pay_Clause (Contract_Code,Stat) VALUES (@Contract_Code,@Stat)"; if (string.IsNullOrEmpty(pay_Clause.Contract_Code)) { idb.AddParameter("@Contract_Code", DBNull.Value); } else { idb.AddParameter("@Contract_Code", pay_Clause.Contract_Code); } if (pay_Clause.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", pay_Clause.Stat); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加DeptEmployee_Relation对象(即:一条记录) /// </summary> public int Add(DeptEmployee_Relation deptEmployee_Relation) { string sql = "INSERT INTO DeptEmployee_Relation (DE_Dept_Code,DE_Empoyee_Code,DE_Type,Stat) VALUES (@DE_Dept_Code,@DE_Empoyee_Code,@DE_Type,@Stat)"; if (string.IsNullOrEmpty(deptEmployee_Relation.DE_Dept_Code)) { idb.AddParameter("@DE_Dept_Code", DBNull.Value); } else { idb.AddParameter("@DE_Dept_Code", deptEmployee_Relation.DE_Dept_Code); } if (string.IsNullOrEmpty(deptEmployee_Relation.DE_Empoyee_Code)) { idb.AddParameter("@DE_Empoyee_Code", DBNull.Value); } else { idb.AddParameter("@DE_Empoyee_Code", deptEmployee_Relation.DE_Empoyee_Code); } if (string.IsNullOrEmpty(deptEmployee_Relation.DE_Type)) { idb.AddParameter("@DE_Type", DBNull.Value); } else { idb.AddParameter("@DE_Type", deptEmployee_Relation.DE_Type); } if (deptEmployee_Relation.Stat == 0) { idb.AddParameter("@Stat", DBNull.Value); } else { idb.AddParameter("@Stat", deptEmployee_Relation.Stat); } return(idb.ExeCmd(sql)); }
/// <summary> /// 添加合同细目信息 WH_CItem对象(即:一条记录) /// </summary> public int Add(WH_CItem wH_CItem) { string sql = "INSERT INTO WH_CItem (WHCI_CCode,WHCI_MCode,WHCI_Num,WHCI_Unit,WHCI_Manu,WHCI_MDate,Stat,CreateDate,UpdateDate,DeleteDate) VALUES (@WHCI_CCode,@WHCI_MCode,@WHCI_Num,@WHCI_Unit,@WHCI_Manu,@WHCI_MDate,@Stat,@CreateDate,@UpdateDate,@DeleteDate)"; if (string.IsNullOrEmpty(wH_CItem.WHCI_CCode)) { idb.AddParameter("@WHCI_CCode", DBNull.Value); } else { idb.AddParameter("@WHCI_CCode", wH_CItem.WHCI_CCode); } if (string.IsNullOrEmpty(wH_CItem.WHCI_MCode)) { idb.AddParameter("@WHCI_MCode", DBNull.Value); } else { idb.AddParameter("@WHCI_MCode", wH_CItem.WHCI_MCode); } if (wH_CItem.WHCI_Num == 0) { idb.AddParameter("@WHCI_Num", 0); } else { idb.AddParameter("@WHCI_Num", wH_CItem.WHCI_Num); } if (string.IsNullOrEmpty(wH_CItem.WHCI_Unit)) { idb.AddParameter("@WHCI_Unit", DBNull.Value); } else { idb.AddParameter("@WHCI_Unit", wH_CItem.WHCI_Unit); } if (string.IsNullOrEmpty(wH_CItem.WHCI_Manu)) { idb.AddParameter("@WHCI_Manu", DBNull.Value); } else { idb.AddParameter("@WHCI_Manu", wH_CItem.WHCI_Manu); } if (wH_CItem.WHCI_MDate == DateTime.MinValue) { idb.AddParameter("@WHCI_MDate", DBNull.Value); } else { idb.AddParameter("@WHCI_MDate", wH_CItem.WHCI_MDate); } if (wH_CItem.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", wH_CItem.Stat); } if (wH_CItem.CreateDate == DateTime.MinValue) { idb.AddParameter("@CreateDate", DBNull.Value); } else { idb.AddParameter("@CreateDate", wH_CItem.CreateDate); } if (wH_CItem.UpdateDate == DateTime.MinValue) { idb.AddParameter("@UpdateDate", DBNull.Value); } else { idb.AddParameter("@UpdateDate", wH_CItem.UpdateDate); } if (wH_CItem.DeleteDate == DateTime.MinValue) { idb.AddParameter("@DeleteDate", DBNull.Value); } else { idb.AddParameter("@DeleteDate", wH_CItem.DeleteDate); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加设备检修计划 Equ_MPlan对象(即:一条记录) /// </summary> public int Add(Equ_MPlan equ_MPlan) { string sql = "INSERT INTO Equ_MPlan (MP_Code,MP_Name,MP_Stuff,MP_Start,MP_End,VerifyStuff,VerifyStat,VerifyDate,Stat,MP_ECode,MP_EName) VALUES (@MP_Code,@MP_Name,@MP_Stuff,@MP_Start,@MP_End,@VerifyStuff,@VerifyStat,@VerifyDate,@Stat,@MP_ECode,@MP_EName)"; if (string.IsNullOrEmpty(equ_MPlan.MP_Code)) { idb.AddParameter("@MP_Code", DBNull.Value); } else { idb.AddParameter("@MP_Code", equ_MPlan.MP_Code); } if (string.IsNullOrEmpty(equ_MPlan.MP_Name)) { idb.AddParameter("@MP_Name", DBNull.Value); } else { idb.AddParameter("@MP_Name", equ_MPlan.MP_Name); } if (string.IsNullOrEmpty(equ_MPlan.MP_Stuff)) { idb.AddParameter("@MP_Stuff", DBNull.Value); } else { idb.AddParameter("@MP_Stuff", equ_MPlan.MP_Stuff); } if (equ_MPlan.MP_Start == DateTime.MinValue) { idb.AddParameter("@MP_Start", DBNull.Value); } else { idb.AddParameter("@MP_Start", equ_MPlan.MP_Start); } if (equ_MPlan.MP_End == DateTime.MinValue) { idb.AddParameter("@MP_End", DBNull.Value); } else { idb.AddParameter("@MP_End", equ_MPlan.MP_End); } if (string.IsNullOrEmpty(equ_MPlan.VerifyStuff)) { idb.AddParameter("@VerifyStuff", DBNull.Value); } else { idb.AddParameter("@VerifyStuff", equ_MPlan.VerifyStuff); } if (string.IsNullOrEmpty(equ_MPlan.VerifyStat)) { idb.AddParameter("@VerifyStat", DBNull.Value); } else { idb.AddParameter("@VerifyStat", equ_MPlan.VerifyStat); } if (equ_MPlan.VerifyDate == DateTime.MinValue) { idb.AddParameter("@VerifyDate", DBNull.Value); } else { idb.AddParameter("@VerifyDate", equ_MPlan.VerifyDate); } if (equ_MPlan.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", equ_MPlan.Stat); } if (string.IsNullOrEmpty(equ_MPlan.MP_ECode)) { idb.AddParameter("@MP_ECode", DBNull.Value); } else { idb.AddParameter("@MP_ECode", equ_MPlan.MP_ECode); } if (string.IsNullOrEmpty(equ_MPlan.MP_EName)) { idb.AddParameter("@MP_EName", DBNull.Value); } else { idb.AddParameter("@MP_EName", equ_MPlan.MP_EName); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加审核模板配置表 Verify_TemplateConfig对象(即:一条记录) /// </summary> public int Add(Verify_TemplateConfig verify_TemplateConfig) { string sql = "INSERT INTO Verify_TemplateConfig (VT_Template_Code,VT_Key,VT_VerifyNode_Code,VT_VerifyNode_Name,Flag,VT_VerifyNode_Order,VT_VerifyNode_Back,VT_VerifyNode_BackName,VT_Remark,Stat,VT_AcSum,VT_AcNodeName,VT_AcNodeCode) VALUES (@VT_Template_Code,@VT_Key,@VT_VerifyNode_Code,@VT_VerifyNode_Name,@Flag,@VT_VerifyNode_Order,@VT_VerifyNode_Back,@VT_VerifyNode_BackName,@VT_Remark,@Stat,@VT_AcSum,@VT_AcNodeName,@VT_AcNodeCode)"; if (string.IsNullOrEmpty(verify_TemplateConfig.VT_Template_Code)) { idb.AddParameter("@VT_Template_Code", DBNull.Value); } else { idb.AddParameter("@VT_Template_Code", verify_TemplateConfig.VT_Template_Code); } if (string.IsNullOrEmpty(verify_TemplateConfig.VT_Key)) { idb.AddParameter("@VT_Key", DBNull.Value); } else { idb.AddParameter("@VT_Key", verify_TemplateConfig.VT_Key); } if (string.IsNullOrEmpty(verify_TemplateConfig.VT_VerifyNode_Code)) { idb.AddParameter("@VT_VerifyNode_Code", DBNull.Value); } else { idb.AddParameter("@VT_VerifyNode_Code", verify_TemplateConfig.VT_VerifyNode_Code); } if (string.IsNullOrEmpty(verify_TemplateConfig.VT_VerifyNode_Name)) { idb.AddParameter("@VT_VerifyNode_Name", DBNull.Value); } else { idb.AddParameter("@VT_VerifyNode_Name", verify_TemplateConfig.VT_VerifyNode_Name); } if (verify_TemplateConfig.Flag == 0) { idb.AddParameter("@Flag", 0); } else { idb.AddParameter("@Flag", verify_TemplateConfig.Flag); } if (verify_TemplateConfig.VT_VerifyNode_Order == 0) { idb.AddParameter("@VT_VerifyNode_Order", 0); } else { idb.AddParameter("@VT_VerifyNode_Order", verify_TemplateConfig.VT_VerifyNode_Order); } if (string.IsNullOrEmpty(verify_TemplateConfig.VT_VerifyNode_Back)) { idb.AddParameter("@VT_VerifyNode_Back", DBNull.Value); } else { idb.AddParameter("@VT_VerifyNode_Back", verify_TemplateConfig.VT_VerifyNode_Back); } if (string.IsNullOrEmpty(verify_TemplateConfig.VT_VerifyNode_BackName)) { idb.AddParameter("@VT_VerifyNode_BackName", DBNull.Value); } else { idb.AddParameter("@VT_VerifyNode_BackName", verify_TemplateConfig.VT_VerifyNode_BackName); } if (string.IsNullOrEmpty(verify_TemplateConfig.VT_Remark)) { idb.AddParameter("@VT_Remark", DBNull.Value); } else { idb.AddParameter("@VT_Remark", verify_TemplateConfig.VT_Remark); } if (verify_TemplateConfig.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", verify_TemplateConfig.Stat); } if (verify_TemplateConfig.VT_AcSum == 0) { idb.AddParameter("@VT_AcSum", 0); } else { idb.AddParameter("@VT_AcSum", verify_TemplateConfig.VT_AcSum); } if (string.IsNullOrEmpty(verify_TemplateConfig.VT_AcNodeName)) { idb.AddParameter("@VT_AcNodeName", DBNull.Value); } else { idb.AddParameter("@VT_AcNodeName", verify_TemplateConfig.VT_AcNodeName); } if (string.IsNullOrEmpty(verify_TemplateConfig.VT_AcNodeCode)) { idb.AddParameter("@VT_AcNodeCode", DBNull.Value); } else { idb.AddParameter("@VT_AcNodeCode", verify_TemplateConfig.VT_AcNodeCode); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加联系人信息 Bse_Contacts对象(即:一条记录) /// </summary> public int Add(Bse_Contacts bse_Contacts) { string sql = "INSERT INTO Bse_Contacts (Module_Code,Record_ID,BContact_Name,BContact_Tel1,BContact_Tel2,BContact_Fax,BContact_Addr,BContact_Email,BContact_Duty,BContact_Gender,BContact_Career,BContact_Birth,BContact_From,BContact_IsDefault,CreateDate,Creator,BContact_Bak1,BContact_Bak2,Stat,BContact_Code,UpdateDate,DeleteDate) VALUES (@Module_Code,@Record_ID,@BContact_Name,@BContact_Tel1,@BContact_Tel2,@BContact_Fax,@BContact_Addr,@BContact_Email,@BContact_Duty,@BContact_Gender,@BContact_Career,@BContact_Birth,@BContact_From,@BContact_IsDefault,@CreateDate,@Creator,@BContact_Bak1,@BContact_Bak2,@Stat,@BContact_Code,@UpdateDate,@DeleteDate)"; if (string.IsNullOrEmpty(bse_Contacts.Module_Code)) { idb.AddParameter("@Module_Code", DBNull.Value); } else { idb.AddParameter("@Module_Code", bse_Contacts.Module_Code); } if (string.IsNullOrEmpty(bse_Contacts.Record_ID)) { idb.AddParameter("@Record_ID", DBNull.Value); } else { idb.AddParameter("@Record_ID", bse_Contacts.Record_ID); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Name)) { idb.AddParameter("@BContact_Name", DBNull.Value); } else { idb.AddParameter("@BContact_Name", bse_Contacts.BContact_Name); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Tel1)) { idb.AddParameter("@BContact_Tel1", DBNull.Value); } else { idb.AddParameter("@BContact_Tel1", bse_Contacts.BContact_Tel1); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Tel2)) { idb.AddParameter("@BContact_Tel2", DBNull.Value); } else { idb.AddParameter("@BContact_Tel2", bse_Contacts.BContact_Tel2); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Fax)) { idb.AddParameter("@BContact_Fax", DBNull.Value); } else { idb.AddParameter("@BContact_Fax", bse_Contacts.BContact_Fax); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Addr)) { idb.AddParameter("@BContact_Addr", DBNull.Value); } else { idb.AddParameter("@BContact_Addr", bse_Contacts.BContact_Addr); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Email)) { idb.AddParameter("@BContact_Email", DBNull.Value); } else { idb.AddParameter("@BContact_Email", bse_Contacts.BContact_Email); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Duty)) { idb.AddParameter("@BContact_Duty", DBNull.Value); } else { idb.AddParameter("@BContact_Duty", bse_Contacts.BContact_Duty); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Gender)) { idb.AddParameter("@BContact_Gender", DBNull.Value); } else { idb.AddParameter("@BContact_Gender", bse_Contacts.BContact_Gender); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Career)) { idb.AddParameter("@BContact_Career", DBNull.Value); } else { idb.AddParameter("@BContact_Career", bse_Contacts.BContact_Career); } if (bse_Contacts.BContact_Birth == DateTime.MinValue) { idb.AddParameter("@BContact_Birth", DBNull.Value); } else { idb.AddParameter("@BContact_Birth", bse_Contacts.BContact_Birth); } if (string.IsNullOrEmpty(bse_Contacts.BContact_From)) { idb.AddParameter("@BContact_From", DBNull.Value); } else { idb.AddParameter("@BContact_From", bse_Contacts.BContact_From); } if (string.IsNullOrEmpty(bse_Contacts.BContact_IsDefault)) { idb.AddParameter("@BContact_IsDefault", DBNull.Value); } else { idb.AddParameter("@BContact_IsDefault", bse_Contacts.BContact_IsDefault); } if (bse_Contacts.CreateDate == DateTime.MinValue) { idb.AddParameter("@CreateDate", DBNull.Value); } else { idb.AddParameter("@CreateDate", bse_Contacts.CreateDate); } if (string.IsNullOrEmpty(bse_Contacts.Creator)) { idb.AddParameter("@Creator", DBNull.Value); } else { idb.AddParameter("@Creator", bse_Contacts.Creator); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Bak1)) { idb.AddParameter("@BContact_Bak1", DBNull.Value); } else { idb.AddParameter("@BContact_Bak1", bse_Contacts.BContact_Bak1); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Bak2)) { idb.AddParameter("@BContact_Bak2", DBNull.Value); } else { idb.AddParameter("@BContact_Bak2", bse_Contacts.BContact_Bak2); } if (bse_Contacts.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", bse_Contacts.Stat); } if (string.IsNullOrEmpty(bse_Contacts.BContact_Code)) { idb.AddParameter("@BContact_Code", DBNull.Value); } else { idb.AddParameter("@BContact_Code", bse_Contacts.BContact_Code); } if (bse_Contacts.UpdateDate == DateTime.MinValue) { idb.AddParameter("@UpdateDate", DBNull.Value); } else { idb.AddParameter("@UpdateDate", bse_Contacts.UpdateDate); } if (bse_Contacts.DeleteDate == DateTime.MinValue) { idb.AddParameter("@DeleteDate", DBNull.Value); } else { idb.AddParameter("@DeleteDate", bse_Contacts.DeleteDate); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加Sys_PD_Module对象(即:一条记录) /// </summary> public int Add(Sys_PD_Module sys_PD_Module) { string sql = "INSERT INTO Sys_PD_Module (SPM_Module,SPM_LPrefix,SPM_Name,SPM_LX,SPM_LY,SPM_TX,SPM_TY,SPM_LI,SPM_TI,SPM_CNum,SPM_TPrefix,SPM_Height,Stat) VALUES (@SPM_Module,@SPM_LPrefix,@SPM_Name,@SPM_LX,@SPM_LY,@SPM_TX,@SPM_TY,@SPM_LI,@SPM_TI,@SPM_CNum,@SPM_TPrefix,@SPM_Height,@Stat)"; if (string.IsNullOrEmpty(sys_PD_Module.SPM_Module)) { idb.AddParameter("@SPM_Module", DBNull.Value); } else { idb.AddParameter("@SPM_Module", sys_PD_Module.SPM_Module); } if (string.IsNullOrEmpty(sys_PD_Module.SPM_LPrefix)) { idb.AddParameter("@SPM_LPrefix", DBNull.Value); } else { idb.AddParameter("@SPM_LPrefix", sys_PD_Module.SPM_LPrefix); } if (string.IsNullOrEmpty(sys_PD_Module.SPM_Name)) { idb.AddParameter("@SPM_Name", DBNull.Value); } else { idb.AddParameter("@SPM_Name", sys_PD_Module.SPM_Name); } if (sys_PD_Module.SPM_LX == 0) { idb.AddParameter("@SPM_LX", 0); } else { idb.AddParameter("@SPM_LX", sys_PD_Module.SPM_LX); } if (sys_PD_Module.SPM_LY == 0) { idb.AddParameter("@SPM_LY", 0); } else { idb.AddParameter("@SPM_LY", sys_PD_Module.SPM_LY); } if (sys_PD_Module.SPM_TX == 0) { idb.AddParameter("@SPM_TX", 0); } else { idb.AddParameter("@SPM_TX", sys_PD_Module.SPM_TX); } if (sys_PD_Module.SPM_TY == 0) { idb.AddParameter("@SPM_TY", 0); } else { idb.AddParameter("@SPM_TY", sys_PD_Module.SPM_TY); } if (sys_PD_Module.SPM_LI == 0) { idb.AddParameter("@SPM_LI", 0); } else { idb.AddParameter("@SPM_LI", sys_PD_Module.SPM_LI); } if (sys_PD_Module.SPM_TI == 0) { idb.AddParameter("@SPM_TI", 0); } else { idb.AddParameter("@SPM_TI", sys_PD_Module.SPM_TI); } if (sys_PD_Module.SPM_CNum == 0) { idb.AddParameter("@SPM_CNum", 0); } else { idb.AddParameter("@SPM_CNum", sys_PD_Module.SPM_CNum); } if (string.IsNullOrEmpty(sys_PD_Module.SPM_TPrefix)) { idb.AddParameter("@SPM_TPrefix", DBNull.Value); } else { idb.AddParameter("@SPM_TPrefix", sys_PD_Module.SPM_TPrefix); } if (sys_PD_Module.SPM_Height == 0) { idb.AddParameter("@SPM_Height", 0); } else { idb.AddParameter("@SPM_Height", sys_PD_Module.SPM_Height); } if (sys_PD_Module.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", sys_PD_Module.Stat); } return(idb.ExeCmd(sql)); }
/// <summary> /// 添加系统菜单 System_Menu对象(即:一条记录) /// </summary> public int Add(System_Menu system_Menu) { string sql = "INSERT INTO System_Menu (Menu_Code,Menu_Title,Menu_Location,Menu_PCode,Menu_Enable,Menu_Url,Menu_Order,Menu_Icon,Stat,Shortcut) VALUES (@Menu_Code,@Menu_Title,@Menu_Location,@Menu_PCode,@Menu_Enable,@Menu_Url,@Menu_Order,@Menu_Icon,@Stat,@Shortcut)"; if (string.IsNullOrEmpty(system_Menu.Menu_Code)) { idb.AddParameter("@Menu_Code", DBNull.Value); } else { idb.AddParameter("@Menu_Code", system_Menu.Menu_Code); } if (string.IsNullOrEmpty(system_Menu.Menu_Title)) { idb.AddParameter("@Menu_Title", DBNull.Value); } else { idb.AddParameter("@Menu_Title", system_Menu.Menu_Title); } if (string.IsNullOrEmpty(system_Menu.Menu_Location)) { idb.AddParameter("@Menu_Location", DBNull.Value); } else { idb.AddParameter("@Menu_Location", system_Menu.Menu_Location); } if (string.IsNullOrEmpty(system_Menu.Menu_PCode)) { idb.AddParameter("@Menu_PCode", DBNull.Value); } else { idb.AddParameter("@Menu_PCode", system_Menu.Menu_PCode); } if (string.IsNullOrEmpty(system_Menu.Menu_Enable)) { idb.AddParameter("@Menu_Enable", DBNull.Value); } else { idb.AddParameter("@Menu_Enable", system_Menu.Menu_Enable); } if (string.IsNullOrEmpty(system_Menu.Menu_Url)) { idb.AddParameter("@Menu_Url", DBNull.Value); } else { idb.AddParameter("@Menu_Url", system_Menu.Menu_Url); } if (system_Menu.Menu_Order == 0) { idb.AddParameter("@Menu_Order", 0); } else { idb.AddParameter("@Menu_Order", system_Menu.Menu_Order); } if (string.IsNullOrEmpty(system_Menu.Menu_Icon)) { idb.AddParameter("@Menu_Icon", DBNull.Value); } else { idb.AddParameter("@Menu_Icon", system_Menu.Menu_Icon); } if (system_Menu.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", system_Menu.Stat); } if (system_Menu.Shortcut == 0) { idb.AddParameter("@Shortcut", 0); } else { idb.AddParameter("@Shortcut", system_Menu.Shortcut); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加Doc_Attachment对象(即:一条记录) /// </summary> public int Add(Doc_Attachment doc_Attachment) { string sql = "INSERT INTO Doc_Attachment (Dat_Code,Dat_Name,Dat_Path,Dat_Module,Dat_RefCode,Dat_Type,Dat_Stat,Dat_Order,Dat_Date,Dat_Creator,Dat_CreatorName,CreateTime,UpdateTime,DeleteTime,Stat,Dat_Udef1,Dat_Udef2,Dat_Udef3,Dat_Udef4,Dat_ShowName) VALUES (@Dat_Code,@Dat_Name,@Dat_Path,@Dat_Module,@Dat_RefCode,@Dat_Type,@Dat_Stat,@Dat_Order,@Dat_Date,@Dat_Creator,@Dat_CreatorName,@CreateTime,@UpdateTime,@DeleteTime,@Stat,@Dat_Udef1,@Dat_Udef2,@Dat_Udef3,@Dat_Udef4,@Dat_ShowName)"; if (string.IsNullOrEmpty(doc_Attachment.Dat_Code)) { idb.AddParameter("@Dat_Code", DBNull.Value); } else { idb.AddParameter("@Dat_Code", doc_Attachment.Dat_Code); } if (string.IsNullOrEmpty(doc_Attachment.Dat_Name)) { idb.AddParameter("@Dat_Name", DBNull.Value); } else { idb.AddParameter("@Dat_Name", doc_Attachment.Dat_Name); } if (string.IsNullOrEmpty(doc_Attachment.Dat_Path)) { idb.AddParameter("@Dat_Path", DBNull.Value); } else { idb.AddParameter("@Dat_Path", doc_Attachment.Dat_Path); } if (string.IsNullOrEmpty(doc_Attachment.Dat_Module)) { idb.AddParameter("@Dat_Module", DBNull.Value); } else { idb.AddParameter("@Dat_Module", doc_Attachment.Dat_Module); } if (string.IsNullOrEmpty(doc_Attachment.Dat_RefCode)) { idb.AddParameter("@Dat_RefCode", DBNull.Value); } else { idb.AddParameter("@Dat_RefCode", doc_Attachment.Dat_RefCode); } if (string.IsNullOrEmpty(doc_Attachment.Dat_Type)) { idb.AddParameter("@Dat_Type", DBNull.Value); } else { idb.AddParameter("@Dat_Type", doc_Attachment.Dat_Type); } if (string.IsNullOrEmpty(doc_Attachment.Dat_Stat)) { idb.AddParameter("@Dat_Stat", DBNull.Value); } else { idb.AddParameter("@Dat_Stat", doc_Attachment.Dat_Stat); } if (doc_Attachment.Dat_Order == 0) { idb.AddParameter("@Dat_Order", 0); } else { idb.AddParameter("@Dat_Order", doc_Attachment.Dat_Order); } if (doc_Attachment.Dat_Date == DateTime.MinValue) { idb.AddParameter("@Dat_Date", DBNull.Value); } else { idb.AddParameter("@Dat_Date", doc_Attachment.Dat_Date); } if (string.IsNullOrEmpty(doc_Attachment.Dat_Creator)) { idb.AddParameter("@Dat_Creator", DBNull.Value); } else { idb.AddParameter("@Dat_Creator", doc_Attachment.Dat_Creator); } if (string.IsNullOrEmpty(doc_Attachment.Dat_CreatorName)) { idb.AddParameter("@Dat_CreatorName", DBNull.Value); } else { idb.AddParameter("@Dat_CreatorName", doc_Attachment.Dat_CreatorName); } if (doc_Attachment.CreateTime == DateTime.MinValue) { idb.AddParameter("@CreateTime", DBNull.Value); } else { idb.AddParameter("@CreateTime", doc_Attachment.CreateTime); } if (doc_Attachment.UpdateTime == DateTime.MinValue) { idb.AddParameter("@UpdateTime", DBNull.Value); } else { idb.AddParameter("@UpdateTime", doc_Attachment.UpdateTime); } if (doc_Attachment.DeleteTime == DateTime.MinValue) { idb.AddParameter("@DeleteTime", DBNull.Value); } else { idb.AddParameter("@DeleteTime", doc_Attachment.DeleteTime); } if (doc_Attachment.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", doc_Attachment.Stat); } if (string.IsNullOrEmpty(doc_Attachment.Dat_Udef1)) { idb.AddParameter("@Dat_Udef1", DBNull.Value); } else { idb.AddParameter("@Dat_Udef1", doc_Attachment.Dat_Udef1); } if (string.IsNullOrEmpty(doc_Attachment.Dat_Udef2)) { idb.AddParameter("@Dat_Udef2", DBNull.Value); } else { idb.AddParameter("@Dat_Udef2", doc_Attachment.Dat_Udef2); } if (string.IsNullOrEmpty(doc_Attachment.Dat_Udef3)) { idb.AddParameter("@Dat_Udef3", DBNull.Value); } else { idb.AddParameter("@Dat_Udef3", doc_Attachment.Dat_Udef3); } if (string.IsNullOrEmpty(doc_Attachment.Dat_Udef4)) { idb.AddParameter("@Dat_Udef4", DBNull.Value); } else { idb.AddParameter("@Dat_Udef4", doc_Attachment.Dat_Udef4); } if (string.IsNullOrEmpty(doc_Attachment.Dat_ShowName)) { idb.AddParameter("@Dat_ShowName", DBNull.Value); } else { idb.AddParameter("@Dat_ShowName", doc_Attachment.Dat_ShowName); } return(idb.ExeCmd(sql)); }
/// <summary> /// 添加搅拌站信息 PC_BStation对象(即:一条记录) /// </summary> public int Add(PC_BStation pC_BStation) { string sql = "INSERT INTO PC_BStation (PCBS_Code,PCBS_Name,PCBS_Addr,PCBS_Start,PCBS_Status,PCBS_Bak,Stat,CreateDate,UpdateDate,DeleteDate) VALUES (@PCBS_Code,@PCBS_Name,@PCBS_Addr,@PCBS_Start,@PCBS_Status,@PCBS_Bak,@Stat,@CreateDate,@UpdateDate,@DeleteDate)"; if (string.IsNullOrEmpty(pC_BStation.PCBS_Code)) { idb.AddParameter("@PCBS_Code", DBNull.Value); } else { idb.AddParameter("@PCBS_Code", pC_BStation.PCBS_Code); } if (string.IsNullOrEmpty(pC_BStation.PCBS_Name)) { idb.AddParameter("@PCBS_Name", DBNull.Value); } else { idb.AddParameter("@PCBS_Name", pC_BStation.PCBS_Name); } if (string.IsNullOrEmpty(pC_BStation.PCBS_Addr)) { idb.AddParameter("@PCBS_Addr", DBNull.Value); } else { idb.AddParameter("@PCBS_Addr", pC_BStation.PCBS_Addr); } if (pC_BStation.PCBS_Start == DateTime.MinValue) { idb.AddParameter("@PCBS_Start", DBNull.Value); } else { idb.AddParameter("@PCBS_Start", pC_BStation.PCBS_Start); } if (string.IsNullOrEmpty(pC_BStation.PCBS_Status)) { idb.AddParameter("@PCBS_Status", DBNull.Value); } else { idb.AddParameter("@PCBS_Status", pC_BStation.PCBS_Status); } if (string.IsNullOrEmpty(pC_BStation.PCBS_Bak)) { idb.AddParameter("@PCBS_Bak", DBNull.Value); } else { idb.AddParameter("@PCBS_Bak", pC_BStation.PCBS_Bak); } if (pC_BStation.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", pC_BStation.Stat); } if (pC_BStation.CreateDate == DateTime.MinValue) { idb.AddParameter("@CreateDate", DBNull.Value); } else { idb.AddParameter("@CreateDate", pC_BStation.CreateDate); } if (pC_BStation.UpdateDate == DateTime.MinValue) { idb.AddParameter("@UpdateDate", DBNull.Value); } else { idb.AddParameter("@UpdateDate", pC_BStation.UpdateDate); } if (pC_BStation.DeleteDate == DateTime.MinValue) { idb.AddParameter("@DeleteDate", DBNull.Value); } else { idb.AddParameter("@DeleteDate", pC_BStation.DeleteDate); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加数据字典 Bse_Dict对象(即:一条记录) /// </summary> public int Add(Bse_Dict bse_Dict) { string sql = "INSERT INTO Bse_Dict (Dict_Key,Dict_Code,Dict_Name,Dict_Order,Dict_PCode,Dict_PName,Dict_Desp,Dict_SCode,Dict_Bak,Dict_UDef1,Dict_UDef2,Dict_UDef3,Dict_UDef4,Dict_UDef5,Dict_Level,Dict_IsEditable,Stat) VALUES (@Dict_Key,@Dict_Code,@Dict_Name,@Dict_Order,@Dict_PCode,@Dict_PName,@Dict_Desp,@Dict_SCode,@Dict_Bak,@Dict_UDef1,@Dict_UDef2,@Dict_UDef3,@Dict_UDef4,@Dict_UDef5,@Dict_Level,@Dict_IsEditable,@Stat)"; if (string.IsNullOrEmpty(bse_Dict.Dict_Key)) { idb.AddParameter("@Dict_Key", DBNull.Value); } else { idb.AddParameter("@Dict_Key", bse_Dict.Dict_Key); } if (string.IsNullOrEmpty(bse_Dict.Dict_Code)) { idb.AddParameter("@Dict_Code", DBNull.Value); } else { idb.AddParameter("@Dict_Code", bse_Dict.Dict_Code); } if (string.IsNullOrEmpty(bse_Dict.Dict_Name)) { idb.AddParameter("@Dict_Name", DBNull.Value); } else { idb.AddParameter("@Dict_Name", bse_Dict.Dict_Name); } if (bse_Dict.Dict_Order == 0) { idb.AddParameter("@Dict_Order", 0); } else { idb.AddParameter("@Dict_Order", bse_Dict.Dict_Order); } if (string.IsNullOrEmpty(bse_Dict.Dict_PCode)) { idb.AddParameter("@Dict_PCode", DBNull.Value); } else { idb.AddParameter("@Dict_PCode", bse_Dict.Dict_PCode); } if (string.IsNullOrEmpty(bse_Dict.Dict_PName)) { idb.AddParameter("@Dict_PName", DBNull.Value); } else { idb.AddParameter("@Dict_PName", bse_Dict.Dict_PName); } if (string.IsNullOrEmpty(bse_Dict.Dict_Desp)) { idb.AddParameter("@Dict_Desp", DBNull.Value); } else { idb.AddParameter("@Dict_Desp", bse_Dict.Dict_Desp); } if (string.IsNullOrEmpty(bse_Dict.Dict_SCode)) { idb.AddParameter("@Dict_SCode", DBNull.Value); } else { idb.AddParameter("@Dict_SCode", bse_Dict.Dict_SCode); } if (string.IsNullOrEmpty(bse_Dict.Dict_Bak)) { idb.AddParameter("@Dict_Bak", DBNull.Value); } else { idb.AddParameter("@Dict_Bak", bse_Dict.Dict_Bak); } if (string.IsNullOrEmpty(bse_Dict.Dict_UDef1)) { idb.AddParameter("@Dict_UDef1", DBNull.Value); } else { idb.AddParameter("@Dict_UDef1", bse_Dict.Dict_UDef1); } if (string.IsNullOrEmpty(bse_Dict.Dict_UDef2)) { idb.AddParameter("@Dict_UDef2", DBNull.Value); } else { idb.AddParameter("@Dict_UDef2", bse_Dict.Dict_UDef2); } if (string.IsNullOrEmpty(bse_Dict.Dict_UDef3)) { idb.AddParameter("@Dict_UDef3", DBNull.Value); } else { idb.AddParameter("@Dict_UDef3", bse_Dict.Dict_UDef3); } if (string.IsNullOrEmpty(bse_Dict.Dict_UDef4)) { idb.AddParameter("@Dict_UDef4", DBNull.Value); } else { idb.AddParameter("@Dict_UDef4", bse_Dict.Dict_UDef4); } if (string.IsNullOrEmpty(bse_Dict.Dict_UDef5)) { idb.AddParameter("@Dict_UDef5", DBNull.Value); } else { idb.AddParameter("@Dict_UDef5", bse_Dict.Dict_UDef5); } if (bse_Dict.Dict_Level == 0) { idb.AddParameter("@Dict_Level", 0); } else { idb.AddParameter("@Dict_Level", bse_Dict.Dict_Level); } if (bse_Dict.Dict_IsEditable == 0) { idb.AddParameter("@Dict_IsEditable", 0); } else { idb.AddParameter("@Dict_IsEditable", bse_Dict.Dict_IsEditable); } if (bse_Dict.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", bse_Dict.Stat); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加备注信息 Bse_Bak对象(即:一条记录) /// </summary> public int Add(Bse_Bak bse_Bak) { string sql = "INSERT INTO Bse_Bak (Module_Code,Record_ID,Bak_Content,Stat) VALUES (@Module_Code,@Record_ID,@Bak_Content,@Stat)"; if (string.IsNullOrEmpty(bse_Bak.Module_Code)) { idb.AddParameter("@Module_Code", DBNull.Value); } else { idb.AddParameter("@Module_Code", bse_Bak.Module_Code); } if (string.IsNullOrEmpty(bse_Bak.Record_ID)) { idb.AddParameter("@Record_ID", DBNull.Value); } else { idb.AddParameter("@Record_ID", bse_Bak.Record_ID); } if (string.IsNullOrEmpty(bse_Bak.Bak_Content)) { idb.AddParameter("@Bak_Content", DBNull.Value); } else { idb.AddParameter("@Bak_Content", bse_Bak.Bak_Content); } if (bse_Bak.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", bse_Bak.Stat); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加考评信息 HR_Evaluation对象(即:一条记录) /// </summary> public int Add(HR_Evaluation hR_Evaluation) { string sql = "INSERT INTO HR_Evaluation (Eva_Code,Eva_StuffCode,Eva_StuffName,Eva_Date,Eva_Records,Eva_Conclusion,Eva_Manager,Eva_Level,Eva_Bak,Stat,CreateDate,UpdateDate,DeleteDate) VALUES (@Eva_Code,@Eva_StuffCode,@Eva_StuffName,@Eva_Date,@Eva_Records,@Eva_Conclusion,@Eva_Manager,@Eva_Level,@Eva_Bak,@Stat,@CreateDate,@UpdateDate,@DeleteDate)"; if (string.IsNullOrEmpty(hR_Evaluation.Eva_Code)) { idb.AddParameter("@Eva_Code", DBNull.Value); } else { idb.AddParameter("@Eva_Code", hR_Evaluation.Eva_Code); } if (string.IsNullOrEmpty(hR_Evaluation.Eva_StuffCode)) { idb.AddParameter("@Eva_StuffCode", DBNull.Value); } else { idb.AddParameter("@Eva_StuffCode", hR_Evaluation.Eva_StuffCode); } if (string.IsNullOrEmpty(hR_Evaluation.Eva_StuffName)) { idb.AddParameter("@Eva_StuffName", DBNull.Value); } else { idb.AddParameter("@Eva_StuffName", hR_Evaluation.Eva_StuffName); } if (hR_Evaluation.Eva_Date == DateTime.MinValue) { idb.AddParameter("@Eva_Date", DBNull.Value); } else { idb.AddParameter("@Eva_Date", hR_Evaluation.Eva_Date); } if (string.IsNullOrEmpty(hR_Evaluation.Eva_Records)) { idb.AddParameter("@Eva_Records", DBNull.Value); } else { idb.AddParameter("@Eva_Records", hR_Evaluation.Eva_Records); } if (string.IsNullOrEmpty(hR_Evaluation.Eva_Conclusion)) { idb.AddParameter("@Eva_Conclusion", DBNull.Value); } else { idb.AddParameter("@Eva_Conclusion", hR_Evaluation.Eva_Conclusion); } if (string.IsNullOrEmpty(hR_Evaluation.Eva_Manager)) { idb.AddParameter("@Eva_Manager", DBNull.Value); } else { idb.AddParameter("@Eva_Manager", hR_Evaluation.Eva_Manager); } if (string.IsNullOrEmpty(hR_Evaluation.Eva_Level)) { idb.AddParameter("@Eva_Level", DBNull.Value); } else { idb.AddParameter("@Eva_Level", hR_Evaluation.Eva_Level); } if (string.IsNullOrEmpty(hR_Evaluation.Eva_Bak)) { idb.AddParameter("@Eva_Bak", DBNull.Value); } else { idb.AddParameter("@Eva_Bak", hR_Evaluation.Eva_Bak); } if (hR_Evaluation.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", hR_Evaluation.Stat); } if (hR_Evaluation.CreateDate == DateTime.MinValue) { idb.AddParameter("@CreateDate", DBNull.Value); } else { idb.AddParameter("@CreateDate", hR_Evaluation.CreateDate); } if (hR_Evaluation.UpdateDate == DateTime.MinValue) { idb.AddParameter("@UpdateDate", DBNull.Value); } else { idb.AddParameter("@UpdateDate", hR_Evaluation.UpdateDate); } if (hR_Evaluation.DeleteDate == DateTime.MinValue) { idb.AddParameter("@DeleteDate", DBNull.Value); } else { idb.AddParameter("@DeleteDate", hR_Evaluation.DeleteDate); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加请购单 WH_ApplyBuy对象(即:一条记录) /// </summary> public int Add(WH_ApplyBuy wH_ApplyBuy) { string sql = "INSERT INTO WH_ApplyBuy (MVI_Code,MVI_RCode,MVI_Type,MVI_MCode,MVI_Spec,MVI_Sup,MVI_Num,MVI_Unit,MVI_MDPrice,Stat,MV_CustCode,MV_CustName,MV_CustRef,MV_CustDate,MV_VerifyStep,MV_VerifyStuff,MV_VerifyDate,MV_VerifyStat,MV_ContractNo) VALUES (@MVI_Code,@MVI_RCode,@MVI_Type,@MVI_MCode,@MVI_Spec,@MVI_Sup,@MVI_Num,@MVI_Unit,@MVI_MDPrice,@Stat,@MV_CustCode,@MV_CustName,@MV_CustRef,@MV_CustDate,@MV_VerifyStep,@MV_VerifyStuff,@MV_VerifyDate,@MV_VerifyStat,@MV_ContractNo)"; if (string.IsNullOrEmpty(wH_ApplyBuy.MVI_Code)) { idb.AddParameter("@MVI_Code", DBNull.Value); } else { idb.AddParameter("@MVI_Code", wH_ApplyBuy.MVI_Code); } if (string.IsNullOrEmpty(wH_ApplyBuy.MVI_RCode)) { idb.AddParameter("@MVI_RCode", DBNull.Value); } else { idb.AddParameter("@MVI_RCode", wH_ApplyBuy.MVI_RCode); } if (string.IsNullOrEmpty(wH_ApplyBuy.MVI_Type)) { idb.AddParameter("@MVI_Type", DBNull.Value); } else { idb.AddParameter("@MVI_Type", wH_ApplyBuy.MVI_Type); } if (string.IsNullOrEmpty(wH_ApplyBuy.MVI_MCode)) { idb.AddParameter("@MVI_MCode", DBNull.Value); } else { idb.AddParameter("@MVI_MCode", wH_ApplyBuy.MVI_MCode); } if (string.IsNullOrEmpty(wH_ApplyBuy.MVI_Spec)) { idb.AddParameter("@MVI_Spec", DBNull.Value); } else { idb.AddParameter("@MVI_Spec", wH_ApplyBuy.MVI_Spec); } if (string.IsNullOrEmpty(wH_ApplyBuy.MVI_Sup)) { idb.AddParameter("@MVI_Sup", DBNull.Value); } else { idb.AddParameter("@MVI_Sup", wH_ApplyBuy.MVI_Sup); } if (wH_ApplyBuy.MVI_Num == 0) { idb.AddParameter("@MVI_Num", 0); } else { idb.AddParameter("@MVI_Num", wH_ApplyBuy.MVI_Num); } if (string.IsNullOrEmpty(wH_ApplyBuy.MVI_Unit)) { idb.AddParameter("@MVI_Unit", DBNull.Value); } else { idb.AddParameter("@MVI_Unit", wH_ApplyBuy.MVI_Unit); } if (wH_ApplyBuy.MVI_MDPrice == 0) { idb.AddParameter("@MVI_MDPrice", 0); } else { idb.AddParameter("@MVI_MDPrice", wH_ApplyBuy.MVI_MDPrice); } if (wH_ApplyBuy.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", wH_ApplyBuy.Stat); } if (string.IsNullOrEmpty(wH_ApplyBuy.MV_CustCode)) { idb.AddParameter("@MV_CustCode", DBNull.Value); } else { idb.AddParameter("@MV_CustCode", wH_ApplyBuy.MV_CustCode); } if (string.IsNullOrEmpty(wH_ApplyBuy.MV_CustName)) { idb.AddParameter("@MV_CustName", DBNull.Value); } else { idb.AddParameter("@MV_CustName", wH_ApplyBuy.MV_CustName); } if (string.IsNullOrEmpty(wH_ApplyBuy.MV_CustRef)) { idb.AddParameter("@MV_CustRef", DBNull.Value); } else { idb.AddParameter("@MV_CustRef", wH_ApplyBuy.MV_CustRef); } if (string.IsNullOrEmpty(wH_ApplyBuy.MV_CustDate)) { idb.AddParameter("@MV_CustDate", DBNull.Value); } else { idb.AddParameter("@MV_CustDate", wH_ApplyBuy.MV_CustDate); } if (string.IsNullOrEmpty(wH_ApplyBuy.MV_VerifyStep)) { idb.AddParameter("@MV_VerifyStep", DBNull.Value); } else { idb.AddParameter("@MV_VerifyStep", wH_ApplyBuy.MV_VerifyStep); } if (string.IsNullOrEmpty(wH_ApplyBuy.MV_VerifyStuff)) { idb.AddParameter("@MV_VerifyStuff", DBNull.Value); } else { idb.AddParameter("@MV_VerifyStuff", wH_ApplyBuy.MV_VerifyStuff); } if (wH_ApplyBuy.MV_VerifyDate == DateTime.MinValue) { idb.AddParameter("@MV_VerifyDate", DBNull.Value); } else { idb.AddParameter("@MV_VerifyDate", wH_ApplyBuy.MV_VerifyDate); } if (string.IsNullOrEmpty(wH_ApplyBuy.MV_VerifyStat)) { idb.AddParameter("@MV_VerifyStat", DBNull.Value); } else { idb.AddParameter("@MV_VerifyStat", wH_ApplyBuy.MV_VerifyStat); } if (string.IsNullOrEmpty(wH_ApplyBuy.MV_ContractNo)) { idb.AddParameter("@MV_ContractNo", DBNull.Value); } else { idb.AddParameter("@MV_ContractNo", wH_ApplyBuy.MV_ContractNo); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加传真登记信息 Fax_Record对象(即:一条记录) /// </summary> public int Add(Fax_Record fax_Record) { string sql = "INSERT INTO Fax_Record (FR_Code,FR_Date,FR_Content,FR_Category,FR_Num,FR_PageNum,FR_Amount,FR_Operator,FR_OpDate,FR_OpRemark,FR_TranferCompany,FR_TranferDept,FR_TranferRemark,FR_TranferDate,FR_Company,FR_Dept,FR_Stat,Stat,CreateDate,UpdateDate,DeleteDate) VALUES (@FR_Code,@FR_Date,@FR_Content,@FR_Category,@FR_Num,@FR_PageNum,@FR_Amount,@FR_Operator,@FR_OpDate,@FR_OpRemark,@FR_TranferCompany,@FR_TranferDept,@FR_TranferRemark,@FR_TranferDate,@FR_Company,@FR_Dept,@FR_Stat,@Stat,@CreateDate,@UpdateDate,@DeleteDate)"; if (string.IsNullOrEmpty(fax_Record.FR_Code)) { idb.AddParameter("@FR_Code", DBNull.Value); } else { idb.AddParameter("@FR_Code", fax_Record.FR_Code); } if (fax_Record.FR_Date == DateTime.MinValue) { idb.AddParameter("@FR_Date", DBNull.Value); } else { idb.AddParameter("@FR_Date", fax_Record.FR_Date); } if (string.IsNullOrEmpty(fax_Record.FR_Content)) { idb.AddParameter("@FR_Content", DBNull.Value); } else { idb.AddParameter("@FR_Content", fax_Record.FR_Content); } if (string.IsNullOrEmpty(fax_Record.FR_Category)) { idb.AddParameter("@FR_Category", DBNull.Value); } else { idb.AddParameter("@FR_Category", fax_Record.FR_Category); } if (fax_Record.FR_Num == 0) { idb.AddParameter("@FR_Num", 0); } else { idb.AddParameter("@FR_Num", fax_Record.FR_Num); } if (fax_Record.FR_PageNum == 0) { idb.AddParameter("@FR_PageNum", 0); } else { idb.AddParameter("@FR_PageNum", fax_Record.FR_PageNum); } if (fax_Record.FR_Amount == 0) { idb.AddParameter("@FR_Amount", 0); } else { idb.AddParameter("@FR_Amount", fax_Record.FR_Amount); } if (string.IsNullOrEmpty(fax_Record.FR_Operator)) { idb.AddParameter("@FR_Operator", DBNull.Value); } else { idb.AddParameter("@FR_Operator", fax_Record.FR_Operator); } if (fax_Record.FR_OpDate == DateTime.MinValue) { idb.AddParameter("@FR_OpDate", DBNull.Value); } else { idb.AddParameter("@FR_OpDate", fax_Record.FR_OpDate); } if (string.IsNullOrEmpty(fax_Record.FR_OpRemark)) { idb.AddParameter("@FR_OpRemark", DBNull.Value); } else { idb.AddParameter("@FR_OpRemark", fax_Record.FR_OpRemark); } if (string.IsNullOrEmpty(fax_Record.FR_TranferCompany)) { idb.AddParameter("@FR_TranferCompany", DBNull.Value); } else { idb.AddParameter("@FR_TranferCompany", fax_Record.FR_TranferCompany); } if (string.IsNullOrEmpty(fax_Record.FR_TranferDept)) { idb.AddParameter("@FR_TranferDept", DBNull.Value); } else { idb.AddParameter("@FR_TranferDept", fax_Record.FR_TranferDept); } if (string.IsNullOrEmpty(fax_Record.FR_TranferRemark)) { idb.AddParameter("@FR_TranferRemark", DBNull.Value); } else { idb.AddParameter("@FR_TranferRemark", fax_Record.FR_TranferRemark); } if (string.IsNullOrEmpty(fax_Record.FR_TranferDate)) { idb.AddParameter("@FR_TranferDate", DBNull.Value); } else { idb.AddParameter("@FR_TranferDate", fax_Record.FR_TranferDate); } if (string.IsNullOrEmpty(fax_Record.FR_Company)) { idb.AddParameter("@FR_Company", DBNull.Value); } else { idb.AddParameter("@FR_Company", fax_Record.FR_Company); } if (string.IsNullOrEmpty(fax_Record.FR_Dept)) { idb.AddParameter("@FR_Dept", DBNull.Value); } else { idb.AddParameter("@FR_Dept", fax_Record.FR_Dept); } if (string.IsNullOrEmpty(fax_Record.FR_Stat)) { idb.AddParameter("@FR_Stat", DBNull.Value); } else { idb.AddParameter("@FR_Stat", fax_Record.FR_Stat); } if (fax_Record.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", fax_Record.Stat); } if (fax_Record.CreateDate == DateTime.MinValue) { idb.AddParameter("@CreateDate", DBNull.Value); } else { idb.AddParameter("@CreateDate", fax_Record.CreateDate); } if (fax_Record.UpdateDate == DateTime.MinValue) { idb.AddParameter("@UpdateDate", DBNull.Value); } else { idb.AddParameter("@UpdateDate", fax_Record.UpdateDate); } if (fax_Record.DeleteDate == DateTime.MinValue) { idb.AddParameter("@DeleteDate", DBNull.Value); } else { idb.AddParameter("@DeleteDate", fax_Record.DeleteDate); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加纯净水空桶管理 EmptyPureWater_Manage对象(即:一条记录) /// </summary> public int Add(EmptyPureWater_Manage emptyPureWater_Manage) { string sql = "INSERT INTO EmptyPureWater_Manage (EPW_Code,EPW_Duty,EPW_EmptyPosition,EPW_Count,EPW_Remark,Stat,CreateDate,UpdateDate,DeleteDate,EPW_Company,EPW_Dept) VALUES (@EPW_Code,@EPW_Duty,@EPW_EmptyPosition,@EPW_Count,@EPW_Remark,@Stat,@CreateDate,@UpdateDate,@DeleteDate,@EPW_Company,@EPW_Dept)"; if (string.IsNullOrEmpty(emptyPureWater_Manage.EPW_Code)) { idb.AddParameter("@EPW_Code", DBNull.Value); } else { idb.AddParameter("@EPW_Code", emptyPureWater_Manage.EPW_Code); } if (string.IsNullOrEmpty(emptyPureWater_Manage.EPW_Duty)) { idb.AddParameter("@EPW_Duty", DBNull.Value); } else { idb.AddParameter("@EPW_Duty", emptyPureWater_Manage.EPW_Duty); } if (string.IsNullOrEmpty(emptyPureWater_Manage.EPW_EmptyPosition)) { idb.AddParameter("@EPW_EmptyPosition", DBNull.Value); } else { idb.AddParameter("@EPW_EmptyPosition", emptyPureWater_Manage.EPW_EmptyPosition); } if (emptyPureWater_Manage.EPW_Count == 0) { idb.AddParameter("@EPW_Count", 0); } else { idb.AddParameter("@EPW_Count", emptyPureWater_Manage.EPW_Count); } if (string.IsNullOrEmpty(emptyPureWater_Manage.EPW_Remark)) { idb.AddParameter("@EPW_Remark", DBNull.Value); } else { idb.AddParameter("@EPW_Remark", emptyPureWater_Manage.EPW_Remark); } if (emptyPureWater_Manage.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", emptyPureWater_Manage.Stat); } if (emptyPureWater_Manage.CreateDate == DateTime.MinValue) { idb.AddParameter("@CreateDate", DBNull.Value); } else { idb.AddParameter("@CreateDate", emptyPureWater_Manage.CreateDate); } if (emptyPureWater_Manage.UpdateDate == DateTime.MinValue) { idb.AddParameter("@UpdateDate", DBNull.Value); } else { idb.AddParameter("@UpdateDate", emptyPureWater_Manage.UpdateDate); } if (emptyPureWater_Manage.DeleteDate == DateTime.MinValue) { idb.AddParameter("@DeleteDate", DBNull.Value); } else { idb.AddParameter("@DeleteDate", emptyPureWater_Manage.DeleteDate); } if (string.IsNullOrEmpty(emptyPureWater_Manage.EPW_Company)) { idb.AddParameter("@EPW_Company", DBNull.Value); } else { idb.AddParameter("@EPW_Company", emptyPureWater_Manage.EPW_Company); } if (string.IsNullOrEmpty(emptyPureWater_Manage.EPW_Dept)) { idb.AddParameter("@EPW_Dept", DBNull.Value); } else { idb.AddParameter("@EPW_Dept", emptyPureWater_Manage.EPW_Dept); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加公司物料类别 WH_MaterialType对象(即:一条记录) /// </summary> public int Add(WH_MaterialType wH_MaterialType) { string sql = "INSERT INTO WH_MaterialType (MT_Code,MT_TCode,MT_TName,MT_Company,MT_CompanyCode,MT_Dept,MT_DeptCode,Stat,MT_Status,CreateDate,UpdateDate,DeleteDate,MT_Itype,MT_Type,MT_Employee,MT_EmployeeName,MT_TPCode,MT_Order) VALUES (@MT_Code,@MT_TCode,@MT_TName,@MT_Company,@MT_CompanyCode,@MT_Dept,@MT_DeptCode,@Stat,@MT_Status,@CreateDate,@UpdateDate,@DeleteDate,@MT_Itype,@MT_Type,@MT_Employee,@MT_EmployeeName,@MT_TPCode,@MT_Order)"; if (string.IsNullOrEmpty(wH_MaterialType.MT_Code)) { idb.AddParameter("@MT_Code", DBNull.Value); } else { idb.AddParameter("@MT_Code", wH_MaterialType.MT_Code); } if (string.IsNullOrEmpty(wH_MaterialType.MT_TCode)) { idb.AddParameter("@MT_TCode", DBNull.Value); } else { idb.AddParameter("@MT_TCode", wH_MaterialType.MT_TCode); } if (string.IsNullOrEmpty(wH_MaterialType.MT_TName)) { idb.AddParameter("@MT_TName", DBNull.Value); } else { idb.AddParameter("@MT_TName", wH_MaterialType.MT_TName); } if (string.IsNullOrEmpty(wH_MaterialType.MT_Company)) { idb.AddParameter("@MT_Company", DBNull.Value); } else { idb.AddParameter("@MT_Company", wH_MaterialType.MT_Company); } if (string.IsNullOrEmpty(wH_MaterialType.MT_CompanyCode)) { idb.AddParameter("@MT_CompanyCode", DBNull.Value); } else { idb.AddParameter("@MT_CompanyCode", wH_MaterialType.MT_CompanyCode); } if (string.IsNullOrEmpty(wH_MaterialType.MT_Dept)) { idb.AddParameter("@MT_Dept", DBNull.Value); } else { idb.AddParameter("@MT_Dept", wH_MaterialType.MT_Dept); } if (string.IsNullOrEmpty(wH_MaterialType.MT_DeptCode)) { idb.AddParameter("@MT_DeptCode", DBNull.Value); } else { idb.AddParameter("@MT_DeptCode", wH_MaterialType.MT_DeptCode); } if (wH_MaterialType.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", wH_MaterialType.Stat); } if (string.IsNullOrEmpty(wH_MaterialType.MT_Status)) { idb.AddParameter("@MT_Status", DBNull.Value); } else { idb.AddParameter("@MT_Status", wH_MaterialType.MT_Status); } if (wH_MaterialType.CreateDate == DateTime.MinValue) { idb.AddParameter("@CreateDate", DBNull.Value); } else { idb.AddParameter("@CreateDate", wH_MaterialType.CreateDate); } if (wH_MaterialType.UpdateDate == DateTime.MinValue) { idb.AddParameter("@UpdateDate", DBNull.Value); } else { idb.AddParameter("@UpdateDate", wH_MaterialType.UpdateDate); } if (wH_MaterialType.DeleteDate == DateTime.MinValue) { idb.AddParameter("@DeleteDate", DBNull.Value); } else { idb.AddParameter("@DeleteDate", wH_MaterialType.DeleteDate); } if (string.IsNullOrEmpty(wH_MaterialType.MT_Itype)) { idb.AddParameter("@MT_Itype", DBNull.Value); } else { idb.AddParameter("@MT_Itype", wH_MaterialType.MT_Itype); } if (string.IsNullOrEmpty(wH_MaterialType.MT_Type)) { idb.AddParameter("@MT_Type", DBNull.Value); } else { idb.AddParameter("@MT_Type", wH_MaterialType.MT_Type); } if (string.IsNullOrEmpty(wH_MaterialType.MT_Employee)) { idb.AddParameter("@MT_Employee", DBNull.Value); } else { idb.AddParameter("@MT_Employee", wH_MaterialType.MT_Employee); } if (string.IsNullOrEmpty(wH_MaterialType.MT_EmployeeName)) { idb.AddParameter("@MT_EmployeeName", DBNull.Value); } else { idb.AddParameter("@MT_EmployeeName", wH_MaterialType.MT_EmployeeName); } if (string.IsNullOrEmpty(wH_MaterialType.MT_TPCode)) { idb.AddParameter("@MT_TPCode", DBNull.Value); } else { idb.AddParameter("@MT_TPCode", wH_MaterialType.MT_TPCode); } if (wH_MaterialType.MT_Order == 0) { idb.AddParameter("@MT_Order", 0); } else { idb.AddParameter("@MT_Order", wH_MaterialType.MT_Order); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加Bse_Station对象(即:一条记录) /// </summary> public int Add(Bse_Station bse_Station) { string sql = "INSERT INTO Bse_Station (SN_Code,SN_Name,SN_AreaCode,SN_AreaName,SN_Mark,SN_Number,SN_Bak,SN_Interval,Stat,CreateTime,UpdateTime,DeleteTime) VALUES (@SN_Code,@SN_Name,@SN_AreaCode,@SN_AreaName,@SN_Mark,@SN_Number,@SN_Bak,@SN_Interval,@Stat,@CreateTime,@UpdateTime,@DeleteTime)"; if (string.IsNullOrEmpty(bse_Station.SN_Code)) { idb.AddParameter("@SN_Code", DBNull.Value); } else { idb.AddParameter("@SN_Code", bse_Station.SN_Code); } if (string.IsNullOrEmpty(bse_Station.SN_Name)) { idb.AddParameter("@SN_Name", DBNull.Value); } else { idb.AddParameter("@SN_Name", bse_Station.SN_Name); } if (string.IsNullOrEmpty(bse_Station.SN_AreaCode)) { idb.AddParameter("@SN_AreaCode", DBNull.Value); } else { idb.AddParameter("@SN_AreaCode", bse_Station.SN_AreaCode); } if (string.IsNullOrEmpty(bse_Station.SN_AreaName)) { idb.AddParameter("@SN_AreaName", DBNull.Value); } else { idb.AddParameter("@SN_AreaName", bse_Station.SN_AreaName); } if (string.IsNullOrEmpty(bse_Station.SN_Mark)) { idb.AddParameter("@SN_Mark", DBNull.Value); } else { idb.AddParameter("@SN_Mark", bse_Station.SN_Mark); } if (string.IsNullOrEmpty(bse_Station.SN_Number)) { idb.AddParameter("@SN_Number", DBNull.Value); } else { idb.AddParameter("@SN_Number", bse_Station.SN_Number); } if (string.IsNullOrEmpty(bse_Station.SN_Bak)) { idb.AddParameter("@SN_Bak", DBNull.Value); } else { idb.AddParameter("@SN_Bak", bse_Station.SN_Bak); } if (bse_Station.SN_Interval == 0) { idb.AddParameter("@SN_Interval", 0); } else { idb.AddParameter("@SN_Interval", bse_Station.SN_Interval); } if (bse_Station.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", bse_Station.Stat); } if (bse_Station.CreateTime == DateTime.MinValue) { idb.AddParameter("@CreateTime", DBNull.Value); } else { idb.AddParameter("@CreateTime", bse_Station.CreateTime); } if (bse_Station.UpdateTime == DateTime.MinValue) { idb.AddParameter("@UpdateTime", DBNull.Value); } else { idb.AddParameter("@UpdateTime", bse_Station.UpdateTime); } if (bse_Station.DeleteTime == DateTime.MinValue) { idb.AddParameter("@DeleteTime", DBNull.Value); } else { idb.AddParameter("@DeleteTime", bse_Station.DeleteTime); } return(idb.ExeCmd(sql)); }
/// <summary> /// 添加Bug日志 Sys_BugLog对象(即:一条记录) /// </summary> public int Add(Sys_BugLog sys_BugLog) { string sql = "INSERT INTO Sys_BugLog (SL_Code,SL_OpUser,SL_Date,SL_Status,SL_Owner,Stat) VALUES (@SL_Code,@SL_OpUser,@SL_Date,@SL_Status,@SL_Owner,@Stat)"; if (string.IsNullOrEmpty(sys_BugLog.SL_Code)) { idb.AddParameter("@SL_Code", DBNull.Value); } else { idb.AddParameter("@SL_Code", sys_BugLog.SL_Code); } if (string.IsNullOrEmpty(sys_BugLog.SL_OpUser)) { idb.AddParameter("@SL_OpUser", DBNull.Value); } else { idb.AddParameter("@SL_OpUser", sys_BugLog.SL_OpUser); } if (sys_BugLog.SL_Date == DateTime.MinValue) { idb.AddParameter("@SL_Date", DBNull.Value); } else { idb.AddParameter("@SL_Date", sys_BugLog.SL_Date); } if (string.IsNullOrEmpty(sys_BugLog.SL_Status)) { idb.AddParameter("@SL_Status", DBNull.Value); } else { idb.AddParameter("@SL_Status", sys_BugLog.SL_Status); } if (string.IsNullOrEmpty(sys_BugLog.SL_Owner)) { idb.AddParameter("@SL_Owner", DBNull.Value); } else { idb.AddParameter("@SL_Owner", sys_BugLog.SL_Owner); } if (sys_BugLog.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", sys_BugLog.Stat); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加GPSRecord对象(即:一条记录) /// </summary> public int Add(GPSRecord gPSRecord) { string sql = "INSERT INTO GPSRecord (License_Plate,Terminal_ID,PlateColor,DataType,GPSTime,Longitude,Latitude,GPSFlag,Speed,Direction,Comm_Type,MDTStatus,MDTAlarm,Data_Length,DataContend,Stat,CreateTime) VALUES (@License_Plate,@Terminal_ID,@PlateColor,@DataType,@GPSTime,@Longitude,@Latitude,@GPSFlag,@Speed,@Direction,@Comm_Type,@MDTStatus,@MDTAlarm,@Data_Length,@DataContend,@Stat,@CreateTime)"; if (string.IsNullOrEmpty(gPSRecord.License_Plate)) { idb.AddParameter("@License_Plate", DBNull.Value); } else { idb.AddParameter("@License_Plate", gPSRecord.License_Plate); } if (string.IsNullOrEmpty(gPSRecord.Terminal_ID)) { idb.AddParameter("@Terminal_ID", DBNull.Value); } else { idb.AddParameter("@Terminal_ID", gPSRecord.Terminal_ID); } if (gPSRecord.PlateColor == 0) { idb.AddParameter("@PlateColor", 0); } else { idb.AddParameter("@PlateColor", gPSRecord.PlateColor); } if (gPSRecord.DataType == 0) { idb.AddParameter("@DataType", 0); } else { idb.AddParameter("@DataType", gPSRecord.DataType); } if (gPSRecord.GPSTime == DateTime.MinValue) { idb.AddParameter("@GPSTime", DBNull.Value); } else { idb.AddParameter("@GPSTime", gPSRecord.GPSTime); } if (gPSRecord.Longitude == 0) { idb.AddParameter("@Longitude", 0); } else { idb.AddParameter("@Longitude", gPSRecord.Longitude); } if (gPSRecord.Latitude == 0) { idb.AddParameter("@Latitude", 0); } else { idb.AddParameter("@Latitude", gPSRecord.Latitude); } if (gPSRecord.GPSFlag == 0) { idb.AddParameter("@GPSFlag", 0); } else { idb.AddParameter("@GPSFlag", gPSRecord.GPSFlag); } if (gPSRecord.Speed == 0) { idb.AddParameter("@Speed", 0); } else { idb.AddParameter("@Speed", gPSRecord.Speed); } if (gPSRecord.Direction == 0) { idb.AddParameter("@Direction", 0); } else { idb.AddParameter("@Direction", gPSRecord.Direction); } if (gPSRecord.Comm_Type == 0) { idb.AddParameter("@Comm_Type", 0); } else { idb.AddParameter("@Comm_Type", gPSRecord.Comm_Type); } if (gPSRecord.MDTStatus == 0) { idb.AddParameter("@MDTStatus", 0); } else { idb.AddParameter("@MDTStatus", gPSRecord.MDTStatus); } if (gPSRecord.MDTAlarm == 0) { idb.AddParameter("@MDTAlarm", 0); } else { idb.AddParameter("@MDTAlarm", gPSRecord.MDTAlarm); } if (gPSRecord.Data_Length == 0) { idb.AddParameter("@Data_Length", 0); } else { idb.AddParameter("@Data_Length", gPSRecord.Data_Length); } if (string.IsNullOrEmpty(gPSRecord.DataContend)) { idb.AddParameter("@DataContend", DBNull.Value); } else { idb.AddParameter("@DataContend", gPSRecord.DataContend); } if (gPSRecord.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", gPSRecord.Stat); } if (gPSRecord.CreateTime == DateTime.MinValue) { idb.AddParameter("@CreateTime", DBNull.Value); } else { idb.AddParameter("@CreateTime", gPSRecord.CreateTime); } return(idb.ExeCmd(sql)); }
/// <summary> /// 添加审核阶段信息 Verify_Nodes对象(即:一条记录) /// </summary> public int Add(Verify_Nodes verify_Nodes) { string sql = "INSERT INTO Verify_Nodes (VerifyNode_Code,VerifyNode_Name,VerifyNode_Remark,VerifyNode_AuditNum,Stat) VALUES (@VerifyNode_Code,@VerifyNode_Name,@VerifyNode_Remark,@VerifyNode_AuditNum,@Stat)"; if (string.IsNullOrEmpty(verify_Nodes.VerifyNode_Code)) { idb.AddParameter("@VerifyNode_Code", DBNull.Value); } else { idb.AddParameter("@VerifyNode_Code", verify_Nodes.VerifyNode_Code); } if (string.IsNullOrEmpty(verify_Nodes.VerifyNode_Name)) { idb.AddParameter("@VerifyNode_Name", DBNull.Value); } else { idb.AddParameter("@VerifyNode_Name", verify_Nodes.VerifyNode_Name); } if (string.IsNullOrEmpty(verify_Nodes.VerifyNode_Remark)) { idb.AddParameter("@VerifyNode_Remark", DBNull.Value); } else { idb.AddParameter("@VerifyNode_Remark", verify_Nodes.VerifyNode_Remark); } if (verify_Nodes.VerifyNode_AuditNum == 0) { idb.AddParameter("@VerifyNode_AuditNum", 0); } else { idb.AddParameter("@VerifyNode_AuditNum", verify_Nodes.VerifyNode_AuditNum); } if (verify_Nodes.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", verify_Nodes.Stat); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加Assets_Apply对象(即:一条记录) /// </summary> public int Add(Assets_Apply assets_Apply) { string sql = "INSERT INTO Assets_Apply (AssetsApply_Code,AssetsApply_AppPerson,AssetsApply_AppDept,AssetsApply_AppName,AssetsApply_Parameter,AssetsApply_Description,AssetsApply_AppCount,AssetsApply_Type,AssetsApply_AppType,AssetsApply_Date,AssetsApply_AudistStat,AssetsApply_Stat,AssetsApply_Remark,Stat) VALUES (@AssetsApply_Code,@AssetsApply_AppPerson,@AssetsApply_AppDept,@AssetsApply_AppName,@AssetsApply_Parameter,@AssetsApply_Description,@AssetsApply_AppCount,@AssetsApply_Type,@AssetsApply_AppType,@AssetsApply_Date,@AssetsApply_AudistStat,@AssetsApply_Stat,@AssetsApply_Remark,@Stat)"; if (string.IsNullOrEmpty(assets_Apply.AssetsApply_Code)) { idb.AddParameter("@AssetsApply_Code", DBNull.Value); } else { idb.AddParameter("@AssetsApply_Code", assets_Apply.AssetsApply_Code); } if (string.IsNullOrEmpty(assets_Apply.AssetsApply_AppPerson)) { idb.AddParameter("@AssetsApply_AppPerson", DBNull.Value); } else { idb.AddParameter("@AssetsApply_AppPerson", assets_Apply.AssetsApply_AppPerson); } if (string.IsNullOrEmpty(assets_Apply.AssetsApply_AppDept)) { idb.AddParameter("@AssetsApply_AppDept", DBNull.Value); } else { idb.AddParameter("@AssetsApply_AppDept", assets_Apply.AssetsApply_AppDept); } if (string.IsNullOrEmpty(assets_Apply.AssetsApply_AppName)) { idb.AddParameter("@AssetsApply_AppName", DBNull.Value); } else { idb.AddParameter("@AssetsApply_AppName", assets_Apply.AssetsApply_AppName); } if (string.IsNullOrEmpty(assets_Apply.AssetsApply_Parameter)) { idb.AddParameter("@AssetsApply_Parameter", DBNull.Value); } else { idb.AddParameter("@AssetsApply_Parameter", assets_Apply.AssetsApply_Parameter); } if (string.IsNullOrEmpty(assets_Apply.AssetsApply_Description)) { idb.AddParameter("@AssetsApply_Description", DBNull.Value); } else { idb.AddParameter("@AssetsApply_Description", assets_Apply.AssetsApply_Description); } if (assets_Apply.AssetsApply_AppCount == 0) { idb.AddParameter("@AssetsApply_AppCount", 0); } else { idb.AddParameter("@AssetsApply_AppCount", assets_Apply.AssetsApply_AppCount); } if (string.IsNullOrEmpty(assets_Apply.AssetsApply_Type)) { idb.AddParameter("@AssetsApply_Type", DBNull.Value); } else { idb.AddParameter("@AssetsApply_Type", assets_Apply.AssetsApply_Type); } if (string.IsNullOrEmpty(assets_Apply.AssetsApply_AppType)) { idb.AddParameter("@AssetsApply_AppType", DBNull.Value); } else { idb.AddParameter("@AssetsApply_AppType", assets_Apply.AssetsApply_AppType); } if (assets_Apply.AssetsApply_Date == DateTime.MinValue) { idb.AddParameter("@AssetsApply_Date", DBNull.Value); } else { idb.AddParameter("@AssetsApply_Date", assets_Apply.AssetsApply_Date); } if (string.IsNullOrEmpty(assets_Apply.AssetsApply_AudistStat)) { idb.AddParameter("@AssetsApply_AudistStat", DBNull.Value); } else { idb.AddParameter("@AssetsApply_AudistStat", assets_Apply.AssetsApply_AudistStat); } if (string.IsNullOrEmpty(assets_Apply.AssetsApply_Stat)) { idb.AddParameter("@AssetsApply_Stat", DBNull.Value); } else { idb.AddParameter("@AssetsApply_Stat", assets_Apply.AssetsApply_Stat); } if (string.IsNullOrEmpty(assets_Apply.AssetsApply_Remark)) { idb.AddParameter("@AssetsApply_Remark", DBNull.Value); } else { idb.AddParameter("@AssetsApply_Remark", assets_Apply.AssetsApply_Remark); } if (assets_Apply.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", assets_Apply.Stat); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加外联协调信息 Outreach_Coordination对象(即:一条记录) /// </summary> public int Add(Outreach_Coordination outreach_Coordination) { string sql = "INSERT INTO Outreach_Coordination (OC_Code,OC_OutretachCode,OC_OutreachName,OC_CoordinationType,OC_MainContactor,OC_Telephone,OC_Content,OC_Result,OC_ResultType,OC_Cost,OC_Remark,OC_Attachment,OC_Company,OC_Dept,OC_iType,Stat,CreateDate,UpdateDate,DeleteDate) VALUES (@OC_Code,@OC_OutretachCode,@OC_OutreachName,@OC_CoordinationType,@OC_MainContactor,@OC_Telephone,@OC_Content,@OC_Result,@OC_ResultType,@OC_Cost,@OC_Remark,@OC_Attachment,@OC_Company,@OC_Dept,@OC_iType,@Stat,@CreateDate,@UpdateDate,@DeleteDate)"; if (string.IsNullOrEmpty(outreach_Coordination.OC_Code)) { idb.AddParameter("@OC_Code", DBNull.Value); } else { idb.AddParameter("@OC_Code", outreach_Coordination.OC_Code); } if (string.IsNullOrEmpty(outreach_Coordination.OC_OutretachCode)) { idb.AddParameter("@OC_OutretachCode", DBNull.Value); } else { idb.AddParameter("@OC_OutretachCode", outreach_Coordination.OC_OutretachCode); } if (string.IsNullOrEmpty(outreach_Coordination.OC_OutreachName)) { idb.AddParameter("@OC_OutreachName", DBNull.Value); } else { idb.AddParameter("@OC_OutreachName", outreach_Coordination.OC_OutreachName); } if (string.IsNullOrEmpty(outreach_Coordination.OC_CoordinationType)) { idb.AddParameter("@OC_CoordinationType", DBNull.Value); } else { idb.AddParameter("@OC_CoordinationType", outreach_Coordination.OC_CoordinationType); } if (string.IsNullOrEmpty(outreach_Coordination.OC_MainContactor)) { idb.AddParameter("@OC_MainContactor", DBNull.Value); } else { idb.AddParameter("@OC_MainContactor", outreach_Coordination.OC_MainContactor); } if (string.IsNullOrEmpty(outreach_Coordination.OC_Telephone)) { idb.AddParameter("@OC_Telephone", DBNull.Value); } else { idb.AddParameter("@OC_Telephone", outreach_Coordination.OC_Telephone); } if (string.IsNullOrEmpty(outreach_Coordination.OC_Content)) { idb.AddParameter("@OC_Content", DBNull.Value); } else { idb.AddParameter("@OC_Content", outreach_Coordination.OC_Content); } if (string.IsNullOrEmpty(outreach_Coordination.OC_Result)) { idb.AddParameter("@OC_Result", DBNull.Value); } else { idb.AddParameter("@OC_Result", outreach_Coordination.OC_Result); } if (string.IsNullOrEmpty(outreach_Coordination.OC_ResultType)) { idb.AddParameter("@OC_ResultType", DBNull.Value); } else { idb.AddParameter("@OC_ResultType", outreach_Coordination.OC_ResultType); } if (outreach_Coordination.OC_Cost == 0) { idb.AddParameter("@OC_Cost", 0); } else { idb.AddParameter("@OC_Cost", outreach_Coordination.OC_Cost); } if (string.IsNullOrEmpty(outreach_Coordination.OC_Remark)) { idb.AddParameter("@OC_Remark", DBNull.Value); } else { idb.AddParameter("@OC_Remark", outreach_Coordination.OC_Remark); } if (string.IsNullOrEmpty(outreach_Coordination.OC_Attachment)) { idb.AddParameter("@OC_Attachment", DBNull.Value); } else { idb.AddParameter("@OC_Attachment", outreach_Coordination.OC_Attachment); } if (string.IsNullOrEmpty(outreach_Coordination.OC_Company)) { idb.AddParameter("@OC_Company", DBNull.Value); } else { idb.AddParameter("@OC_Company", outreach_Coordination.OC_Company); } if (string.IsNullOrEmpty(outreach_Coordination.OC_Dept)) { idb.AddParameter("@OC_Dept", DBNull.Value); } else { idb.AddParameter("@OC_Dept", outreach_Coordination.OC_Dept); } if (string.IsNullOrEmpty(outreach_Coordination.OC_iType)) { idb.AddParameter("@OC_iType", DBNull.Value); } else { idb.AddParameter("@OC_iType", outreach_Coordination.OC_iType); } if (outreach_Coordination.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", outreach_Coordination.Stat); } if (outreach_Coordination.CreateDate == DateTime.MinValue) { idb.AddParameter("@CreateDate", DBNull.Value); } else { idb.AddParameter("@CreateDate", outreach_Coordination.CreateDate); } if (outreach_Coordination.UpdateDate == DateTime.MinValue) { idb.AddParameter("@UpdateDate", DBNull.Value); } else { idb.AddParameter("@UpdateDate", outreach_Coordination.UpdateDate); } if (outreach_Coordination.DeleteDate == DateTime.MinValue) { idb.AddParameter("@DeleteDate", DBNull.Value); } else { idb.AddParameter("@DeleteDate", outreach_Coordination.DeleteDate); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加通用参考主表 Sys_Config_Refer对象(即:一条记录) /// </summary> public int Add(Sys_Config_Refer sys_Config_Refer) { string sql = "INSERT INTO Sys_Config_Refer (R_ModuleName,R_NameSpace,R_Title,R_Width,R_Height,Stat,R_TableName,R_FilterSql,R_SQL,R_Url) VALUES (@R_ModuleName,@R_NameSpace,@R_Title,@R_Width,@R_Height,@Stat,@R_TableName,@R_FilterSql,@R_SQL,@R_Url)"; if (string.IsNullOrEmpty(sys_Config_Refer.R_ModuleName)) { idb.AddParameter("@R_ModuleName", DBNull.Value); } else { idb.AddParameter("@R_ModuleName", sys_Config_Refer.R_ModuleName); } if (string.IsNullOrEmpty(sys_Config_Refer.R_NameSpace)) { idb.AddParameter("@R_NameSpace", DBNull.Value); } else { idb.AddParameter("@R_NameSpace", sys_Config_Refer.R_NameSpace); } if (string.IsNullOrEmpty(sys_Config_Refer.R_Title)) { idb.AddParameter("@R_Title", DBNull.Value); } else { idb.AddParameter("@R_Title", sys_Config_Refer.R_Title); } if (sys_Config_Refer.R_Width == 0) { idb.AddParameter("@R_Width", 0); } else { idb.AddParameter("@R_Width", sys_Config_Refer.R_Width); } if (sys_Config_Refer.R_Height == 0) { idb.AddParameter("@R_Height", 0); } else { idb.AddParameter("@R_Height", sys_Config_Refer.R_Height); } if (sys_Config_Refer.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", sys_Config_Refer.Stat); } if (string.IsNullOrEmpty(sys_Config_Refer.R_TableName)) { idb.AddParameter("@R_TableName", DBNull.Value); } else { idb.AddParameter("@R_TableName", sys_Config_Refer.R_TableName); } if (string.IsNullOrEmpty(sys_Config_Refer.R_FilterSql)) { idb.AddParameter("@R_FilterSql", DBNull.Value); } else { idb.AddParameter("@R_FilterSql", sys_Config_Refer.R_FilterSql); } if (string.IsNullOrEmpty(sys_Config_Refer.R_SQL)) { idb.AddParameter("@R_SQL", DBNull.Value); } else { idb.AddParameter("@R_SQL", sys_Config_Refer.R_SQL); } if (string.IsNullOrEmpty(sys_Config_Refer.R_Url)) { idb.AddParameter("@R_Url", DBNull.Value); } else { idb.AddParameter("@R_Url", sys_Config_Refer.R_Url); } return(idb.ExeCmd(sql)); }
/// <summary> /// 添加Sys_LoginLog Sys_LoginLog对象(即:一条记录) /// </summary> public int Add(Sys_LoginLog sys_LoginLog) { string sql = "INSERT INTO Sys_LoginLog (EL_Date,EL_IP,EL_Mac,EL_Success,EL_UserCode,EL_UserName,EL_Dept,EL_Company,EL_CancleDate,Stat) VALUES (@EL_Date,@EL_IP,@EL_Mac,@EL_Success,@EL_UserCode,@EL_UserName,@EL_Dept,@EL_Company,@EL_CancleDate,@Stat)"; if (sys_LoginLog.EL_Date == DateTime.MinValue) { idb.AddParameter("@EL_Date", DBNull.Value); } else { idb.AddParameter("@EL_Date", sys_LoginLog.EL_Date); } if (string.IsNullOrEmpty(sys_LoginLog.EL_IP)) { idb.AddParameter("@EL_IP", DBNull.Value); } else { idb.AddParameter("@EL_IP", sys_LoginLog.EL_IP); } if (string.IsNullOrEmpty(sys_LoginLog.EL_Mac)) { idb.AddParameter("@EL_Mac", DBNull.Value); } else { idb.AddParameter("@EL_Mac", sys_LoginLog.EL_Mac); } if (string.IsNullOrEmpty(sys_LoginLog.EL_Success)) { idb.AddParameter("@EL_Success", DBNull.Value); } else { idb.AddParameter("@EL_Success", sys_LoginLog.EL_Success); } if (string.IsNullOrEmpty(sys_LoginLog.EL_UserCode)) { idb.AddParameter("@EL_UserCode", DBNull.Value); } else { idb.AddParameter("@EL_UserCode", sys_LoginLog.EL_UserCode); } if (string.IsNullOrEmpty(sys_LoginLog.EL_UserName)) { idb.AddParameter("@EL_UserName", DBNull.Value); } else { idb.AddParameter("@EL_UserName", sys_LoginLog.EL_UserName); } if (string.IsNullOrEmpty(sys_LoginLog.EL_Dept)) { idb.AddParameter("@EL_Dept", DBNull.Value); } else { idb.AddParameter("@EL_Dept", sys_LoginLog.EL_Dept); } if (string.IsNullOrEmpty(sys_LoginLog.EL_Company)) { idb.AddParameter("@EL_Company", DBNull.Value); } else { idb.AddParameter("@EL_Company", sys_LoginLog.EL_Company); } if (sys_LoginLog.EL_CancleDate == DateTime.MinValue) { idb.AddParameter("@EL_CancleDate", DBNull.Value); } else { idb.AddParameter("@EL_CancleDate", sys_LoginLog.EL_CancleDate); } if (sys_LoginLog.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", sys_LoginLog.Stat); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }
/// <summary> /// 添加车辆事件表 PCT_Event对象(即:一条记录) /// </summary> public int Add(PCT_Event pCT_Event) { string sql = "INSERT INTO PCT_Event (PCTE_Code,PCTE_CCode,PCTE_CNo,PCTE_Description,PCTE_BeginDate,PCTE_EndDate,PCTE_EventType,PCTE_DCode,PCTE_Join,PCTE_Cost,PCTE_Before,PCTE_After,PCTE_Address,Stat,CreateDate,UpdateDate,DeleteDate,PCTE_iType,PCTE_TCode,PCTE_Udef2,PCTE_Udef3,PCTE_Udef4,PCTE_Udef5) VALUES (@PCTE_Code,@PCTE_CCode,@PCTE_CNo,@PCTE_Description,@PCTE_BeginDate,@PCTE_EndDate,@PCTE_EventType,@PCTE_DCode,@PCTE_Join,@PCTE_Cost,@PCTE_Before,@PCTE_After,@PCTE_Address,@Stat,@CreateDate,@UpdateDate,@DeleteDate,@PCTE_iType,@PCTE_TCode,@PCTE_Udef2,@PCTE_Udef3,@PCTE_Udef4,@PCTE_Udef5)"; if (string.IsNullOrEmpty(pCT_Event.PCTE_Code)) { idb.AddParameter("@PCTE_Code", DBNull.Value); } else { idb.AddParameter("@PCTE_Code", pCT_Event.PCTE_Code); } if (string.IsNullOrEmpty(pCT_Event.PCTE_CCode)) { idb.AddParameter("@PCTE_CCode", DBNull.Value); } else { idb.AddParameter("@PCTE_CCode", pCT_Event.PCTE_CCode); } if (string.IsNullOrEmpty(pCT_Event.PCTE_CNo)) { idb.AddParameter("@PCTE_CNo", DBNull.Value); } else { idb.AddParameter("@PCTE_CNo", pCT_Event.PCTE_CNo); } if (string.IsNullOrEmpty(pCT_Event.PCTE_Description)) { idb.AddParameter("@PCTE_Description", DBNull.Value); } else { idb.AddParameter("@PCTE_Description", pCT_Event.PCTE_Description); } if (pCT_Event.PCTE_BeginDate == DateTime.MinValue) { idb.AddParameter("@PCTE_BeginDate", DBNull.Value); } else { idb.AddParameter("@PCTE_BeginDate", pCT_Event.PCTE_BeginDate); } if (pCT_Event.PCTE_EndDate == DateTime.MinValue) { idb.AddParameter("@PCTE_EndDate", DBNull.Value); } else { idb.AddParameter("@PCTE_EndDate", pCT_Event.PCTE_EndDate); } if (string.IsNullOrEmpty(pCT_Event.PCTE_EventType)) { idb.AddParameter("@PCTE_EventType", DBNull.Value); } else { idb.AddParameter("@PCTE_EventType", pCT_Event.PCTE_EventType); } if (string.IsNullOrEmpty(pCT_Event.PCTE_DCode)) { idb.AddParameter("@PCTE_DCode", DBNull.Value); } else { idb.AddParameter("@PCTE_DCode", pCT_Event.PCTE_DCode); } if (string.IsNullOrEmpty(pCT_Event.PCTE_Join)) { idb.AddParameter("@PCTE_Join", DBNull.Value); } else { idb.AddParameter("@PCTE_Join", pCT_Event.PCTE_Join); } if (pCT_Event.PCTE_Cost == 0) { idb.AddParameter("@PCTE_Cost", 0); } else { idb.AddParameter("@PCTE_Cost", pCT_Event.PCTE_Cost); } if (pCT_Event.PCTE_Before == 0) { idb.AddParameter("@PCTE_Before", 0); } else { idb.AddParameter("@PCTE_Before", pCT_Event.PCTE_Before); } if (pCT_Event.PCTE_After == 0) { idb.AddParameter("@PCTE_After", 0); } else { idb.AddParameter("@PCTE_After", pCT_Event.PCTE_After); } if (string.IsNullOrEmpty(pCT_Event.PCTE_Address)) { idb.AddParameter("@PCTE_Address", DBNull.Value); } else { idb.AddParameter("@PCTE_Address", pCT_Event.PCTE_Address); } if (pCT_Event.Stat == 0) { idb.AddParameter("@Stat", 0); } else { idb.AddParameter("@Stat", pCT_Event.Stat); } if (pCT_Event.CreateDate == DateTime.MinValue) { idb.AddParameter("@CreateDate", DBNull.Value); } else { idb.AddParameter("@CreateDate", pCT_Event.CreateDate); } if (pCT_Event.UpdateDate == DateTime.MinValue) { idb.AddParameter("@UpdateDate", DBNull.Value); } else { idb.AddParameter("@UpdateDate", pCT_Event.UpdateDate); } if (pCT_Event.DeleteDate == DateTime.MinValue) { idb.AddParameter("@DeleteDate", DBNull.Value); } else { idb.AddParameter("@DeleteDate", pCT_Event.DeleteDate); } if (string.IsNullOrEmpty(pCT_Event.PCTE_iType)) { idb.AddParameter("@PCTE_iType", DBNull.Value); } else { idb.AddParameter("@PCTE_iType", pCT_Event.PCTE_iType); } if (string.IsNullOrEmpty(pCT_Event.PCTE_TCode)) { idb.AddParameter("@PCTE_TCode", DBNull.Value); } else { idb.AddParameter("@PCTE_TCode", pCT_Event.PCTE_TCode); } if (string.IsNullOrEmpty(pCT_Event.PCTE_Udef2)) { idb.AddParameter("@PCTE_Udef2", DBNull.Value); } else { idb.AddParameter("@PCTE_Udef2", pCT_Event.PCTE_Udef2); } if (string.IsNullOrEmpty(pCT_Event.PCTE_Udef3)) { idb.AddParameter("@PCTE_Udef3", DBNull.Value); } else { idb.AddParameter("@PCTE_Udef3", pCT_Event.PCTE_Udef3); } if (string.IsNullOrEmpty(pCT_Event.PCTE_Udef4)) { idb.AddParameter("@PCTE_Udef4", DBNull.Value); } else { idb.AddParameter("@PCTE_Udef4", pCT_Event.PCTE_Udef4); } if (string.IsNullOrEmpty(pCT_Event.PCTE_Udef5)) { idb.AddParameter("@PCTE_Udef5", DBNull.Value); } else { idb.AddParameter("@PCTE_Udef5", pCT_Event.PCTE_Udef5); } int Re = 0; //SQL日志记录 var RunMethod = System.Reflection.MethodBase.GetCurrentMethod(); System.Collections.Hashtable param = new System.Collections.Hashtable(); string Ex = "0"; foreach (System.Collections.DictionaryEntry item in idb.GetParameters()) { param.Add(item.Key, item.Value); } try { Re = idb.ExeCmd(sql); Ex = Re.ToString(); } catch (Exception ex) { Ex = ex.Message; } SysRunLog.InsertRunSql(sql, param, RunMethod.DeclaringType + "." + RunMethod.Name, Ex); return(Re); }