/// <summary> /// 获取指定的Sys_Role对象(即:一条记录 /// </summary> public Sys_Role GetByKey(decimal sRole_ID) { Sys_Role sys_Role = new Sys_Role(); string sql = "SELECT SRole_ID,SRole_Code,SRole_Name,SRole_Type,SRole_iType,SRole_Stat,SRole_UCode,Stat FROM Sys_Role WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND SRole_ID=@SRole_ID "; idb.AddParameter("@SRole_ID", sRole_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["SRole_ID"] != DBNull.Value) { sys_Role.SRole_ID = Convert.ToDecimal(dr["SRole_ID"]); } if (dr["SRole_Code"] != DBNull.Value) { sys_Role.SRole_Code = Convert.ToString(dr["SRole_Code"]); } if (dr["SRole_Name"] != DBNull.Value) { sys_Role.SRole_Name = Convert.ToString(dr["SRole_Name"]); } if (dr["SRole_Type"] != DBNull.Value) { sys_Role.SRole_Type = Convert.ToString(dr["SRole_Type"]); } if (dr["SRole_iType"] != DBNull.Value) { sys_Role.SRole_iType = Convert.ToString(dr["SRole_iType"]); } if (dr["SRole_Stat"] != DBNull.Value) { sys_Role.SRole_Stat = Convert.ToString(dr["SRole_Stat"]); } if (dr["SRole_UCode"] != DBNull.Value) { sys_Role.SRole_UCode = Convert.ToString(dr["SRole_UCode"]); } if (dr["Stat"] != DBNull.Value) { sys_Role.Stat = Convert.ToInt32(dr["Stat"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(sys_Role); }
/// <summary> /// 获取指定的Sys_UserPermission_Method对象(即:一条记录 /// </summary> public Sys_UserPermission_Method GetByKey(decimal fP_ID) { Sys_UserPermission_Method sys_UserPermission_Method = new Sys_UserPermission_Method(); string sql = "SELECT FP_ID,FP_Code,FP_FunCode,FP_Method,FP_Udef1,FP_Udef2,FP_Udef3,Stat FROM Sys_UserPermission_Method WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND FP_ID=@FP_ID "; idb.AddParameter("@FP_ID", fP_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["FP_ID"] != DBNull.Value) { sys_UserPermission_Method.FP_ID = Convert.ToDecimal(dr["FP_ID"]); } if (dr["FP_Code"] != DBNull.Value) { sys_UserPermission_Method.FP_Code = Convert.ToString(dr["FP_Code"]); } if (dr["FP_FunCode"] != DBNull.Value) { sys_UserPermission_Method.FP_FunCode = Convert.ToString(dr["FP_FunCode"]); } if (dr["FP_Method"] != DBNull.Value) { sys_UserPermission_Method.FP_Method = Convert.ToString(dr["FP_Method"]); } if (dr["FP_Udef1"] != DBNull.Value) { sys_UserPermission_Method.FP_Udef1 = Convert.ToString(dr["FP_Udef1"]); } if (dr["FP_Udef2"] != DBNull.Value) { sys_UserPermission_Method.FP_Udef2 = Convert.ToString(dr["FP_Udef2"]); } if (dr["FP_Udef3"] != DBNull.Value) { sys_UserPermission_Method.FP_Udef3 = Convert.ToString(dr["FP_Udef3"]); } if (dr["Stat"] != DBNull.Value) { sys_UserPermission_Method.Stat = Convert.ToInt32(dr["Stat"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(sys_UserPermission_Method); }
/// <summary> /// 获取指定的Bug日志 Sys_BugLog对象(即:一条记录 /// </summary> public Sys_BugLog GetByKey(decimal sL_ID) { Sys_BugLog sys_BugLog = new Sys_BugLog(); string sql = "SELECT SL_ID,SL_Code,SL_OpUser,SL_Date,SL_Status,SL_Owner,Stat FROM Sys_BugLog WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND SL_ID=@SL_ID "; idb.AddParameter("@SL_ID", sL_ID); SqlDataReader dr = null; try { sql += "ORDER BY SL_ID DESC"; dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["SL_ID"] != DBNull.Value) { sys_BugLog.SL_ID = Convert.ToDecimal(dr["SL_ID"]); } if (dr["SL_Code"] != DBNull.Value) { sys_BugLog.SL_Code = Convert.ToString(dr["SL_Code"]); } if (dr["SL_OpUser"] != DBNull.Value) { sys_BugLog.SL_OpUser = Convert.ToString(dr["SL_OpUser"]); } if (dr["SL_Date"] != DBNull.Value) { sys_BugLog.SL_Date = Convert.ToDateTime(dr["SL_Date"]); } if (dr["SL_Status"] != DBNull.Value) { sys_BugLog.SL_Status = Convert.ToString(dr["SL_Status"]); } if (dr["SL_Owner"] != DBNull.Value) { sys_BugLog.SL_Owner = Convert.ToString(dr["SL_Owner"]); } if (dr["Stat"] != DBNull.Value) { sys_BugLog.Stat = Convert.ToInt32(dr["Stat"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(sys_BugLog); }
/// <summary> /// 获取指定的系统运行日志 Sys_RunLog对象(即:一条记录 /// </summary> public Sys_RunLog GetByKey(decimal log_ID) { Sys_RunLog sys_RunLog = new Sys_RunLog(); string sql = "SELECT Log_ID,Log_Date,Log_SQL,Log_Author,Log_Fun,Log_SQLParameter,Log_Error FROM Sys_RunLog WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND Log_ID=@Log_ID "; idb.AddParameter("@Log_ID", log_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["Log_ID"] != DBNull.Value) { sys_RunLog.Log_ID = Convert.ToDecimal(dr["Log_ID"]); } if (dr["Log_Date"] != DBNull.Value) { sys_RunLog.Log_Date = Convert.ToDateTime(dr["Log_Date"]); } if (dr["Log_SQL"] != DBNull.Value) { sys_RunLog.Log_SQL = Convert.ToString(dr["Log_SQL"]); } if (dr["Log_Author"] != DBNull.Value) { sys_RunLog.Log_Author = Convert.ToString(dr["Log_Author"]); } if (dr["Log_Fun"] != DBNull.Value) { sys_RunLog.Log_Fun = Convert.ToString(dr["Log_Fun"]); } if (dr["Log_SQLParameter"] != DBNull.Value) { sys_RunLog.Log_SQLParameter = Convert.ToString(dr["Log_SQLParameter"]); } if (dr["Log_Error"] != DBNull.Value) { sys_RunLog.Log_Error = Convert.ToString(dr["Log_Error"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(sys_RunLog); }
/// <summary> /// 获取指定的审核阶段信息 Verify_Nodes对象(即:一条记录 /// </summary> public Verify_Nodes GetByKey(decimal verifyNode_ID) { Verify_Nodes verify_Nodes = new Verify_Nodes(); string sql = "SELECT VerifyNode_ID,VerifyNode_Code,VerifyNode_Name,VerifyNode_Remark,VerifyNode_AuditNum,Stat FROM Verify_Nodes WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND VerifyNode_ID=@VerifyNode_ID "; idb.AddParameter("@VerifyNode_ID", verifyNode_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["VerifyNode_ID"] != DBNull.Value) { verify_Nodes.VerifyNode_ID = Convert.ToDecimal(dr["VerifyNode_ID"]); } if (dr["VerifyNode_Code"] != DBNull.Value) { verify_Nodes.VerifyNode_Code = Convert.ToString(dr["VerifyNode_Code"]); } if (dr["VerifyNode_Name"] != DBNull.Value) { verify_Nodes.VerifyNode_Name = Convert.ToString(dr["VerifyNode_Name"]); } if (dr["VerifyNode_Remark"] != DBNull.Value) { verify_Nodes.VerifyNode_Remark = Convert.ToString(dr["VerifyNode_Remark"]); } if (dr["VerifyNode_AuditNum"] != DBNull.Value) { verify_Nodes.VerifyNode_AuditNum = Convert.ToInt32(dr["VerifyNode_AuditNum"]); } if (dr["Stat"] != DBNull.Value) { verify_Nodes.Stat = Convert.ToInt32(dr["Stat"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(verify_Nodes); }
/// <summary> /// 获取指定的PCD_Queue对象(即:一条记录 /// </summary> public PCD_Queue GetByKey(Int64 pCDO_ID) { PCD_Queue pCD_Queue = new PCD_Queue(); string sql = "SELECT PCDO_ID,PCDO_PlanCode,PCDO_NCode,PCDO_Order,Stat FROM PCD_Queue WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND PCDO_ID=@PCDO_ID "; idb.AddParameter("@PCDO_ID", pCDO_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["PCDO_ID"] != DBNull.Value) { pCD_Queue.PCDO_ID = Convert.ToInt64(dr["PCDO_ID"]); } if (dr["PCDO_PlanCode"] != DBNull.Value) { pCD_Queue.PCDO_PlanCode = Convert.ToString(dr["PCDO_PlanCode"]); } if (dr["PCDO_NCode"] != DBNull.Value) { pCD_Queue.PCDO_NCode = Convert.ToString(dr["PCDO_NCode"]); } if (dr["PCDO_Order"] != DBNull.Value) { pCD_Queue.PCDO_Order = Convert.ToInt32(dr["PCDO_Order"]); } if (dr["Stat"] != DBNull.Value) { pCD_Queue.Stat = Convert.ToInt32(dr["Stat"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(pCD_Queue); }
/// <summary> /// 获取指定的部门人员关系表 DeptEmployee对象(即:一条记录 /// </summary> public DeptEmployee GetByKey(decimal dE_ID) { DeptEmployee deptEmployee = new DeptEmployee(); string sql = "SELECT DE_ID,DE_Dept_Code,DE_Empoyee_Code,DE_Type,Stat FROM DeptEmployee WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND DE_ID=@DE_ID "; idb.AddParameter("@DE_ID", dE_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["DE_ID"] != DBNull.Value) { deptEmployee.DE_ID = Convert.ToDecimal(dr["DE_ID"]); } if (dr["DE_Dept_Code"] != DBNull.Value) { deptEmployee.DE_Dept_Code = Convert.ToString(dr["DE_Dept_Code"]); } if (dr["DE_Empoyee_Code"] != DBNull.Value) { deptEmployee.DE_Empoyee_Code = Convert.ToString(dr["DE_Empoyee_Code"]); } if (dr["DE_Type"] != DBNull.Value) { deptEmployee.DE_Type = Convert.ToString(dr["DE_Type"]); } if (dr["Stat"] != DBNull.Value) { deptEmployee.Stat = Convert.ToInt32(dr["Stat"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(deptEmployee); }
/// <summary> /// 获取指定的备注信息 Bse_Bak对象(即:一条记录 /// </summary> public Bse_Bak GetByKey(decimal bak_ID) { Bse_Bak bse_Bak = new Bse_Bak(); string sql = "SELECT Bak_ID,Module_Code,Record_ID,Bak_Content,Stat FROM Bse_Bak WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND Bak_ID=@Bak_ID "; idb.AddParameter("@Bak_ID", bak_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["Bak_ID"] != DBNull.Value) { bse_Bak.Bak_ID = Convert.ToDecimal(dr["Bak_ID"]); } if (dr["Module_Code"] != DBNull.Value) { bse_Bak.Module_Code = Convert.ToString(dr["Module_Code"]); } if (dr["Record_ID"] != DBNull.Value) { bse_Bak.Record_ID = Convert.ToString(dr["Record_ID"]); } if (dr["Bak_Content"] != DBNull.Value) { bse_Bak.Bak_Content = Convert.ToString(dr["Bak_Content"]); } if (dr["Stat"] != DBNull.Value) { bse_Bak.Stat = Convert.ToInt32(dr["Stat"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(bse_Bak); }
/// <summary> /// 获取指定的系统消息处理日志 Sys_AnnoceLog对象(即:一条记录 /// </summary> public Sys_AnnoceLog GetByKey(decimal eL_ID) { Sys_AnnoceLog sys_AnnoceLog = new Sys_AnnoceLog(); string sql = "SELECT EL_ID,EL_UserCode,EL_Date,EL_IP FROM Sys_AnnoceLog WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND EL_ID=@EL_ID "; idb.AddParameter("@EL_ID", eL_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["EL_ID"] != DBNull.Value) { sys_AnnoceLog.EL_ID = Convert.ToDecimal(dr["EL_ID"]); } if (dr["EL_UserCode"] != DBNull.Value) { sys_AnnoceLog.EL_UserCode = Convert.ToString(dr["EL_UserCode"]); } if (dr["EL_Date"] != DBNull.Value) { sys_AnnoceLog.EL_Date = Convert.ToDateTime(dr["EL_Date"]); } if (dr["EL_IP"] != DBNull.Value) { sys_AnnoceLog.EL_IP = Convert.ToString(dr["EL_IP"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(sys_AnnoceLog); }
/// <summary> /// 获取指定的顶部快捷方式 System_TopMenu对象(即:一条记录 /// </summary> public System_TopMenu GetByKey(decimal menu_ID) { System_TopMenu system_TopMenu = new System_TopMenu(); string sql = "SELECT Menu_ID,Menu_User,Menu_Links FROM System_TopMenu WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND Menu_ID=@Menu_ID "; idb.AddParameter("@Menu_ID", menu_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["Menu_ID"] != DBNull.Value) { system_TopMenu.Menu_ID = Convert.ToDecimal(dr["Menu_ID"]); } if (dr["Menu_User"] != DBNull.Value) { system_TopMenu.Menu_User = Convert.ToString(dr["Menu_User"]); } if (dr["Menu_Links"] != DBNull.Value) { system_TopMenu.Menu_Links = Convert.ToString(dr["Menu_Links"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(system_TopMenu); }
/// <summary> /// 获取指定的付款条款 Pay_Clause对象(即:一条记录 /// </summary> public Pay_Clause GetByKey(decimal cluase_ID) { Pay_Clause pay_Clause = new Pay_Clause(); string sql = "SELECT Cluase_ID,Contract_Code,Stat FROM Pay_Clause WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND Cluase_ID=@Cluase_ID "; idb.AddParameter("@Cluase_ID", cluase_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["Cluase_ID"] != DBNull.Value) { pay_Clause.Cluase_ID = Convert.ToDecimal(dr["Cluase_ID"]); } if (dr["Contract_Code"] != DBNull.Value) { pay_Clause.Contract_Code = Convert.ToString(dr["Contract_Code"]); } if (dr["Stat"] != DBNull.Value) { pay_Clause.Stat = Convert.ToInt32(dr["Stat"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(pay_Clause); }
/// <summary> /// 获取指定的Doc_Attachment对象(即:一条记录 /// </summary> public Doc_Attachment GetByKey(decimal dat_ID) { Doc_Attachment doc_Attachment = new Doc_Attachment(); string sql = "SELECT Dat_ID,Dat_Code,Dat_Name,Dat_Path,Dat_Module,Dat_RefCode,Dat_Type,Dat_Stat,Dat_Order,Dat_Date,Dat_Creator,Dat_CreatorName,CreateTime,UpdateTime,DeleteTime,Stat,Dat_Udef1,Dat_Udef2,Dat_Udef3,Dat_Udef4,Dat_ShowName FROM Doc_Attachment WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND Dat_ID=@Dat_ID "; idb.AddParameter("@Dat_ID", dat_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["Dat_ID"] != DBNull.Value) { doc_Attachment.Dat_ID = Convert.ToDecimal(dr["Dat_ID"]); } if (dr["Dat_Code"] != DBNull.Value) { doc_Attachment.Dat_Code = Convert.ToString(dr["Dat_Code"]); } if (dr["Dat_Name"] != DBNull.Value) { doc_Attachment.Dat_Name = Convert.ToString(dr["Dat_Name"]); } if (dr["Dat_Path"] != DBNull.Value) { doc_Attachment.Dat_Path = Convert.ToString(dr["Dat_Path"]); } if (dr["Dat_Module"] != DBNull.Value) { doc_Attachment.Dat_Module = Convert.ToString(dr["Dat_Module"]); } if (dr["Dat_RefCode"] != DBNull.Value) { doc_Attachment.Dat_RefCode = Convert.ToString(dr["Dat_RefCode"]); } if (dr["Dat_Type"] != DBNull.Value) { doc_Attachment.Dat_Type = Convert.ToString(dr["Dat_Type"]); } if (dr["Dat_Stat"] != DBNull.Value) { doc_Attachment.Dat_Stat = Convert.ToString(dr["Dat_Stat"]); } if (dr["Dat_Order"] != DBNull.Value) { doc_Attachment.Dat_Order = Convert.ToInt32(dr["Dat_Order"]); } if (dr["Dat_Date"] != DBNull.Value) { doc_Attachment.Dat_Date = Convert.ToDateTime(dr["Dat_Date"]); } if (dr["Dat_Creator"] != DBNull.Value) { doc_Attachment.Dat_Creator = Convert.ToString(dr["Dat_Creator"]); } if (dr["Dat_CreatorName"] != DBNull.Value) { doc_Attachment.Dat_CreatorName = Convert.ToString(dr["Dat_CreatorName"]); } if (dr["CreateTime"] != DBNull.Value) { doc_Attachment.CreateTime = Convert.ToDateTime(dr["CreateTime"]); } if (dr["UpdateTime"] != DBNull.Value) { doc_Attachment.UpdateTime = Convert.ToDateTime(dr["UpdateTime"]); } if (dr["DeleteTime"] != DBNull.Value) { doc_Attachment.DeleteTime = Convert.ToDateTime(dr["DeleteTime"]); } if (dr["Stat"] != DBNull.Value) { doc_Attachment.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["Dat_Udef1"] != DBNull.Value) { doc_Attachment.Dat_Udef1 = Convert.ToString(dr["Dat_Udef1"]); } if (dr["Dat_Udef2"] != DBNull.Value) { doc_Attachment.Dat_Udef2 = Convert.ToString(dr["Dat_Udef2"]); } if (dr["Dat_Udef3"] != DBNull.Value) { doc_Attachment.Dat_Udef3 = Convert.ToString(dr["Dat_Udef3"]); } if (dr["Dat_Udef4"] != DBNull.Value) { doc_Attachment.Dat_Udef4 = Convert.ToString(dr["Dat_Udef4"]); } if (dr["Dat_ShowName"] != DBNull.Value) { doc_Attachment.Dat_ShowName = Convert.ToString(dr["Dat_ShowName"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(doc_Attachment); }
/// <summary> /// 获取指定的考评信息 HR_Evaluation对象(即:一条记录 /// </summary> public HR_Evaluation GetByKey(decimal eva_ID) { HR_Evaluation hR_Evaluation = new HR_Evaluation(); string sql = "SELECT Eva_ID,Eva_Code,Eva_StuffCode,Eva_StuffName,Eva_Date,Eva_Records,Eva_Conclusion,Eva_Manager,Eva_Level,Eva_Bak,Stat,CreateDate,UpdateDate,DeleteDate FROM HR_Evaluation WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND Eva_ID=@Eva_ID "; idb.AddParameter("@Eva_ID", eva_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["Eva_ID"] != DBNull.Value) { hR_Evaluation.Eva_ID = Convert.ToDecimal(dr["Eva_ID"]); } if (dr["Eva_Code"] != DBNull.Value) { hR_Evaluation.Eva_Code = Convert.ToString(dr["Eva_Code"]); } if (dr["Eva_StuffCode"] != DBNull.Value) { hR_Evaluation.Eva_StuffCode = Convert.ToString(dr["Eva_StuffCode"]); } if (dr["Eva_StuffName"] != DBNull.Value) { hR_Evaluation.Eva_StuffName = Convert.ToString(dr["Eva_StuffName"]); } if (dr["Eva_Date"] != DBNull.Value) { hR_Evaluation.Eva_Date = Convert.ToDateTime(dr["Eva_Date"]); } if (dr["Eva_Records"] != DBNull.Value) { hR_Evaluation.Eva_Records = Convert.ToString(dr["Eva_Records"]); } if (dr["Eva_Conclusion"] != DBNull.Value) { hR_Evaluation.Eva_Conclusion = Convert.ToString(dr["Eva_Conclusion"]); } if (dr["Eva_Manager"] != DBNull.Value) { hR_Evaluation.Eva_Manager = Convert.ToString(dr["Eva_Manager"]); } if (dr["Eva_Level"] != DBNull.Value) { hR_Evaluation.Eva_Level = Convert.ToString(dr["Eva_Level"]); } if (dr["Eva_Bak"] != DBNull.Value) { hR_Evaluation.Eva_Bak = Convert.ToString(dr["Eva_Bak"]); } if (dr["Stat"] != DBNull.Value) { hR_Evaluation.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["CreateDate"] != DBNull.Value) { hR_Evaluation.CreateDate = Convert.ToDateTime(dr["CreateDate"]); } if (dr["UpdateDate"] != DBNull.Value) { hR_Evaluation.UpdateDate = Convert.ToDateTime(dr["UpdateDate"]); } if (dr["DeleteDate"] != DBNull.Value) { hR_Evaluation.DeleteDate = Convert.ToDateTime(dr["DeleteDate"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(hR_Evaluation); }
/// <summary> /// 获取指定的搅拌站信息 PC_BStation对象(即:一条记录 /// </summary> public PC_BStation GetByKey(decimal pCBS_ID) { PC_BStation pC_BStation = new PC_BStation(); string sql = "SELECT PCBS_ID,PCBS_Code,PCBS_Name,PCBS_Addr,PCBS_Start,PCBS_Status,PCBS_Bak,Stat,CreateDate,UpdateDate,DeleteDate FROM PC_BStation WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND PCBS_ID=@PCBS_ID "; idb.AddParameter("@PCBS_ID", pCBS_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["PCBS_ID"] != DBNull.Value) { pC_BStation.PCBS_ID = Convert.ToDecimal(dr["PCBS_ID"]); } if (dr["PCBS_Code"] != DBNull.Value) { pC_BStation.PCBS_Code = Convert.ToString(dr["PCBS_Code"]); } if (dr["PCBS_Name"] != DBNull.Value) { pC_BStation.PCBS_Name = Convert.ToString(dr["PCBS_Name"]); } if (dr["PCBS_Addr"] != DBNull.Value) { pC_BStation.PCBS_Addr = Convert.ToString(dr["PCBS_Addr"]); } if (dr["PCBS_Start"] != DBNull.Value) { pC_BStation.PCBS_Start = Convert.ToDateTime(dr["PCBS_Start"]); } if (dr["PCBS_Status"] != DBNull.Value) { pC_BStation.PCBS_Status = Convert.ToString(dr["PCBS_Status"]); } if (dr["PCBS_Bak"] != DBNull.Value) { pC_BStation.PCBS_Bak = Convert.ToString(dr["PCBS_Bak"]); } if (dr["Stat"] != DBNull.Value) { pC_BStation.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["CreateDate"] != DBNull.Value) { pC_BStation.CreateDate = Convert.ToDateTime(dr["CreateDate"]); } if (dr["UpdateDate"] != DBNull.Value) { pC_BStation.UpdateDate = Convert.ToDateTime(dr["UpdateDate"]); } if (dr["DeleteDate"] != DBNull.Value) { pC_BStation.DeleteDate = Convert.ToDateTime(dr["DeleteDate"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(pC_BStation); }
/// <summary> /// 获取指定的公司物料类别 WH_MaterialType对象(即:一条记录 /// </summary> public WH_MaterialType GetByKey(decimal mT_ID) { WH_MaterialType wH_MaterialType = new WH_MaterialType(); string sql = "SELECT MT_ID,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 FROM WH_MaterialType WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND MT_ID=@MT_ID "; idb.AddParameter("@MT_ID", mT_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["MT_ID"] != DBNull.Value) { wH_MaterialType.MT_ID = Convert.ToDecimal(dr["MT_ID"]); } if (dr["MT_Code"] != DBNull.Value) { wH_MaterialType.MT_Code = Convert.ToString(dr["MT_Code"]); } if (dr["MT_TCode"] != DBNull.Value) { wH_MaterialType.MT_TCode = Convert.ToString(dr["MT_TCode"]); } if (dr["MT_TName"] != DBNull.Value) { wH_MaterialType.MT_TName = Convert.ToString(dr["MT_TName"]); } if (dr["MT_Company"] != DBNull.Value) { wH_MaterialType.MT_Company = Convert.ToString(dr["MT_Company"]); } if (dr["MT_CompanyCode"] != DBNull.Value) { wH_MaterialType.MT_CompanyCode = Convert.ToString(dr["MT_CompanyCode"]); } if (dr["MT_Dept"] != DBNull.Value) { wH_MaterialType.MT_Dept = Convert.ToString(dr["MT_Dept"]); } if (dr["MT_DeptCode"] != DBNull.Value) { wH_MaterialType.MT_DeptCode = Convert.ToString(dr["MT_DeptCode"]); } if (dr["Stat"] != DBNull.Value) { wH_MaterialType.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["MT_Status"] != DBNull.Value) { wH_MaterialType.MT_Status = Convert.ToString(dr["MT_Status"]); } if (dr["CreateDate"] != DBNull.Value) { wH_MaterialType.CreateDate = Convert.ToDateTime(dr["CreateDate"]); } if (dr["UpdateDate"] != DBNull.Value) { wH_MaterialType.UpdateDate = Convert.ToDateTime(dr["UpdateDate"]); } if (dr["DeleteDate"] != DBNull.Value) { wH_MaterialType.DeleteDate = Convert.ToDateTime(dr["DeleteDate"]); } if (dr["MT_Itype"] != DBNull.Value) { wH_MaterialType.MT_Itype = Convert.ToString(dr["MT_Itype"]); } if (dr["MT_Type"] != DBNull.Value) { wH_MaterialType.MT_Type = Convert.ToString(dr["MT_Type"]); } if (dr["MT_Employee"] != DBNull.Value) { wH_MaterialType.MT_Employee = Convert.ToString(dr["MT_Employee"]); } if (dr["MT_EmployeeName"] != DBNull.Value) { wH_MaterialType.MT_EmployeeName = Convert.ToString(dr["MT_EmployeeName"]); } if (dr["MT_TPCode"] != DBNull.Value) { wH_MaterialType.MT_TPCode = Convert.ToString(dr["MT_TPCode"]); } if (dr["MT_Order"] != DBNull.Value) { wH_MaterialType.MT_Order = Convert.ToInt32(dr["MT_Order"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(wH_MaterialType); }
/// <summary> /// 获取指定的数据字典 Bse_Dict对象(即:一条记录 /// </summary> public Bse_Dict GetByKey(decimal dict_ID) { Bse_Dict bse_Dict = new Bse_Dict(); string sql = "SELECT Dict_ID,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 FROM Bse_Dict WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND Dict_ID=@Dict_ID "; idb.AddParameter("@Dict_ID", dict_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["Dict_ID"] != DBNull.Value) { bse_Dict.Dict_ID = Convert.ToDecimal(dr["Dict_ID"]); } if (dr["Dict_Key"] != DBNull.Value) { bse_Dict.Dict_Key = Convert.ToString(dr["Dict_Key"]); } if (dr["Dict_Code"] != DBNull.Value) { bse_Dict.Dict_Code = Convert.ToString(dr["Dict_Code"]); } if (dr["Dict_Name"] != DBNull.Value) { bse_Dict.Dict_Name = Convert.ToString(dr["Dict_Name"]); } if (dr["Dict_Order"] != DBNull.Value) { bse_Dict.Dict_Order = Convert.ToInt32(dr["Dict_Order"]); } if (dr["Dict_PCode"] != DBNull.Value) { bse_Dict.Dict_PCode = Convert.ToString(dr["Dict_PCode"]); } if (dr["Dict_PName"] != DBNull.Value) { bse_Dict.Dict_PName = Convert.ToString(dr["Dict_PName"]); } if (dr["Dict_Desp"] != DBNull.Value) { bse_Dict.Dict_Desp = Convert.ToString(dr["Dict_Desp"]); } if (dr["Dict_SCode"] != DBNull.Value) { bse_Dict.Dict_SCode = Convert.ToString(dr["Dict_SCode"]); } if (dr["Dict_Bak"] != DBNull.Value) { bse_Dict.Dict_Bak = Convert.ToString(dr["Dict_Bak"]); } if (dr["Dict_UDef1"] != DBNull.Value) { bse_Dict.Dict_UDef1 = Convert.ToString(dr["Dict_UDef1"]); } if (dr["Dict_UDef2"] != DBNull.Value) { bse_Dict.Dict_UDef2 = Convert.ToString(dr["Dict_UDef2"]); } if (dr["Dict_UDef3"] != DBNull.Value) { bse_Dict.Dict_UDef3 = Convert.ToString(dr["Dict_UDef3"]); } if (dr["Dict_UDef4"] != DBNull.Value) { bse_Dict.Dict_UDef4 = Convert.ToString(dr["Dict_UDef4"]); } if (dr["Dict_UDef5"] != DBNull.Value) { bse_Dict.Dict_UDef5 = Convert.ToString(dr["Dict_UDef5"]); } if (dr["Dict_Level"] != DBNull.Value) { bse_Dict.Dict_Level = Convert.ToInt32(dr["Dict_Level"]); } if (dr["Dict_IsEditable"] != DBNull.Value) { bse_Dict.Dict_IsEditable = Convert.ToInt32(dr["Dict_IsEditable"]); } if (dr["Stat"] != DBNull.Value) { bse_Dict.Stat = Convert.ToInt32(dr["Stat"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(bse_Dict); }
/// <summary> /// 获取指定的外联单位管理 Outreach_Info对象(即:一条记录 /// </summary> public Outreach_Info GetByKey(decimal oI_ID) { Outreach_Info outreach_Info = new Outreach_Info(); string sql = "SELECT OI_ID,OI_Code,OI_Name,OI_Address,OI_Telephone,OI_CompanyType,OI_iType,OI_MainContactor,OI_ContactPhone,OI_Contactor,Ol_Attachment,OI_Remark,OI_Company,OI_Dept,Stat,CreateDate,UpdateDate,DeleteDate FROM Outreach_Info WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND OI_ID=@OI_ID "; idb.AddParameter("@OI_ID", oI_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["OI_ID"] != DBNull.Value) { outreach_Info.OI_ID = Convert.ToDecimal(dr["OI_ID"]); } if (dr["OI_Code"] != DBNull.Value) { outreach_Info.OI_Code = Convert.ToString(dr["OI_Code"]); } if (dr["OI_Name"] != DBNull.Value) { outreach_Info.OI_Name = Convert.ToString(dr["OI_Name"]); } if (dr["OI_Address"] != DBNull.Value) { outreach_Info.OI_Address = Convert.ToString(dr["OI_Address"]); } if (dr["OI_Telephone"] != DBNull.Value) { outreach_Info.OI_Telephone = Convert.ToString(dr["OI_Telephone"]); } if (dr["OI_CompanyType"] != DBNull.Value) { outreach_Info.OI_CompanyType = Convert.ToString(dr["OI_CompanyType"]); } if (dr["OI_iType"] != DBNull.Value) { outreach_Info.OI_iType = Convert.ToString(dr["OI_iType"]); } if (dr["OI_MainContactor"] != DBNull.Value) { outreach_Info.OI_MainContactor = Convert.ToString(dr["OI_MainContactor"]); } if (dr["OI_ContactPhone"] != DBNull.Value) { outreach_Info.OI_ContactPhone = Convert.ToString(dr["OI_ContactPhone"]); } if (dr["OI_Contactor"] != DBNull.Value) { outreach_Info.OI_Contactor = Convert.ToString(dr["OI_Contactor"]); } if (dr["Ol_Attachment"] != DBNull.Value) { outreach_Info.Ol_Attachment = Convert.ToString(dr["Ol_Attachment"]); } if (dr["OI_Remark"] != DBNull.Value) { outreach_Info.OI_Remark = Convert.ToString(dr["OI_Remark"]); } if (dr["OI_Company"] != DBNull.Value) { outreach_Info.OI_Company = Convert.ToString(dr["OI_Company"]); } if (dr["OI_Dept"] != DBNull.Value) { outreach_Info.OI_Dept = Convert.ToString(dr["OI_Dept"]); } if (dr["Stat"] != DBNull.Value) { outreach_Info.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["CreateDate"] != DBNull.Value) { outreach_Info.CreateDate = Convert.ToDateTime(dr["CreateDate"]); } if (dr["UpdateDate"] != DBNull.Value) { outreach_Info.UpdateDate = Convert.ToDateTime(dr["UpdateDate"]); } if (dr["DeleteDate"] != DBNull.Value) { outreach_Info.DeleteDate = Convert.ToDateTime(dr["DeleteDate"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(outreach_Info); }
/// <summary> /// 获取指定的Bse_Station对象(即:一条记录 /// </summary> public Bse_Station GetByKey(decimal sN_ID) { Bse_Station bse_Station = new Bse_Station(); string sql = "SELECT SN_ID,SN_Code,SN_Name,SN_AreaCode,SN_AreaName,SN_Mark,SN_Number,SN_Bak,SN_Interval,Stat,CreateTime,UpdateTime,DeleteTime FROM Bse_Station WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND SN_ID=@SN_ID "; idb.AddParameter("@SN_ID", sN_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["SN_ID"] != DBNull.Value) { bse_Station.SN_ID = Convert.ToDecimal(dr["SN_ID"]); } if (dr["SN_Code"] != DBNull.Value) { bse_Station.SN_Code = Convert.ToString(dr["SN_Code"]); } if (dr["SN_Name"] != DBNull.Value) { bse_Station.SN_Name = Convert.ToString(dr["SN_Name"]); } if (dr["SN_AreaCode"] != DBNull.Value) { bse_Station.SN_AreaCode = Convert.ToString(dr["SN_AreaCode"]); } if (dr["SN_AreaName"] != DBNull.Value) { bse_Station.SN_AreaName = Convert.ToString(dr["SN_AreaName"]); } if (dr["SN_Mark"] != DBNull.Value) { bse_Station.SN_Mark = Convert.ToString(dr["SN_Mark"]); } if (dr["SN_Number"] != DBNull.Value) { bse_Station.SN_Number = Convert.ToString(dr["SN_Number"]); } if (dr["SN_Bak"] != DBNull.Value) { bse_Station.SN_Bak = Convert.ToString(dr["SN_Bak"]); } if (dr["SN_Interval"] != DBNull.Value) { bse_Station.SN_Interval = Convert.ToSingle(dr["SN_Interval"]); } if (dr["Stat"] != DBNull.Value) { bse_Station.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["CreateTime"] != DBNull.Value) { bse_Station.CreateTime = Convert.ToDateTime(dr["CreateTime"]); } if (dr["UpdateTime"] != DBNull.Value) { bse_Station.UpdateTime = Convert.ToDateTime(dr["UpdateTime"]); } if (dr["DeleteTime"] != DBNull.Value) { bse_Station.DeleteTime = Convert.ToDateTime(dr["DeleteTime"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(bse_Station); }
/// <summary> /// 获取指定的设备检修计划 Equ_MPlan对象(即:一条记录 /// </summary> public Equ_MPlan GetByKey(decimal mP_ID) { Equ_MPlan equ_MPlan = new Equ_MPlan(); string sql = "SELECT MP_ID,MP_Code,MP_Name,MP_Stuff,MP_Start,MP_End,VerifyStuff,VerifyStat,VerifyDate,Stat,MP_ECode,MP_EName FROM Equ_MPlan WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND MP_ID=@MP_ID "; idb.AddParameter("@MP_ID", mP_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["MP_ID"] != DBNull.Value) { equ_MPlan.MP_ID = Convert.ToDecimal(dr["MP_ID"]); } if (dr["MP_Code"] != DBNull.Value) { equ_MPlan.MP_Code = Convert.ToString(dr["MP_Code"]); } if (dr["MP_Name"] != DBNull.Value) { equ_MPlan.MP_Name = Convert.ToString(dr["MP_Name"]); } if (dr["MP_Stuff"] != DBNull.Value) { equ_MPlan.MP_Stuff = Convert.ToString(dr["MP_Stuff"]); } if (dr["MP_Start"] != DBNull.Value) { equ_MPlan.MP_Start = Convert.ToDateTime(dr["MP_Start"]); } if (dr["MP_End"] != DBNull.Value) { equ_MPlan.MP_End = Convert.ToDateTime(dr["MP_End"]); } if (dr["VerifyStuff"] != DBNull.Value) { equ_MPlan.VerifyStuff = Convert.ToString(dr["VerifyStuff"]); } if (dr["VerifyStat"] != DBNull.Value) { equ_MPlan.VerifyStat = Convert.ToString(dr["VerifyStat"]); } if (dr["VerifyDate"] != DBNull.Value) { equ_MPlan.VerifyDate = Convert.ToDateTime(dr["VerifyDate"]); } if (dr["Stat"] != DBNull.Value) { equ_MPlan.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["MP_ECode"] != DBNull.Value) { equ_MPlan.MP_ECode = Convert.ToString(dr["MP_ECode"]); } if (dr["MP_EName"] != DBNull.Value) { equ_MPlan.MP_EName = Convert.ToString(dr["MP_EName"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(equ_MPlan); }
/// <summary> /// 获取指定的审核模板配置表 Verify_TemplateConfig对象(即:一条记录 /// </summary> public Verify_TemplateConfig GetByKey(decimal vT_ID) { Verify_TemplateConfig verify_TemplateConfig = new Verify_TemplateConfig(); string sql = "SELECT VT_ID,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 FROM Verify_TemplateConfig WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND VT_ID=@VT_ID "; idb.AddParameter("@VT_ID", vT_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["VT_ID"] != DBNull.Value) { verify_TemplateConfig.VT_ID = Convert.ToDecimal(dr["VT_ID"]); } if (dr["VT_Template_Code"] != DBNull.Value) { verify_TemplateConfig.VT_Template_Code = Convert.ToString(dr["VT_Template_Code"]); } if (dr["VT_Key"] != DBNull.Value) { verify_TemplateConfig.VT_Key = Convert.ToString(dr["VT_Key"]); } if (dr["VT_VerifyNode_Code"] != DBNull.Value) { verify_TemplateConfig.VT_VerifyNode_Code = Convert.ToString(dr["VT_VerifyNode_Code"]); } if (dr["VT_VerifyNode_Name"] != DBNull.Value) { verify_TemplateConfig.VT_VerifyNode_Name = Convert.ToString(dr["VT_VerifyNode_Name"]); } if (dr["Flag"] != DBNull.Value) { verify_TemplateConfig.Flag = Convert.ToInt32(dr["Flag"]); } if (dr["VT_VerifyNode_Order"] != DBNull.Value) { verify_TemplateConfig.VT_VerifyNode_Order = Convert.ToInt32(dr["VT_VerifyNode_Order"]); } if (dr["VT_VerifyNode_Back"] != DBNull.Value) { verify_TemplateConfig.VT_VerifyNode_Back = Convert.ToString(dr["VT_VerifyNode_Back"]); } if (dr["VT_VerifyNode_BackName"] != DBNull.Value) { verify_TemplateConfig.VT_VerifyNode_BackName = Convert.ToString(dr["VT_VerifyNode_BackName"]); } if (dr["VT_Remark"] != DBNull.Value) { verify_TemplateConfig.VT_Remark = Convert.ToString(dr["VT_Remark"]); } if (dr["Stat"] != DBNull.Value) { verify_TemplateConfig.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["VT_AcSum"] != DBNull.Value) { verify_TemplateConfig.VT_AcSum = Convert.ToDecimal(dr["VT_AcSum"]); } if (dr["VT_AcNodeName"] != DBNull.Value) { verify_TemplateConfig.VT_AcNodeName = Convert.ToString(dr["VT_AcNodeName"]); } if (dr["VT_AcNodeCode"] != DBNull.Value) { verify_TemplateConfig.VT_AcNodeCode = Convert.ToString(dr["VT_AcNodeCode"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(verify_TemplateConfig); }
/// <summary> /// 获取指定的联系人信息 Bse_Contacts对象(即:一条记录 /// </summary> public Bse_Contacts GetByKey(decimal bContact_ID) { Bse_Contacts bse_Contacts = new Bse_Contacts(); string sql = "SELECT BContact_ID,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 FROM Bse_Contacts WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND BContact_ID=@BContact_ID "; idb.AddParameter("@BContact_ID", bContact_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["BContact_ID"] != DBNull.Value) { bse_Contacts.BContact_ID = Convert.ToDecimal(dr["BContact_ID"]); } if (dr["Module_Code"] != DBNull.Value) { bse_Contacts.Module_Code = Convert.ToString(dr["Module_Code"]); } if (dr["Record_ID"] != DBNull.Value) { bse_Contacts.Record_ID = Convert.ToString(dr["Record_ID"]); } if (dr["BContact_Name"] != DBNull.Value) { bse_Contacts.BContact_Name = Convert.ToString(dr["BContact_Name"]); } if (dr["BContact_Tel1"] != DBNull.Value) { bse_Contacts.BContact_Tel1 = Convert.ToString(dr["BContact_Tel1"]); } if (dr["BContact_Tel2"] != DBNull.Value) { bse_Contacts.BContact_Tel2 = Convert.ToString(dr["BContact_Tel2"]); } if (dr["BContact_Fax"] != DBNull.Value) { bse_Contacts.BContact_Fax = Convert.ToString(dr["BContact_Fax"]); } if (dr["BContact_Addr"] != DBNull.Value) { bse_Contacts.BContact_Addr = Convert.ToString(dr["BContact_Addr"]); } if (dr["BContact_Email"] != DBNull.Value) { bse_Contacts.BContact_Email = Convert.ToString(dr["BContact_Email"]); } if (dr["BContact_Duty"] != DBNull.Value) { bse_Contacts.BContact_Duty = Convert.ToString(dr["BContact_Duty"]); } if (dr["BContact_Gender"] != DBNull.Value) { bse_Contacts.BContact_Gender = Convert.ToString(dr["BContact_Gender"]); } if (dr["BContact_Career"] != DBNull.Value) { bse_Contacts.BContact_Career = Convert.ToString(dr["BContact_Career"]); } if (dr["BContact_Birth"] != DBNull.Value) { bse_Contacts.BContact_Birth = Convert.ToDateTime(dr["BContact_Birth"]); } if (dr["BContact_From"] != DBNull.Value) { bse_Contacts.BContact_From = Convert.ToString(dr["BContact_From"]); } if (dr["BContact_IsDefault"] != DBNull.Value) { bse_Contacts.BContact_IsDefault = Convert.ToString(dr["BContact_IsDefault"]); } if (dr["CreateDate"] != DBNull.Value) { bse_Contacts.CreateDate = Convert.ToDateTime(dr["CreateDate"]); } if (dr["Creator"] != DBNull.Value) { bse_Contacts.Creator = Convert.ToString(dr["Creator"]); } if (dr["BContact_Bak1"] != DBNull.Value) { bse_Contacts.BContact_Bak1 = Convert.ToString(dr["BContact_Bak1"]); } if (dr["BContact_Bak2"] != DBNull.Value) { bse_Contacts.BContact_Bak2 = Convert.ToString(dr["BContact_Bak2"]); } if (dr["Stat"] != DBNull.Value) { bse_Contacts.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["BContact_Code"] != DBNull.Value) { bse_Contacts.BContact_Code = Convert.ToString(dr["BContact_Code"]); } if (dr["UpdateDate"] != DBNull.Value) { bse_Contacts.UpdateDate = Convert.ToDateTime(dr["UpdateDate"]); } if (dr["DeleteDate"] != DBNull.Value) { bse_Contacts.DeleteDate = Convert.ToDateTime(dr["DeleteDate"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(bse_Contacts); }
/// <summary> /// 获取指定的系统菜单 System_Menu对象(即:一条记录 /// </summary> public System_Menu GetByKey(decimal menu_ID) { System_Menu system_Menu = new System_Menu(); string sql = "SELECT Menu_ID,Menu_Code,Menu_Title,Menu_Location,Menu_PCode,Menu_Enable,Menu_Url,Menu_Order,Menu_Icon,Stat,Shortcut FROM System_Menu WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND Menu_ID=@Menu_ID "; idb.AddParameter("@Menu_ID", menu_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["Menu_ID"] != DBNull.Value) { system_Menu.Menu_ID = Convert.ToDecimal(dr["Menu_ID"]); } if (dr["Menu_Code"] != DBNull.Value) { system_Menu.Menu_Code = Convert.ToString(dr["Menu_Code"]); } if (dr["Menu_Title"] != DBNull.Value) { system_Menu.Menu_Title = Convert.ToString(dr["Menu_Title"]); } if (dr["Menu_Location"] != DBNull.Value) { system_Menu.Menu_Location = Convert.ToString(dr["Menu_Location"]); } if (dr["Menu_PCode"] != DBNull.Value) { system_Menu.Menu_PCode = Convert.ToString(dr["Menu_PCode"]); } if (dr["Menu_Enable"] != DBNull.Value) { system_Menu.Menu_Enable = Convert.ToString(dr["Menu_Enable"]); } if (dr["Menu_Url"] != DBNull.Value) { system_Menu.Menu_Url = Convert.ToString(dr["Menu_Url"]); } if (dr["Menu_Order"] != DBNull.Value) { system_Menu.Menu_Order = Convert.ToInt32(dr["Menu_Order"]); } if (dr["Menu_Icon"] != DBNull.Value) { system_Menu.Menu_Icon = Convert.ToString(dr["Menu_Icon"]); } if (dr["Stat"] != DBNull.Value) { system_Menu.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["Shortcut"] != DBNull.Value) { system_Menu.Shortcut = Convert.ToInt32(dr["Shortcut"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(system_Menu); }
/// <summary> /// 获取指定的Assets_Apply对象(即:一条记录 /// </summary> public Assets_Apply GetByKey(decimal assetsApply_ID) { Assets_Apply assets_Apply = new Assets_Apply(); string sql = "SELECT AssetsApply_ID,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 FROM Assets_Apply WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND AssetsApply_ID=@AssetsApply_ID "; idb.AddParameter("@AssetsApply_ID", assetsApply_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["AssetsApply_ID"] != DBNull.Value) { assets_Apply.AssetsApply_ID = Convert.ToDecimal(dr["AssetsApply_ID"]); } if (dr["AssetsApply_Code"] != DBNull.Value) { assets_Apply.AssetsApply_Code = Convert.ToString(dr["AssetsApply_Code"]); } if (dr["AssetsApply_AppPerson"] != DBNull.Value) { assets_Apply.AssetsApply_AppPerson = Convert.ToString(dr["AssetsApply_AppPerson"]); } if (dr["AssetsApply_AppDept"] != DBNull.Value) { assets_Apply.AssetsApply_AppDept = Convert.ToString(dr["AssetsApply_AppDept"]); } if (dr["AssetsApply_AppName"] != DBNull.Value) { assets_Apply.AssetsApply_AppName = Convert.ToString(dr["AssetsApply_AppName"]); } if (dr["AssetsApply_Parameter"] != DBNull.Value) { assets_Apply.AssetsApply_Parameter = Convert.ToString(dr["AssetsApply_Parameter"]); } if (dr["AssetsApply_Description"] != DBNull.Value) { assets_Apply.AssetsApply_Description = Convert.ToString(dr["AssetsApply_Description"]); } if (dr["AssetsApply_AppCount"] != DBNull.Value) { assets_Apply.AssetsApply_AppCount = Convert.ToInt32(dr["AssetsApply_AppCount"]); } if (dr["AssetsApply_Type"] != DBNull.Value) { assets_Apply.AssetsApply_Type = Convert.ToString(dr["AssetsApply_Type"]); } if (dr["AssetsApply_AppType"] != DBNull.Value) { assets_Apply.AssetsApply_AppType = Convert.ToString(dr["AssetsApply_AppType"]); } if (dr["AssetsApply_Date"] != DBNull.Value) { assets_Apply.AssetsApply_Date = Convert.ToDateTime(dr["AssetsApply_Date"]); } if (dr["AssetsApply_AudistStat"] != DBNull.Value) { assets_Apply.AssetsApply_AudistStat = Convert.ToString(dr["AssetsApply_AudistStat"]); } if (dr["AssetsApply_Stat"] != DBNull.Value) { assets_Apply.AssetsApply_Stat = Convert.ToString(dr["AssetsApply_Stat"]); } if (dr["AssetsApply_Remark"] != DBNull.Value) { assets_Apply.AssetsApply_Remark = Convert.ToString(dr["AssetsApply_Remark"]); } if (dr["Stat"] != DBNull.Value) { assets_Apply.Stat = Convert.ToInt32(dr["Stat"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(assets_Apply); }
/// <summary> /// 获取指定的GPSRecord对象(即:一条记录 /// </summary> public GPSRecord GetByKey(decimal record_ID) { GPSRecord gPSRecord = new GPSRecord(); string sql = "SELECT Record_ID,License_Plate,Terminal_ID,PlateColor,DataType,GPSTime,Longitude,Latitude,GPSFlag,Speed,Direction,Comm_Type,MDTStatus,MDTAlarm,Data_Length,DataContend,Stat,CreateTime FROM GPSRecord WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND Record_ID=@Record_ID "; idb.AddParameter("@Record_ID", record_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["Record_ID"] != DBNull.Value) { gPSRecord.Record_ID = Convert.ToDecimal(dr["Record_ID"]); } if (dr["License_Plate"] != DBNull.Value) { gPSRecord.License_Plate = Convert.ToString(dr["License_Plate"]); } if (dr["Terminal_ID"] != DBNull.Value) { gPSRecord.Terminal_ID = Convert.ToString(dr["Terminal_ID"]); } if (dr["PlateColor"] != DBNull.Value) { gPSRecord.PlateColor = Convert.ToInt32(dr["PlateColor"]); } if (dr["DataType"] != DBNull.Value) { gPSRecord.DataType = Convert.ToInt32(dr["DataType"]); } if (dr["GPSTime"] != DBNull.Value) { gPSRecord.GPSTime = Convert.ToDateTime(dr["GPSTime"]); } if (dr["Longitude"] != DBNull.Value) { gPSRecord.Longitude = Convert.ToDecimal(dr["Longitude"]); } if (dr["Latitude"] != DBNull.Value) { gPSRecord.Latitude = Convert.ToDecimal(dr["Latitude"]); } if (dr["GPSFlag"] != DBNull.Value) { gPSRecord.GPSFlag = Convert.ToInt32(dr["GPSFlag"]); } if (dr["Speed"] != DBNull.Value) { gPSRecord.Speed = Convert.ToInt32(dr["Speed"]); } if (dr["Direction"] != DBNull.Value) { gPSRecord.Direction = Convert.ToInt32(dr["Direction"]); } if (dr["Comm_Type"] != DBNull.Value) { gPSRecord.Comm_Type = Convert.ToInt32(dr["Comm_Type"]); } if (dr["MDTStatus"] != DBNull.Value) { gPSRecord.MDTStatus = Convert.ToInt32(dr["MDTStatus"]); } if (dr["MDTAlarm"] != DBNull.Value) { gPSRecord.MDTAlarm = Convert.ToInt32(dr["MDTAlarm"]); } if (dr["Data_Length"] != DBNull.Value) { gPSRecord.Data_Length = Convert.ToInt32(dr["Data_Length"]); } if (dr["DataContend"] != DBNull.Value) { gPSRecord.DataContend = Convert.ToString(dr["DataContend"]); } if (dr["Stat"] != DBNull.Value) { gPSRecord.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["CreateTime"] != DBNull.Value) { gPSRecord.CreateTime = Convert.ToDateTime(dr["CreateTime"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(gPSRecord); }
/// <summary> /// 获取指定的请购单 WH_ApplyBuy对象(即:一条记录 /// </summary> public WH_ApplyBuy GetByKey(decimal mVI_ID) { WH_ApplyBuy wH_ApplyBuy = new WH_ApplyBuy(); string sql = "SELECT MVI_ID,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 FROM WH_ApplyBuy WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND MVI_ID=@MVI_ID "; idb.AddParameter("@MVI_ID", mVI_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["MVI_ID"] != DBNull.Value) { wH_ApplyBuy.MVI_ID = Convert.ToDecimal(dr["MVI_ID"]); } if (dr["MVI_Code"] != DBNull.Value) { wH_ApplyBuy.MVI_Code = Convert.ToString(dr["MVI_Code"]); } if (dr["MVI_RCode"] != DBNull.Value) { wH_ApplyBuy.MVI_RCode = Convert.ToString(dr["MVI_RCode"]); } if (dr["MVI_Type"] != DBNull.Value) { wH_ApplyBuy.MVI_Type = Convert.ToString(dr["MVI_Type"]); } if (dr["MVI_MCode"] != DBNull.Value) { wH_ApplyBuy.MVI_MCode = Convert.ToString(dr["MVI_MCode"]); } if (dr["MVI_Spec"] != DBNull.Value) { wH_ApplyBuy.MVI_Spec = Convert.ToString(dr["MVI_Spec"]); } if (dr["MVI_Sup"] != DBNull.Value) { wH_ApplyBuy.MVI_Sup = Convert.ToString(dr["MVI_Sup"]); } if (dr["MVI_Num"] != DBNull.Value) { wH_ApplyBuy.MVI_Num = Convert.ToInt32(dr["MVI_Num"]); } if (dr["MVI_Unit"] != DBNull.Value) { wH_ApplyBuy.MVI_Unit = Convert.ToString(dr["MVI_Unit"]); } if (dr["MVI_MDPrice"] != DBNull.Value) { wH_ApplyBuy.MVI_MDPrice = Convert.ToDouble(dr["MVI_MDPrice"]); } if (dr["Stat"] != DBNull.Value) { wH_ApplyBuy.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["MV_CustCode"] != DBNull.Value) { wH_ApplyBuy.MV_CustCode = Convert.ToString(dr["MV_CustCode"]); } if (dr["MV_CustName"] != DBNull.Value) { wH_ApplyBuy.MV_CustName = Convert.ToString(dr["MV_CustName"]); } if (dr["MV_CustRef"] != DBNull.Value) { wH_ApplyBuy.MV_CustRef = Convert.ToString(dr["MV_CustRef"]); } if (dr["MV_CustDate"] != DBNull.Value) { wH_ApplyBuy.MV_CustDate = Convert.ToString(dr["MV_CustDate"]); } if (dr["MV_VerifyStep"] != DBNull.Value) { wH_ApplyBuy.MV_VerifyStep = Convert.ToString(dr["MV_VerifyStep"]); } if (dr["MV_VerifyStuff"] != DBNull.Value) { wH_ApplyBuy.MV_VerifyStuff = Convert.ToString(dr["MV_VerifyStuff"]); } if (dr["MV_VerifyDate"] != DBNull.Value) { wH_ApplyBuy.MV_VerifyDate = Convert.ToDateTime(dr["MV_VerifyDate"]); } if (dr["MV_VerifyStat"] != DBNull.Value) { wH_ApplyBuy.MV_VerifyStat = Convert.ToString(dr["MV_VerifyStat"]); } if (dr["MV_ContractNo"] != DBNull.Value) { wH_ApplyBuy.MV_ContractNo = Convert.ToString(dr["MV_ContractNo"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(wH_ApplyBuy); }
/// <summary> /// 获取指定的PC_WError对象(即:一条记录 /// </summary> public PC_WError GetByKey(decimal pCWE_ID) { PC_WError pC_WError = new PC_WError(); string sql = "SELECT PCWE_ID,PCWE_Code,PCWE_Module,PCWE_WHCode,PCWE_WHName,PCWE_MCode,PCWE_MName,PCWE_Unit,PCWE_Num,PCWE_Operator,PCWE_OpDate,PCWE_Bak,Stat,CreateDate,UpdateDate,DeleteDate FROM PC_WError WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND PCWE_ID=@PCWE_ID "; idb.AddParameter("@PCWE_ID", pCWE_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["PCWE_ID"] != DBNull.Value) { pC_WError.PCWE_ID = Convert.ToDecimal(dr["PCWE_ID"]); } if (dr["PCWE_Code"] != DBNull.Value) { pC_WError.PCWE_Code = Convert.ToString(dr["PCWE_Code"]); } if (dr["PCWE_Module"] != DBNull.Value) { pC_WError.PCWE_Module = Convert.ToString(dr["PCWE_Module"]); } if (dr["PCWE_WHCode"] != DBNull.Value) { pC_WError.PCWE_WHCode = Convert.ToString(dr["PCWE_WHCode"]); } if (dr["PCWE_WHName"] != DBNull.Value) { pC_WError.PCWE_WHName = Convert.ToString(dr["PCWE_WHName"]); } if (dr["PCWE_MCode"] != DBNull.Value) { pC_WError.PCWE_MCode = Convert.ToString(dr["PCWE_MCode"]); } if (dr["PCWE_MName"] != DBNull.Value) { pC_WError.PCWE_MName = Convert.ToString(dr["PCWE_MName"]); } if (dr["PCWE_Unit"] != DBNull.Value) { pC_WError.PCWE_Unit = Convert.ToString(dr["PCWE_Unit"]); } if (dr["PCWE_Num"] != DBNull.Value) { pC_WError.PCWE_Num = Convert.ToDecimal(dr["PCWE_Num"]); } if (dr["PCWE_Operator"] != DBNull.Value) { pC_WError.PCWE_Operator = Convert.ToString(dr["PCWE_Operator"]); } if (dr["PCWE_OpDate"] != DBNull.Value) { pC_WError.PCWE_OpDate = Convert.ToDateTime(dr["PCWE_OpDate"]); } if (dr["PCWE_Bak"] != DBNull.Value) { pC_WError.PCWE_Bak = Convert.ToString(dr["PCWE_Bak"]); } if (dr["Stat"] != DBNull.Value) { pC_WError.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["CreateDate"] != DBNull.Value) { pC_WError.CreateDate = Convert.ToDateTime(dr["CreateDate"]); } if (dr["UpdateDate"] != DBNull.Value) { pC_WError.UpdateDate = Convert.ToDateTime(dr["UpdateDate"]); } if (dr["DeleteDate"] != DBNull.Value) { pC_WError.DeleteDate = Convert.ToDateTime(dr["DeleteDate"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(pC_WError); }
/// <summary> /// 获取指定的通用参考主表 Sys_Config_Refer对象(即:一条记录 /// </summary> public Sys_Config_Refer GetByKey(decimal r_ID) { Sys_Config_Refer sys_Config_Refer = new Sys_Config_Refer(); string sql = "SELECT R_ID,R_ModuleName,R_NameSpace,R_Title,R_Width,R_Height,Stat,R_TableName,R_FilterSql,R_SQL,R_Url FROM Sys_Config_Refer WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND R_ID=@R_ID "; idb.AddParameter("@R_ID", r_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["R_ID"] != DBNull.Value) { sys_Config_Refer.R_ID = Convert.ToDecimal(dr["R_ID"]); } if (dr["R_ModuleName"] != DBNull.Value) { sys_Config_Refer.R_ModuleName = Convert.ToString(dr["R_ModuleName"]); } if (dr["R_NameSpace"] != DBNull.Value) { sys_Config_Refer.R_NameSpace = Convert.ToString(dr["R_NameSpace"]); } if (dr["R_Title"] != DBNull.Value) { sys_Config_Refer.R_Title = Convert.ToString(dr["R_Title"]); } if (dr["R_Width"] != DBNull.Value) { sys_Config_Refer.R_Width = Convert.ToInt32(dr["R_Width"]); } if (dr["R_Height"] != DBNull.Value) { sys_Config_Refer.R_Height = Convert.ToInt32(dr["R_Height"]); } if (dr["Stat"] != DBNull.Value) { sys_Config_Refer.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["R_TableName"] != DBNull.Value) { sys_Config_Refer.R_TableName = Convert.ToString(dr["R_TableName"]); } if (dr["R_FilterSql"] != DBNull.Value) { sys_Config_Refer.R_FilterSql = Convert.ToString(dr["R_FilterSql"]); } if (dr["R_SQL"] != DBNull.Value) { sys_Config_Refer.R_SQL = Convert.ToString(dr["R_SQL"]); } if (dr["R_Url"] != DBNull.Value) { sys_Config_Refer.R_Url = Convert.ToString(dr["R_Url"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(sys_Config_Refer); }
/// <summary> /// 获取指定的合同细目信息 WH_CItem对象(即:一条记录 /// </summary> public WH_CItem GetByKey(decimal wHCI_ID) { WH_CItem wH_CItem = new WH_CItem(); string sql = "SELECT WHCI_ID,WHCI_CCode,WHCI_MCode,WHCI_Num,WHCI_Unit,WHCI_Manu,WHCI_MDate,Stat,CreateDate,UpdateDate,DeleteDate FROM WH_CItem WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND WHCI_ID=@WHCI_ID "; idb.AddParameter("@WHCI_ID", wHCI_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["WHCI_ID"] != DBNull.Value) { wH_CItem.WHCI_ID = Convert.ToDecimal(dr["WHCI_ID"]); } if (dr["WHCI_CCode"] != DBNull.Value) { wH_CItem.WHCI_CCode = Convert.ToString(dr["WHCI_CCode"]); } if (dr["WHCI_MCode"] != DBNull.Value) { wH_CItem.WHCI_MCode = Convert.ToString(dr["WHCI_MCode"]); } if (dr["WHCI_Num"] != DBNull.Value) { wH_CItem.WHCI_Num = Convert.ToInt32(dr["WHCI_Num"]); } if (dr["WHCI_Unit"] != DBNull.Value) { wH_CItem.WHCI_Unit = Convert.ToString(dr["WHCI_Unit"]); } if (dr["WHCI_Manu"] != DBNull.Value) { wH_CItem.WHCI_Manu = Convert.ToString(dr["WHCI_Manu"]); } if (dr["WHCI_MDate"] != DBNull.Value) { wH_CItem.WHCI_MDate = Convert.ToDateTime(dr["WHCI_MDate"]); } if (dr["Stat"] != DBNull.Value) { wH_CItem.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["CreateDate"] != DBNull.Value) { wH_CItem.CreateDate = Convert.ToDateTime(dr["CreateDate"]); } if (dr["UpdateDate"] != DBNull.Value) { wH_CItem.UpdateDate = Convert.ToDateTime(dr["UpdateDate"]); } if (dr["DeleteDate"] != DBNull.Value) { wH_CItem.DeleteDate = Convert.ToDateTime(dr["DeleteDate"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(wH_CItem); }
/// <summary> /// 获取指定的外联协调信息 Outreach_Coordination对象(即:一条记录 /// </summary> public Outreach_Coordination GetByKey(decimal oC_ID) { Outreach_Coordination outreach_Coordination = new Outreach_Coordination(); string sql = "SELECT OC_ID,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 FROM Outreach_Coordination WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND OC_ID=@OC_ID "; idb.AddParameter("@OC_ID", oC_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["OC_ID"] != DBNull.Value) { outreach_Coordination.OC_ID = Convert.ToDecimal(dr["OC_ID"]); } if (dr["OC_Code"] != DBNull.Value) { outreach_Coordination.OC_Code = Convert.ToString(dr["OC_Code"]); } if (dr["OC_OutretachCode"] != DBNull.Value) { outreach_Coordination.OC_OutretachCode = Convert.ToString(dr["OC_OutretachCode"]); } if (dr["OC_OutreachName"] != DBNull.Value) { outreach_Coordination.OC_OutreachName = Convert.ToString(dr["OC_OutreachName"]); } if (dr["OC_CoordinationType"] != DBNull.Value) { outreach_Coordination.OC_CoordinationType = Convert.ToString(dr["OC_CoordinationType"]); } if (dr["OC_MainContactor"] != DBNull.Value) { outreach_Coordination.OC_MainContactor = Convert.ToString(dr["OC_MainContactor"]); } if (dr["OC_Telephone"] != DBNull.Value) { outreach_Coordination.OC_Telephone = Convert.ToString(dr["OC_Telephone"]); } if (dr["OC_Content"] != DBNull.Value) { outreach_Coordination.OC_Content = Convert.ToString(dr["OC_Content"]); } if (dr["OC_Result"] != DBNull.Value) { outreach_Coordination.OC_Result = Convert.ToString(dr["OC_Result"]); } if (dr["OC_ResultType"] != DBNull.Value) { outreach_Coordination.OC_ResultType = Convert.ToString(dr["OC_ResultType"]); } if (dr["OC_Cost"] != DBNull.Value) { outreach_Coordination.OC_Cost = Convert.ToDecimal(dr["OC_Cost"]); } if (dr["OC_Remark"] != DBNull.Value) { outreach_Coordination.OC_Remark = Convert.ToString(dr["OC_Remark"]); } if (dr["OC_Attachment"] != DBNull.Value) { outreach_Coordination.OC_Attachment = Convert.ToString(dr["OC_Attachment"]); } if (dr["OC_Company"] != DBNull.Value) { outreach_Coordination.OC_Company = Convert.ToString(dr["OC_Company"]); } if (dr["OC_Dept"] != DBNull.Value) { outreach_Coordination.OC_Dept = Convert.ToString(dr["OC_Dept"]); } if (dr["OC_iType"] != DBNull.Value) { outreach_Coordination.OC_iType = Convert.ToString(dr["OC_iType"]); } if (dr["Stat"] != DBNull.Value) { outreach_Coordination.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["CreateDate"] != DBNull.Value) { outreach_Coordination.CreateDate = Convert.ToDateTime(dr["CreateDate"]); } if (dr["UpdateDate"] != DBNull.Value) { outreach_Coordination.UpdateDate = Convert.ToDateTime(dr["UpdateDate"]); } if (dr["DeleteDate"] != DBNull.Value) { outreach_Coordination.DeleteDate = Convert.ToDateTime(dr["DeleteDate"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(outreach_Coordination); }
/// <summary> /// 获取指定的车辆事件表 PCT_Event对象(即:一条记录 /// </summary> public PCT_Event GetByKey(decimal pCTE_ID) { PCT_Event pCT_Event = new PCT_Event(); string sql = "SELECT PCTE_ID,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 FROM PCT_Event WHERE 1=1 AND ((Stat is null) or (Stat=0) ) AND PCTE_ID=@PCTE_ID "; idb.AddParameter("@PCTE_ID", pCTE_ID); SqlDataReader dr = null; try { dr = (SqlDataReader)idb.ReturnReader(sql); while (dr.Read()) { if (dr["PCTE_ID"] != DBNull.Value) { pCT_Event.PCTE_ID = Convert.ToDecimal(dr["PCTE_ID"]); } if (dr["PCTE_Code"] != DBNull.Value) { pCT_Event.PCTE_Code = Convert.ToString(dr["PCTE_Code"]); } if (dr["PCTE_CCode"] != DBNull.Value) { pCT_Event.PCTE_CCode = Convert.ToString(dr["PCTE_CCode"]); } if (dr["PCTE_CNo"] != DBNull.Value) { pCT_Event.PCTE_CNo = Convert.ToString(dr["PCTE_CNo"]); } if (dr["PCTE_Description"] != DBNull.Value) { pCT_Event.PCTE_Description = Convert.ToString(dr["PCTE_Description"]); } if (dr["PCTE_BeginDate"] != DBNull.Value) { pCT_Event.PCTE_BeginDate = Convert.ToDateTime(dr["PCTE_BeginDate"]); } if (dr["PCTE_EndDate"] != DBNull.Value) { pCT_Event.PCTE_EndDate = Convert.ToDateTime(dr["PCTE_EndDate"]); } if (dr["PCTE_EventType"] != DBNull.Value) { pCT_Event.PCTE_EventType = Convert.ToString(dr["PCTE_EventType"]); } if (dr["PCTE_DCode"] != DBNull.Value) { pCT_Event.PCTE_DCode = Convert.ToString(dr["PCTE_DCode"]); } if (dr["PCTE_Join"] != DBNull.Value) { pCT_Event.PCTE_Join = Convert.ToString(dr["PCTE_Join"]); } if (dr["PCTE_Cost"] != DBNull.Value) { pCT_Event.PCTE_Cost = Convert.ToDecimal(dr["PCTE_Cost"]); } if (dr["PCTE_Before"] != DBNull.Value) { pCT_Event.PCTE_Before = Convert.ToSingle(dr["PCTE_Before"]); } if (dr["PCTE_After"] != DBNull.Value) { pCT_Event.PCTE_After = Convert.ToSingle(dr["PCTE_After"]); } if (dr["PCTE_Address"] != DBNull.Value) { pCT_Event.PCTE_Address = Convert.ToString(dr["PCTE_Address"]); } if (dr["Stat"] != DBNull.Value) { pCT_Event.Stat = Convert.ToInt32(dr["Stat"]); } if (dr["CreateDate"] != DBNull.Value) { pCT_Event.CreateDate = Convert.ToDateTime(dr["CreateDate"]); } if (dr["UpdateDate"] != DBNull.Value) { pCT_Event.UpdateDate = Convert.ToDateTime(dr["UpdateDate"]); } if (dr["DeleteDate"] != DBNull.Value) { pCT_Event.DeleteDate = Convert.ToDateTime(dr["DeleteDate"]); } if (dr["PCTE_iType"] != DBNull.Value) { pCT_Event.PCTE_iType = Convert.ToString(dr["PCTE_iType"]); } if (dr["PCTE_TCode"] != DBNull.Value) { pCT_Event.PCTE_TCode = Convert.ToString(dr["PCTE_TCode"]); } if (dr["PCTE_Udef2"] != DBNull.Value) { pCT_Event.PCTE_Udef2 = Convert.ToString(dr["PCTE_Udef2"]); } if (dr["PCTE_Udef3"] != DBNull.Value) { pCT_Event.PCTE_Udef3 = Convert.ToString(dr["PCTE_Udef3"]); } if (dr["PCTE_Udef4"] != DBNull.Value) { pCT_Event.PCTE_Udef4 = Convert.ToString(dr["PCTE_Udef4"]); } if (dr["PCTE_Udef5"] != DBNull.Value) { pCT_Event.PCTE_Udef5 = Convert.ToString(dr["PCTE_Udef5"]); } } }catch (System.Exception ex) { throw ex; } finally { if (dr != null) { dr.Close(); } if (idb.GetConnection() != null && idb.GetConnection().State == ConnectionState.Open) { idb.GetConnection().Close(); } } return(pCT_Event); }