public List <keyValuePair> getbanklist() { //select * from T_0119 where F_0119_03=2 order by F_0119_04 List <keyValuePair> listKv = new List <keyValuePair>(); SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn()); sa.addSelect("F_0119_01,F_0119_02"); sa.addCondition("F_0119_03", 2, CompareType.Equal, LogicType.none, ""); sa.addOrder("F_0119_04", true); DataTable bankDT = sa.select("T_0119"); if (bankDT != null && bankDT.Rows.Count > 0) { foreach (DataRow dr in bankDT.Rows) { keyValuePair kv = new keyValuePair(); kv.key = dr["F_0119_01"].ToString(); kv.value = dr["F_0119_02"].ToString(); if (!listKv.Contains(kv)) { listKv.Add(kv); } } } return(listKv); }
/// <summary> 获取全数据 资料拼接展示 /// </summary> public void getFullData(string contractid, ref string ReceiveBuyHaveDatas, ref string ReceiveSellHaveDatas, ref string ReceiveBuyNoHaveDatas, ref string ReceiveSellNoHaveDatas) { SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn()); sa.addSelect( "F_8100_01,F_8100_02,F_8100_03,F_8100_04,F_8100_05,F_8100_06,F_8100_07,F_8100_08,F_8100_09,F_992"); sa.addCondition("F_8100_02", contractid, CompareType.Equal, LogicType.none, ""); sa.addOrder("F_992", false); DataTable dt = sa.select("T_8100"); List <receiveData> list_receiveData = new List <receiveData>(); foreach (DataRow dr in dt.Rows) { receiveData b = new receiveData(); b.id = dr["F_8100_01"].ToString(); b.cid = dr["F_8100_02"].ToString(); b.receiveBuyData = dr["F_8100_03"].ToString(); b.receiveSellData = dr["F_8100_04"].ToString(); b.DataIsReceiveOK = bool.Parse(dr["F_8100_05"].ToString()); b.remark = dr["F_8100_07"].ToString(); b.arriveTime = dr["F_8100_08"].ToString(); b.operatorName = dr["F_8100_09"].ToString(); b.inputTime = dr["F_992"].ToString(); getData(b); list_receiveData.Add(b); } foreach (receiveData item in list_receiveData) { ReceiveBuyHaveDatas += string.IsNullOrEmpty(item.receiveBuyHaveData) ? "" : item.receiveBuyHaveData + ","; ReceiveSellHaveDatas += string.IsNullOrEmpty(item.receiveSellHaveData) ? "" : item.receiveSellHaveData + ","; ReceiveBuyNoHaveDatas += string.IsNullOrEmpty(item.receiveBuyNoHaveData) ? "" : item.receiveBuyNoHaveData + ","; ReceiveSellNoHaveDatas += string.IsNullOrEmpty(item.receiveSellNoHaveData) ? "" : item.receiveSellNoHaveData + ","; } if (!string.IsNullOrEmpty(ReceiveBuyHaveDatas)) { ReceiveBuyHaveDatas = ReceiveBuyHaveDatas.TrimEnd(','); } if (!string.IsNullOrEmpty(ReceiveSellHaveDatas)) { ReceiveSellHaveDatas = ReceiveSellHaveDatas.TrimEnd(','); } if (!string.IsNullOrEmpty(ReceiveBuyNoHaveDatas)) { ReceiveBuyNoHaveDatas = ReceiveBuyNoHaveDatas.TrimEnd(','); } if (!string.IsNullOrEmpty(ReceiveSellNoHaveDatas)) { ReceiveSellNoHaveDatas = ReceiveSellNoHaveDatas.TrimEnd(','); } }
/// <summary> /// 合同ID /// </summary> /// <param name="contactid">合同ID</param> /// <returns></returns> public DataRow selbankcode(string contactid) { SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn()); sa.addSelect("F_8057_02"); sa.addCondition("F_8057_02", contactid, CompareType.Equal, LogicType.none, ""); DataTable dt = sa.select("T_8057"); if (dt != null && dt.Rows.Count > 0) { return(dt.Rows[0]); } return(null); }
/// <summary> 获取资料是否齐全 /// </summary> /// <param name="contactid"></param> /// <param name="plan"></param> public string getDataFull(string contactid) { SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn()); sa.addSelect("F_8057_71"); sa.addCondition("F_8057_02", contactid, CompareType.Equal, LogicType.none, ""); sa.addCondition("F_8057_78", ElectroniContracType.其他.GetHashCode(), CompareType.Equal, LogicType.And, ""); DataTable dt = sa.select("T_8057"); if (dt == null || dt.Rows.Count < 1) { return(""); } return(dt.Rows[0]["F_8057_71"].ToString()); }
/// <summary> /// 根据按揭资料ID得到相应数据 /// </summary> /// <param name="bankcodeid">按揭资料ID</param> /// <returns></returns> public DataRow selectbankcode(string bankcodeid) { SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn()); sa.addSelect("F_8100_01,F_8100_02,F_8100_03,F_8100_04,F_8100_05,F_8100_07,F_8100_08,F_8100_09,F_991,F_992,F_993"); sa.addCondition("F_8100_01", bankcodeid, CompareType.Equal, LogicType.none, ""); sa.addCondition("F_993", 0, CompareType.Equal, LogicType.And, ""); DataTable dt = sa.select("T_8100"); if (dt != null && dt.Rows.Count > 0) { return(dt.Rows[0]); } return(null); }
public DataRow selectcontractinfo(string contractid) { SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn()); sa.addSelect("F_8057_03,F_8057_13,F_8057_44,F_8057_60,F_8057_86,F_8057_40,F_8057_36,F_8057_09,F_8057_10,F_8057_11"); sa.addSelect("F_8057_74,F_8057_84,F_8057_85,F_8057_95,F_8057_96,F_8057_97,F_8057_98,F_8057_99"); sa.addCondition("F_8057_02", contractid, CompareType.Equal, LogicType.none, ""); sa.addCondition("F_8057_78", ElectroniContracType.其他.GetHashCode(), CompareType.Equal, LogicType.And, ""); DataTable dt = sa.select("T_8057"); if (dt != null && dt.Rows.Count > 0) { return(dt.Rows[0]); } return(null); }
/// <summary> /// 获取银行支行登陆信息 /// </summary> /// <param name="subbranchid"></param> /// <returns></returns> public UserPrincipal getSubbranchLoginInfo(string subbranchid) { SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn()); sa.addSelect("F_0119_02,F_0120_03,F_0120_11,F_0120_10"); sa.addCondition("F_0120_01", subbranchid.Split('|')[0], CompareType.Equal, LogicType.none, ""); DataTable bankDT = sa.select("T_0120 inner join T_0119 on F_0119_01=F_0120_02"); if (bankDT.Rows.Count > 0) { DataRow bankDR = bankDT.Rows[0]; UserPrincipal bankinfo = new UserPrincipal(); bankinfo.SubbranchID = subbranchid; bankinfo.SubbranchName = bankDR["F_0119_02"].ToString() + bankDR["F_0120_03"].ToString(); //bankinfo.UserName = bankDR["F_0120_11"].ToString(); bankinfo.UserName = subbranchid.Split('|')[1]; bankinfo.Password = bankDR["F_0120_10"].ToString(); return(bankinfo); } return(null); }
/// <summary> /// 获取银行支行登陆信息 /// </summary> /// <param name="subbranchid"></param> /// <returns></returns> public UserPrincipal getLoginInfoByBankName(string bankname, string username) { SqlAgent sa = new SqlAgent(SysConfiguration.GetErpSqlConn()); sa.addSelect("F_0120_01,F_0119_02,F_0120_03,F_0120_11,F_0120_10"); sa.addCondition("F_0119_02", bankname, CompareType.Equal, LogicType.none, ""); sa.addCondition("F_0120_11", "%," + username + ",%", CompareType.Like, LogicType.And, ""); DataTable bankDT = sa.select("T_0120 inner join T_0119 on F_0119_01=F_0120_02"); if (bankDT.Rows.Count > 0) { DataRow bankDR = bankDT.Rows[0]; UserPrincipal bankinfo = new UserPrincipal(); bankinfo.SubbranchID = bankDR["F_0120_01"].ToString(); bankinfo.SubbranchName = bankDR["F_0119_02"].ToString() + bankDR["F_0120_03"].ToString(); //bankinfo.UserName = bankDR["F_0120_11"].ToString(); bankinfo.UserName = username; bankinfo.Password = bankDR["F_0120_10"].ToString(); return(bankinfo); } return(null); }