Ejemplo n.º 1
0
        /// <summary>
        /// 添加系统消息处理日志 Sys_AnnoceLog对象(即:一条记录)
        /// </summary>
        public int Add(Sys_AnnoceLog sys_AnnoceLog)
        {
            string sql = "INSERT INTO Sys_AnnoceLog (EL_UserCode,EL_Date,EL_IP) VALUES (@EL_UserCode,@EL_Date,@EL_IP)";

            if (string.IsNullOrEmpty(sys_AnnoceLog.EL_UserCode))
            {
                idb.AddParameter("@EL_UserCode", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@EL_UserCode", sys_AnnoceLog.EL_UserCode);
            }
            if (sys_AnnoceLog.EL_Date == DateTime.MinValue)
            {
                idb.AddParameter("@EL_Date", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@EL_Date", sys_AnnoceLog.EL_Date);
            }
            if (string.IsNullOrEmpty(sys_AnnoceLog.EL_IP))
            {
                idb.AddParameter("@EL_IP", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@EL_IP", sys_AnnoceLog.EL_IP);
            }


            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);
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
        /// <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);
        }
Ejemplo n.º 4
0
        /// <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);
        }
Ejemplo n.º 5
0
        /// <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);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 添加摆饰植物更换列表 PlantChanged_Record对象(即:一条记录)
        /// </summary>
        public int Add(PlantChanged_Record plantChanged_Record)
        {
            string sql = "INSERT INTO PlantChanged_Record (PCR_Code,PCR_Date,PCR_Dept,PCR_Company,PCR_OldName,PCR_NewName,PCR_Price,PCR_Count,PCR_Cost,PCR_Operator,PCR_Remark,Stat,CreateDate,UpdateDate,DeleteDate,PR_Position) VALUES (@PCR_Code,@PCR_Date,@PCR_Dept,@PCR_Company,@PCR_OldName,@PCR_NewName,@PCR_Price,@PCR_Count,@PCR_Cost,@PCR_Operator,@PCR_Remark,@Stat,@CreateDate,@UpdateDate,@DeleteDate,@PR_Position)";

            if (string.IsNullOrEmpty(plantChanged_Record.PCR_Code))
            {
                idb.AddParameter("@PCR_Code", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@PCR_Code", plantChanged_Record.PCR_Code);
            }
            if (plantChanged_Record.PCR_Date == DateTime.MinValue)
            {
                idb.AddParameter("@PCR_Date", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@PCR_Date", plantChanged_Record.PCR_Date);
            }
            if (string.IsNullOrEmpty(plantChanged_Record.PCR_Dept))
            {
                idb.AddParameter("@PCR_Dept", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@PCR_Dept", plantChanged_Record.PCR_Dept);
            }
            if (string.IsNullOrEmpty(plantChanged_Record.PCR_Company))
            {
                idb.AddParameter("@PCR_Company", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@PCR_Company", plantChanged_Record.PCR_Company);
            }
            if (string.IsNullOrEmpty(plantChanged_Record.PCR_OldName))
            {
                idb.AddParameter("@PCR_OldName", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@PCR_OldName", plantChanged_Record.PCR_OldName);
            }
            if (string.IsNullOrEmpty(plantChanged_Record.PCR_NewName))
            {
                idb.AddParameter("@PCR_NewName", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@PCR_NewName", plantChanged_Record.PCR_NewName);
            }
            if (plantChanged_Record.PCR_Price == 0)
            {
                idb.AddParameter("@PCR_Price", 0);
            }
            else
            {
                idb.AddParameter("@PCR_Price", plantChanged_Record.PCR_Price);
            }
            if (plantChanged_Record.PCR_Count == 0)
            {
                idb.AddParameter("@PCR_Count", 0);
            }
            else
            {
                idb.AddParameter("@PCR_Count", plantChanged_Record.PCR_Count);
            }
            if (plantChanged_Record.PCR_Cost == 0)
            {
                idb.AddParameter("@PCR_Cost", 0);
            }
            else
            {
                idb.AddParameter("@PCR_Cost", plantChanged_Record.PCR_Cost);
            }
            if (string.IsNullOrEmpty(plantChanged_Record.PCR_Operator))
            {
                idb.AddParameter("@PCR_Operator", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@PCR_Operator", plantChanged_Record.PCR_Operator);
            }
            if (string.IsNullOrEmpty(plantChanged_Record.PCR_Remark))
            {
                idb.AddParameter("@PCR_Remark", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@PCR_Remark", plantChanged_Record.PCR_Remark);
            }
            if (plantChanged_Record.Stat == 0)
            {
                idb.AddParameter("@Stat", 0);
            }
            else
            {
                idb.AddParameter("@Stat", plantChanged_Record.Stat);
            }
            if (plantChanged_Record.CreateDate == DateTime.MinValue)
            {
                idb.AddParameter("@CreateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CreateDate", plantChanged_Record.CreateDate);
            }
            if (plantChanged_Record.UpdateDate == DateTime.MinValue)
            {
                idb.AddParameter("@UpdateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@UpdateDate", plantChanged_Record.UpdateDate);
            }
            if (plantChanged_Record.DeleteDate == DateTime.MinValue)
            {
                idb.AddParameter("@DeleteDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@DeleteDate", plantChanged_Record.DeleteDate);
            }
            if (string.IsNullOrEmpty(plantChanged_Record.PR_Position))
            {
                idb.AddParameter("@PR_Position", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@PR_Position", plantChanged_Record.PR_Position);
            }


            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);
        }
Ejemplo n.º 7
0
        /// <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);
        }
Ejemplo n.º 8
0
        /// <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);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 添加Bug管理系统 Sys_Bug对象(即:一条记录)
        /// </summary>
        public int Add(Sys_Bug sys_Bug)
        {
            string sql = "INSERT INTO Sys_Bug (Sys_Code,Sys_Date,Sys_Title,Sys_Des,Sys_Project,Sys_Module,Sys_UserCode,Sys_UserName,Sys_Owner,Sys_OpUser,Sys_Status,Stat) VALUES (@Sys_Code,@Sys_Date,@Sys_Title,@Sys_Des,@Sys_Project,@Sys_Module,@Sys_UserCode,@Sys_UserName,@Sys_Owner,@Sys_OpUser,@Sys_Status,@Stat)";

            if (string.IsNullOrEmpty(sys_Bug.Sys_Code))
            {
                idb.AddParameter("@Sys_Code", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_Code", sys_Bug.Sys_Code);
            }
            if (sys_Bug.Sys_Date == DateTime.MinValue)
            {
                idb.AddParameter("@Sys_Date", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_Date", sys_Bug.Sys_Date);
            }
            if (string.IsNullOrEmpty(sys_Bug.Sys_Title))
            {
                idb.AddParameter("@Sys_Title", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_Title", sys_Bug.Sys_Title);
            }
            if (string.IsNullOrEmpty(sys_Bug.Sys_Des))
            {
                idb.AddParameter("@Sys_Des", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_Des", sys_Bug.Sys_Des);
            }
            if (string.IsNullOrEmpty(sys_Bug.Sys_Project))
            {
                idb.AddParameter("@Sys_Project", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_Project", sys_Bug.Sys_Project);
            }
            if (string.IsNullOrEmpty(sys_Bug.Sys_Module))
            {
                idb.AddParameter("@Sys_Module", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_Module", sys_Bug.Sys_Module);
            }
            if (string.IsNullOrEmpty(sys_Bug.Sys_UserCode))
            {
                idb.AddParameter("@Sys_UserCode", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_UserCode", sys_Bug.Sys_UserCode);
            }
            if (string.IsNullOrEmpty(sys_Bug.Sys_UserName))
            {
                idb.AddParameter("@Sys_UserName", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_UserName", sys_Bug.Sys_UserName);
            }
            if (string.IsNullOrEmpty(sys_Bug.Sys_Owner))
            {
                idb.AddParameter("@Sys_Owner", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_Owner", sys_Bug.Sys_Owner);
            }
            if (string.IsNullOrEmpty(sys_Bug.Sys_OpUser))
            {
                idb.AddParameter("@Sys_OpUser", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_OpUser", sys_Bug.Sys_OpUser);
            }
            if (string.IsNullOrEmpty(sys_Bug.Sys_Status))
            {
                idb.AddParameter("@Sys_Status", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Sys_Status", sys_Bug.Sys_Status);
            }
            if (sys_Bug.Stat == 0)
            {
                idb.AddParameter("@Stat", 0);
            }
            else
            {
                idb.AddParameter("@Stat", sys_Bug.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);
        }
Ejemplo n.º 10
0
        /// <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);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 添加考勤信息 HR_TimeSheet对象(即:一条记录)
        /// </summary>
        public int Add(HR_TimeSheet hR_TimeSheet)
        {
            string sql = "INSERT INTO HR_TimeSheet (TS_Code,TS_StuffName,TS_StuffCode,TS_Type,TS_TypeName,TS_Start,TS_End,TS_Total,TS_Matter,Creator,CreateTime,VerifyStat,VerifyDate,VerifyStuff,VerifyNext,Stat,CreateDate,UpdateDate,DeleteDate) VALUES (@TS_Code,@TS_StuffName,@TS_StuffCode,@TS_Type,@TS_TypeName,@TS_Start,@TS_End,@TS_Total,@TS_Matter,@Creator,@CreateTime,@VerifyStat,@VerifyDate,@VerifyStuff,@VerifyNext,@Stat,@CreateDate,@UpdateDate,@DeleteDate)";

            if (string.IsNullOrEmpty(hR_TimeSheet.TS_Code))
            {
                idb.AddParameter("@TS_Code", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TS_Code", hR_TimeSheet.TS_Code);
            }
            if (string.IsNullOrEmpty(hR_TimeSheet.TS_StuffName))
            {
                idb.AddParameter("@TS_StuffName", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TS_StuffName", hR_TimeSheet.TS_StuffName);
            }
            if (string.IsNullOrEmpty(hR_TimeSheet.TS_StuffCode))
            {
                idb.AddParameter("@TS_StuffCode", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TS_StuffCode", hR_TimeSheet.TS_StuffCode);
            }
            if (string.IsNullOrEmpty(hR_TimeSheet.TS_Type))
            {
                idb.AddParameter("@TS_Type", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TS_Type", hR_TimeSheet.TS_Type);
            }
            if (string.IsNullOrEmpty(hR_TimeSheet.TS_TypeName))
            {
                idb.AddParameter("@TS_TypeName", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TS_TypeName", hR_TimeSheet.TS_TypeName);
            }
            if (hR_TimeSheet.TS_Start == DateTime.MinValue)
            {
                idb.AddParameter("@TS_Start", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TS_Start", hR_TimeSheet.TS_Start);
            }
            if (hR_TimeSheet.TS_End == DateTime.MinValue)
            {
                idb.AddParameter("@TS_End", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TS_End", hR_TimeSheet.TS_End);
            }
            if (hR_TimeSheet.TS_Total == 0)
            {
                idb.AddParameter("@TS_Total", 0);
            }
            else
            {
                idb.AddParameter("@TS_Total", hR_TimeSheet.TS_Total);
            }
            if (string.IsNullOrEmpty(hR_TimeSheet.TS_Matter))
            {
                idb.AddParameter("@TS_Matter", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TS_Matter", hR_TimeSheet.TS_Matter);
            }
            if (string.IsNullOrEmpty(hR_TimeSheet.Creator))
            {
                idb.AddParameter("@Creator", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Creator", hR_TimeSheet.Creator);
            }
            if (hR_TimeSheet.CreateTime == DateTime.MinValue)
            {
                idb.AddParameter("@CreateTime", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CreateTime", hR_TimeSheet.CreateTime);
            }
            if (string.IsNullOrEmpty(hR_TimeSheet.VerifyStat))
            {
                idb.AddParameter("@VerifyStat", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@VerifyStat", hR_TimeSheet.VerifyStat);
            }
            if (hR_TimeSheet.VerifyDate == DateTime.MinValue)
            {
                idb.AddParameter("@VerifyDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@VerifyDate", hR_TimeSheet.VerifyDate);
            }
            if (string.IsNullOrEmpty(hR_TimeSheet.VerifyStuff))
            {
                idb.AddParameter("@VerifyStuff", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@VerifyStuff", hR_TimeSheet.VerifyStuff);
            }
            if (string.IsNullOrEmpty(hR_TimeSheet.VerifyNext))
            {
                idb.AddParameter("@VerifyNext", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@VerifyNext", hR_TimeSheet.VerifyNext);
            }
            if (hR_TimeSheet.Stat == 0)
            {
                idb.AddParameter("@Stat", 0);
            }
            else
            {
                idb.AddParameter("@Stat", hR_TimeSheet.Stat);
            }
            if (hR_TimeSheet.CreateDate == DateTime.MinValue)
            {
                idb.AddParameter("@CreateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CreateDate", hR_TimeSheet.CreateDate);
            }
            if (hR_TimeSheet.UpdateDate == DateTime.MinValue)
            {
                idb.AddParameter("@UpdateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@UpdateDate", hR_TimeSheet.UpdateDate);
            }
            if (hR_TimeSheet.DeleteDate == DateTime.MinValue)
            {
                idb.AddParameter("@DeleteDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@DeleteDate", hR_TimeSheet.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);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 添加计量信息 Measure_Details对象(即:一条记录)
        /// </summary>
        public int Add(Measure_Details measure_Details)
        {
            string sql = "INSERT INTO Measure_Details (Measure_Code,Measure_LoadometerCode,Measure_ItemName,Measure_Item,Measure_Result,Measure_Remark,Stat,CreateDate,UpdateDate,DeleteDate) VALUES (@Measure_Code,@Measure_LoadometerCode,@Measure_ItemName,@Measure_Item,@Measure_Result,@Measure_Remark,@Stat,@CreateDate,@UpdateDate,@DeleteDate)";

            if (string.IsNullOrEmpty(measure_Details.Measure_Code))
            {
                idb.AddParameter("@Measure_Code", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Measure_Code", measure_Details.Measure_Code);
            }
            if (string.IsNullOrEmpty(measure_Details.Measure_LoadometerCode))
            {
                idb.AddParameter("@Measure_LoadometerCode", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Measure_LoadometerCode", measure_Details.Measure_LoadometerCode);
            }
            if (string.IsNullOrEmpty(measure_Details.Measure_ItemName))
            {
                idb.AddParameter("@Measure_ItemName", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Measure_ItemName", measure_Details.Measure_ItemName);
            }
            if (string.IsNullOrEmpty(measure_Details.Measure_Item))
            {
                idb.AddParameter("@Measure_Item", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Measure_Item", measure_Details.Measure_Item);
            }
            if (measure_Details.Measure_Result == 0)
            {
                idb.AddParameter("@Measure_Result", 0);
            }
            else
            {
                idb.AddParameter("@Measure_Result", measure_Details.Measure_Result);
            }
            if (string.IsNullOrEmpty(measure_Details.Measure_Remark))
            {
                idb.AddParameter("@Measure_Remark", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Measure_Remark", measure_Details.Measure_Remark);
            }
            if (measure_Details.Stat == 0)
            {
                idb.AddParameter("@Stat", 0);
            }
            else
            {
                idb.AddParameter("@Stat", measure_Details.Stat);
            }
            if (measure_Details.CreateDate == DateTime.MinValue)
            {
                idb.AddParameter("@CreateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CreateDate", measure_Details.CreateDate);
            }
            if (measure_Details.UpdateDate == DateTime.MinValue)
            {
                idb.AddParameter("@UpdateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@UpdateDate", measure_Details.UpdateDate);
            }
            if (measure_Details.DeleteDate == DateTime.MinValue)
            {
                idb.AddParameter("@DeleteDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@DeleteDate", measure_Details.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);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 添加TC_SJComp对象(即:一条记录)
        /// </summary>
        public int Add(TC_SJComp tC_SJComp)
        {
            string sql = "INSERT INTO TC_SJComp (TCJ_Code,TCJ_Name,TCJ_PLine,TCJ_Stat,Stat,CreateDate,UpdateDate,DeleteDate,TCJ_Udef1,TCJ_Udef2,TCJ_Udef3,TCJ_Udef4,TCJ_Udef5) VALUES (@TCJ_Code,@TCJ_Name,@TCJ_PLine,@TCJ_Stat,@Stat,@CreateDate,@UpdateDate,@DeleteDate,@TCJ_Udef1,@TCJ_Udef2,@TCJ_Udef3,@TCJ_Udef4,@TCJ_Udef5)";

            if (string.IsNullOrEmpty(tC_SJComp.TCJ_Code))
            {
                idb.AddParameter("@TCJ_Code", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TCJ_Code", tC_SJComp.TCJ_Code);
            }
            if (string.IsNullOrEmpty(tC_SJComp.TCJ_Name))
            {
                idb.AddParameter("@TCJ_Name", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TCJ_Name", tC_SJComp.TCJ_Name);
            }
            if (string.IsNullOrEmpty(tC_SJComp.TCJ_PLine))
            {
                idb.AddParameter("@TCJ_PLine", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TCJ_PLine", tC_SJComp.TCJ_PLine);
            }
            if (string.IsNullOrEmpty(tC_SJComp.TCJ_Stat))
            {
                idb.AddParameter("@TCJ_Stat", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TCJ_Stat", tC_SJComp.TCJ_Stat);
            }
            if (tC_SJComp.Stat == 0)
            {
                idb.AddParameter("@Stat", 0);
            }
            else
            {
                idb.AddParameter("@Stat", tC_SJComp.Stat);
            }
            if (tC_SJComp.CreateDate == DateTime.MinValue)
            {
                idb.AddParameter("@CreateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CreateDate", tC_SJComp.CreateDate);
            }
            if (tC_SJComp.UpdateDate == DateTime.MinValue)
            {
                idb.AddParameter("@UpdateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@UpdateDate", tC_SJComp.UpdateDate);
            }
            if (tC_SJComp.DeleteDate == DateTime.MinValue)
            {
                idb.AddParameter("@DeleteDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@DeleteDate", tC_SJComp.DeleteDate);
            }
            if (string.IsNullOrEmpty(tC_SJComp.TCJ_Udef1))
            {
                idb.AddParameter("@TCJ_Udef1", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TCJ_Udef1", tC_SJComp.TCJ_Udef1);
            }
            if (string.IsNullOrEmpty(tC_SJComp.TCJ_Udef2))
            {
                idb.AddParameter("@TCJ_Udef2", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TCJ_Udef2", tC_SJComp.TCJ_Udef2);
            }
            if (string.IsNullOrEmpty(tC_SJComp.TCJ_Udef3))
            {
                idb.AddParameter("@TCJ_Udef3", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TCJ_Udef3", tC_SJComp.TCJ_Udef3);
            }
            if (string.IsNullOrEmpty(tC_SJComp.TCJ_Udef4))
            {
                idb.AddParameter("@TCJ_Udef4", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TCJ_Udef4", tC_SJComp.TCJ_Udef4);
            }
            if (string.IsNullOrEmpty(tC_SJComp.TCJ_Udef5))
            {
                idb.AddParameter("@TCJ_Udef5", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@TCJ_Udef5", tC_SJComp.TCJ_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);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 添加租赁房屋使用明细 House_Usage对象(即:一条记录)
        /// </summary>
        public int Add(House_Usage house_Usage)
        {
            string sql = "INSERT INTO House_Usage (HUsage_Code,HUsage_HRentalCode,HUsage_User,HUsage_Type,HUsage_BeginDate,HUsage_EndDate,HUsage_Company,HUsage_Dept,HUsage_Remark,Stat,CreateDate,UpdateDate,DeleteDate) VALUES (@HUsage_Code,@HUsage_HRentalCode,@HUsage_User,@HUsage_Type,@HUsage_BeginDate,@HUsage_EndDate,@HUsage_Company,@HUsage_Dept,@HUsage_Remark,@Stat,@CreateDate,@UpdateDate,@DeleteDate)";

            if (string.IsNullOrEmpty(house_Usage.HUsage_Code))
            {
                idb.AddParameter("@HUsage_Code", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@HUsage_Code", house_Usage.HUsage_Code);
            }
            if (string.IsNullOrEmpty(house_Usage.HUsage_HRentalCode))
            {
                idb.AddParameter("@HUsage_HRentalCode", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@HUsage_HRentalCode", house_Usage.HUsage_HRentalCode);
            }
            if (string.IsNullOrEmpty(house_Usage.HUsage_User))
            {
                idb.AddParameter("@HUsage_User", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@HUsage_User", house_Usage.HUsage_User);
            }
            if (string.IsNullOrEmpty(house_Usage.HUsage_Type))
            {
                idb.AddParameter("@HUsage_Type", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@HUsage_Type", house_Usage.HUsage_Type);
            }
            if (house_Usage.HUsage_BeginDate == DateTime.MinValue)
            {
                idb.AddParameter("@HUsage_BeginDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@HUsage_BeginDate", house_Usage.HUsage_BeginDate);
            }
            if (house_Usage.HUsage_EndDate == DateTime.MinValue)
            {
                idb.AddParameter("@HUsage_EndDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@HUsage_EndDate", house_Usage.HUsage_EndDate);
            }
            if (string.IsNullOrEmpty(house_Usage.HUsage_Company))
            {
                idb.AddParameter("@HUsage_Company", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@HUsage_Company", house_Usage.HUsage_Company);
            }
            if (string.IsNullOrEmpty(house_Usage.HUsage_Dept))
            {
                idb.AddParameter("@HUsage_Dept", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@HUsage_Dept", house_Usage.HUsage_Dept);
            }
            if (string.IsNullOrEmpty(house_Usage.HUsage_Remark))
            {
                idb.AddParameter("@HUsage_Remark", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@HUsage_Remark", house_Usage.HUsage_Remark);
            }
            if (house_Usage.Stat == 0)
            {
                idb.AddParameter("@Stat", 0);
            }
            else
            {
                idb.AddParameter("@Stat", house_Usage.Stat);
            }
            if (house_Usage.CreateDate == DateTime.MinValue)
            {
                idb.AddParameter("@CreateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CreateDate", house_Usage.CreateDate);
            }
            if (house_Usage.UpdateDate == DateTime.MinValue)
            {
                idb.AddParameter("@UpdateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@UpdateDate", house_Usage.UpdateDate);
            }
            if (house_Usage.DeleteDate == DateTime.MinValue)
            {
                idb.AddParameter("@DeleteDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@DeleteDate", house_Usage.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);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 添加图表配置细表 ChartDetail对象(即:一条记录)
        /// </summary>
        public int Add(ChartDetail chartDetail)
        {
            string sql = "INSERT INTO ChartDetail (CD_Module,CD_Areas,CD_ChartType,CD_DataSource,CD_Parmas,CD_BorderWidth,CD_BorderColor,CD_BorderDashStyle,CD_IsValueShownAsLabel,CD_LegendText,CD_MarkerSize,CD_MarkerColor,CD_MarkerStyle,Stat) VALUES (@CD_Module,@CD_Areas,@CD_ChartType,@CD_DataSource,@CD_Parmas,@CD_BorderWidth,@CD_BorderColor,@CD_BorderDashStyle,@CD_IsValueShownAsLabel,@CD_LegendText,@CD_MarkerSize,@CD_MarkerColor,@CD_MarkerStyle,@Stat)";

            if (string.IsNullOrEmpty(chartDetail.CD_Module))
            {
                idb.AddParameter("@CD_Module", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_Module", chartDetail.CD_Module);
            }
            if (string.IsNullOrEmpty(chartDetail.CD_Areas))
            {
                idb.AddParameter("@CD_Areas", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_Areas", chartDetail.CD_Areas);
            }
            if (string.IsNullOrEmpty(chartDetail.CD_ChartType))
            {
                idb.AddParameter("@CD_ChartType", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_ChartType", chartDetail.CD_ChartType);
            }
            if (string.IsNullOrEmpty(chartDetail.CD_DataSource))
            {
                idb.AddParameter("@CD_DataSource", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_DataSource", chartDetail.CD_DataSource);
            }
            if (string.IsNullOrEmpty(chartDetail.CD_Parmas))
            {
                idb.AddParameter("@CD_Parmas", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_Parmas", chartDetail.CD_Parmas);
            }
            if (chartDetail.CD_BorderWidth == 0)
            {
                idb.AddParameter("@CD_BorderWidth", 0);
            }
            else
            {
                idb.AddParameter("@CD_BorderWidth", chartDetail.CD_BorderWidth);
            }
            if (string.IsNullOrEmpty(chartDetail.CD_BorderColor))
            {
                idb.AddParameter("@CD_BorderColor", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_BorderColor", chartDetail.CD_BorderColor);
            }
            if (string.IsNullOrEmpty(chartDetail.CD_BorderDashStyle))
            {
                idb.AddParameter("@CD_BorderDashStyle", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_BorderDashStyle", chartDetail.CD_BorderDashStyle);
            }
            if (chartDetail.CD_IsValueShownAsLabel == false)
            {
                idb.AddParameter("@CD_IsValueShownAsLabel", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_IsValueShownAsLabel", chartDetail.CD_IsValueShownAsLabel);
            }
            if (string.IsNullOrEmpty(chartDetail.CD_LegendText))
            {
                idb.AddParameter("@CD_LegendText", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_LegendText", chartDetail.CD_LegendText);
            }
            if (chartDetail.CD_MarkerSize == 0)
            {
                idb.AddParameter("@CD_MarkerSize", 0);
            }
            else
            {
                idb.AddParameter("@CD_MarkerSize", chartDetail.CD_MarkerSize);
            }
            if (string.IsNullOrEmpty(chartDetail.CD_MarkerColor))
            {
                idb.AddParameter("@CD_MarkerColor", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_MarkerColor", chartDetail.CD_MarkerColor);
            }
            if (string.IsNullOrEmpty(chartDetail.CD_MarkerStyle))
            {
                idb.AddParameter("@CD_MarkerStyle", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CD_MarkerStyle", chartDetail.CD_MarkerStyle);
            }
            if (chartDetail.Stat == 0)
            {
                idb.AddParameter("@Stat", 0);
            }
            else
            {
                idb.AddParameter("@Stat", chartDetail.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);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 添加报表工具条配置表 ChartToolBar对象(即:一条记录)
        /// </summary>
        public int Add(ChartToolBar chartToolBar)
        {
            string sql = "INSERT INTO ChartToolBar (CT_Module,CT_Field,CT_Name,CT_Order,CT_Type,CT_DictKey,CT_JS,CT_Default,CT_Show,Stat,CT_Attr) VALUES (@CT_Module,@CT_Field,@CT_Name,@CT_Order,@CT_Type,@CT_DictKey,@CT_JS,@CT_Default,@CT_Show,@Stat,@CT_Attr)";

            if (string.IsNullOrEmpty(chartToolBar.CT_Module))
            {
                idb.AddParameter("@CT_Module", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CT_Module", chartToolBar.CT_Module);
            }
            if (string.IsNullOrEmpty(chartToolBar.CT_Field))
            {
                idb.AddParameter("@CT_Field", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CT_Field", chartToolBar.CT_Field);
            }
            if (string.IsNullOrEmpty(chartToolBar.CT_Name))
            {
                idb.AddParameter("@CT_Name", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CT_Name", chartToolBar.CT_Name);
            }
            if (chartToolBar.CT_Order == 0)
            {
                idb.AddParameter("@CT_Order", 0);
            }
            else
            {
                idb.AddParameter("@CT_Order", chartToolBar.CT_Order);
            }
            if (string.IsNullOrEmpty(chartToolBar.CT_Type))
            {
                idb.AddParameter("@CT_Type", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CT_Type", chartToolBar.CT_Type);
            }
            if (string.IsNullOrEmpty(chartToolBar.CT_DictKey))
            {
                idb.AddParameter("@CT_DictKey", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CT_DictKey", chartToolBar.CT_DictKey);
            }
            if (string.IsNullOrEmpty(chartToolBar.CT_JS))
            {
                idb.AddParameter("@CT_JS", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CT_JS", chartToolBar.CT_JS);
            }
            if (string.IsNullOrEmpty(chartToolBar.CT_Default))
            {
                idb.AddParameter("@CT_Default", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CT_Default", chartToolBar.CT_Default);
            }
            if (string.IsNullOrEmpty(chartToolBar.CT_Show))
            {
                idb.AddParameter("@CT_Show", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CT_Show", chartToolBar.CT_Show);
            }
            if (chartToolBar.Stat == 0)
            {
                idb.AddParameter("@Stat", 0);
            }
            else
            {
                idb.AddParameter("@Stat", chartToolBar.Stat);
            }
            if (string.IsNullOrEmpty(chartToolBar.CT_Attr))
            {
                idb.AddParameter("@CT_Attr", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CT_Attr", chartToolBar.CT_Attr);
            }


            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);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 添加SD_CTrans对象(即:一条记录)
        /// </summary>
        public int Add(SD_CTrans sD_CTrans)
        {
            string sql = "INSERT INTO SD_CTrans (SDT_PCode,SDT_Code,SDT_DName,SDT_DCode,SDT_Owner,SDT_Distance,SDT_RoadCode,SDT_CheckValue,SDT_Unit,SDT_Bak,Stat,CreateDate,UpdateDate,DeleteDate,SDT_CarNo,SDT_StartTime,SDT_EndTime,SDT_Pop,SDT_Lng,SDT_Lat) VALUES (@SDT_PCode,@SDT_Code,@SDT_DName,@SDT_DCode,@SDT_Owner,@SDT_Distance,@SDT_RoadCode,@SDT_CheckValue,@SDT_Unit,@SDT_Bak,@Stat,@CreateDate,@UpdateDate,@DeleteDate,@SDT_CarNo,@SDT_StartTime,@SDT_EndTime,@SDT_Pop,@SDT_Lng,@SDT_Lat)";

            if (string.IsNullOrEmpty(sD_CTrans.SDT_PCode))
            {
                idb.AddParameter("@SDT_PCode", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_PCode", sD_CTrans.SDT_PCode);
            }
            if (string.IsNullOrEmpty(sD_CTrans.SDT_Code))
            {
                idb.AddParameter("@SDT_Code", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_Code", sD_CTrans.SDT_Code);
            }
            if (string.IsNullOrEmpty(sD_CTrans.SDT_DName))
            {
                idb.AddParameter("@SDT_DName", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_DName", sD_CTrans.SDT_DName);
            }
            if (string.IsNullOrEmpty(sD_CTrans.SDT_DCode))
            {
                idb.AddParameter("@SDT_DCode", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_DCode", sD_CTrans.SDT_DCode);
            }
            if (string.IsNullOrEmpty(sD_CTrans.SDT_Owner))
            {
                idb.AddParameter("@SDT_Owner", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_Owner", sD_CTrans.SDT_Owner);
            }
            if (string.IsNullOrEmpty(sD_CTrans.SDT_Distance))
            {
                idb.AddParameter("@SDT_Distance", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_Distance", sD_CTrans.SDT_Distance);
            }
            if (string.IsNullOrEmpty(sD_CTrans.SDT_RoadCode))
            {
                idb.AddParameter("@SDT_RoadCode", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_RoadCode", sD_CTrans.SDT_RoadCode);
            }
            if (sD_CTrans.SDT_CheckValue == 0)
            {
                idb.AddParameter("@SDT_CheckValue", 0);
            }
            else
            {
                idb.AddParameter("@SDT_CheckValue", sD_CTrans.SDT_CheckValue);
            }
            if (string.IsNullOrEmpty(sD_CTrans.SDT_Unit))
            {
                idb.AddParameter("@SDT_Unit", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_Unit", sD_CTrans.SDT_Unit);
            }
            if (string.IsNullOrEmpty(sD_CTrans.SDT_Bak))
            {
                idb.AddParameter("@SDT_Bak", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_Bak", sD_CTrans.SDT_Bak);
            }
            if (sD_CTrans.Stat == 0)
            {
                idb.AddParameter("@Stat", 0);
            }
            else
            {
                idb.AddParameter("@Stat", sD_CTrans.Stat);
            }
            if (sD_CTrans.CreateDate == DateTime.MinValue)
            {
                idb.AddParameter("@CreateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CreateDate", sD_CTrans.CreateDate);
            }
            if (sD_CTrans.UpdateDate == DateTime.MinValue)
            {
                idb.AddParameter("@UpdateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@UpdateDate", sD_CTrans.UpdateDate);
            }
            if (sD_CTrans.DeleteDate == DateTime.MinValue)
            {
                idb.AddParameter("@DeleteDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@DeleteDate", sD_CTrans.DeleteDate);
            }
            if (string.IsNullOrEmpty(sD_CTrans.SDT_CarNo))
            {
                idb.AddParameter("@SDT_CarNo", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_CarNo", sD_CTrans.SDT_CarNo);
            }
            if (sD_CTrans.SDT_StartTime == DateTime.MinValue)
            {
                idb.AddParameter("@SDT_StartTime", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_StartTime", sD_CTrans.SDT_StartTime);
            }
            if (sD_CTrans.SDT_EndTime == DateTime.MinValue)
            {
                idb.AddParameter("@SDT_EndTime", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@SDT_EndTime", sD_CTrans.SDT_EndTime);
            }
            if (sD_CTrans.SDT_Pop == 0)
            {
                idb.AddParameter("@SDT_Pop", 0);
            }
            else
            {
                idb.AddParameter("@SDT_Pop", sD_CTrans.SDT_Pop);
            }
            if (sD_CTrans.SDT_Lng == 0)
            {
                idb.AddParameter("@SDT_Lng", 0);
            }
            else
            {
                idb.AddParameter("@SDT_Lng", sD_CTrans.SDT_Lng);
            }
            if (sD_CTrans.SDT_Lat == 0)
            {
                idb.AddParameter("@SDT_Lat", 0);
            }
            else
            {
                idb.AddParameter("@SDT_Lat", sD_CTrans.SDT_Lat);
            }


            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);
        }
Ejemplo n.º 18
0
        /// <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);
        }
Ejemplo n.º 19
0
        /// <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);
        }
Ejemplo n.º 20
0
        /// <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);
        }
Ejemplo n.º 21
0
        /// <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);
        }
Ejemplo n.º 22
0
        /// <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);
        }
Ejemplo n.º 23
0
        /// <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);
        }
Ejemplo n.º 24
0
        /// <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);
        }
Ejemplo n.º 25
0
        /// <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);
        }
Ejemplo n.º 26
0
        /// <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);
        }
Ejemplo n.º 27
0
        /// <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);
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 添加附件信息 Bse_Attachments对象(即:一条记录)
        /// </summary>
        public int Add(Bse_Attachments bse_Attachments)
        {
            string sql = "INSERT INTO Bse_Attachments (Module_Code,Record_ID,AT_Name,AT_URL,AT_CDate,AT_UDate,AT_Creator,AT_Updator,Stat,AT_Code,CreateDate,UpdateDate,DeleteDate,AT_Description) VALUES (@Module_Code,@Record_ID,@AT_Name,@AT_URL,@AT_CDate,@AT_UDate,@AT_Creator,@AT_Updator,@Stat,@AT_Code,@CreateDate,@UpdateDate,@DeleteDate,@AT_Description)";

            if (string.IsNullOrEmpty(bse_Attachments.Module_Code))
            {
                idb.AddParameter("@Module_Code", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Module_Code", bse_Attachments.Module_Code);
            }
            if (string.IsNullOrEmpty(bse_Attachments.Record_ID))
            {
                idb.AddParameter("@Record_ID", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@Record_ID", bse_Attachments.Record_ID);
            }
            if (string.IsNullOrEmpty(bse_Attachments.AT_Name))
            {
                idb.AddParameter("@AT_Name", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@AT_Name", bse_Attachments.AT_Name);
            }
            if (string.IsNullOrEmpty(bse_Attachments.AT_URL))
            {
                idb.AddParameter("@AT_URL", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@AT_URL", bse_Attachments.AT_URL);
            }
            if (bse_Attachments.AT_CDate == DateTime.MinValue)
            {
                idb.AddParameter("@AT_CDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@AT_CDate", bse_Attachments.AT_CDate);
            }
            if (bse_Attachments.AT_UDate == DateTime.MinValue)
            {
                idb.AddParameter("@AT_UDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@AT_UDate", bse_Attachments.AT_UDate);
            }
            if (string.IsNullOrEmpty(bse_Attachments.AT_Creator))
            {
                idb.AddParameter("@AT_Creator", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@AT_Creator", bse_Attachments.AT_Creator);
            }
            if (string.IsNullOrEmpty(bse_Attachments.AT_Updator))
            {
                idb.AddParameter("@AT_Updator", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@AT_Updator", bse_Attachments.AT_Updator);
            }
            if (bse_Attachments.Stat == 0)
            {
                idb.AddParameter("@Stat", 0);
            }
            else
            {
                idb.AddParameter("@Stat", bse_Attachments.Stat);
            }
            if (string.IsNullOrEmpty(bse_Attachments.AT_Code))
            {
                idb.AddParameter("@AT_Code", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@AT_Code", bse_Attachments.AT_Code);
            }
            if (bse_Attachments.CreateDate == DateTime.MinValue)
            {
                idb.AddParameter("@CreateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@CreateDate", bse_Attachments.CreateDate);
            }
            if (bse_Attachments.UpdateDate == DateTime.MinValue)
            {
                idb.AddParameter("@UpdateDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@UpdateDate", bse_Attachments.UpdateDate);
            }
            if (bse_Attachments.DeleteDate == DateTime.MinValue)
            {
                idb.AddParameter("@DeleteDate", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@DeleteDate", bse_Attachments.DeleteDate);
            }
            if (string.IsNullOrEmpty(bse_Attachments.AT_Description))
            {
                idb.AddParameter("@AT_Description", DBNull.Value);
            }
            else
            {
                idb.AddParameter("@AT_Description", bse_Attachments.AT_Description);
            }


            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);
        }
Ejemplo n.º 29
0
        /// <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);
        }
Ejemplo n.º 30
0
        /// <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);
        }