public SqlParameter[] GetParameters(M_BossInfo model) { SqlParameter[] sp = GetSP(); sp[0].Value = model.nodeid; sp[1].Value = model.parentid; sp[2].Value = model.shoptype; sp[3].Value = model.userid; sp[4].Value = model.Childs; sp[5].Value = model.CMoney; sp[6].Value = model.Province; sp[7].Value = model.city; sp[8].Value = model.CName; sp[9].Value = model.Address; sp[10].Value = model.Agent; sp[11].Value = model.license; sp[12].Value = model.CTel; sp[13].Value = model.CInfo; sp[14].Value = model.ContractNum; sp[15].Value = model.AccountPeople; sp[16].Value = model.Bank; sp[17].Value = model.BankNum; sp[18].Value = model.AccountPeople2; sp[19].Value = model.Bank2; sp[20].Value = model.BankNum2; sp[21].Value = model.linkname; sp[22].Value = model.linksex; sp[23].Value = model.linkPositions; sp[24].Value = model.linktel; sp[25].Value = model.fax; sp[26].Value = model.PostCode; sp[27].Value = model.email; sp[28].Value = model.Documents; sp[29].Value = model.DocumentsNUm; return(sp); }
public M_BossInfo GetModelFromReader(DbDataReader rdr) { M_BossInfo model = new M_BossInfo(); model.nodeid = ConvertToInt(rdr["nodeid"]); model.parentid = ConvertToInt(rdr["parentid"]); model.shoptype = ConvertToInt(rdr["shoptype"]); model.userid = ConvertToInt(rdr["userid"]); model.Childs = ConvertToInt(rdr["Childs"]); model.CMoney = ConvertToInt(rdr["CMoney"]); model.Province = ConverToStr(rdr["Province"]); model.city = ConverToStr(rdr["city"]); model.CName = ConverToStr(rdr["CName"]); model.Address = ConverToStr(rdr["Address"]); model.Agent = ConverToStr(rdr["Agent"]); model.license = ConverToStr(rdr["license"]); model.CTel = ConverToStr(rdr["CTel"]); model.CInfo = ConverToStr(rdr["CInfo"]); model.ContractNum = ConverToStr(rdr["ContractNum"]); model.AccountPeople = ConverToStr(rdr["AccountPeople"]); model.Bank = ConverToStr(rdr["Bank"]); model.BankNum = ConverToStr(rdr["BankNum"]); model.AccountPeople2 = ConverToStr(rdr["AccountPeople2"]); model.Bank2 = ConverToStr(rdr["Bank2"]); model.BankNum2 = ConverToStr(rdr["BankNum2"]); model.linkname = ConverToStr(rdr["linkname"]); model.linksex = ConverToStr(rdr["linksex"]); model.linkPositions = ConverToStr(rdr["linkPositions"]); model.linktel = ConverToStr(rdr["linktel"]); model.fax = ConverToStr(rdr["fax"]); model.PostCode = ConverToStr(rdr["PostCode"]); model.email = ConverToStr(rdr["email"]); model.Documents = ConverToStr(rdr["Documents"]); model.DocumentsNUm = ConverToStr(rdr["DocumentsNUm"]); rdr.Close(); return(model); }