public override SqlParameter[] GetParameters() { M_UserBank model = this; SqlParameter[] sp = GetSP(); sp[0].Value = model.Bank_ID; sp[1].Value = model.UserID; sp[2].Value = model.BankName; sp[3].Value = model.BankUserName; sp[4].Value = model.BankNumber; sp[5].Value = model.CardType; sp[6].Value = model.Remark; return(sp); }
public M_UserBank GetModelFromReader(DbDataReader rdr) { M_UserBank model = new M_UserBank(); model.Bank_ID = Convert.ToInt32(rdr["Bank_ID"]); model.UserID = Convert.ToInt32(rdr["UserID"]); model.BankName = ConverToStr(rdr["BankName"]); model.BankUserName = ConverToStr(rdr["BankUserName"]); model.BankNumber = ConverToStr(rdr["BankNumber"]); model.CardType = ConverToStr(rdr["CardType"]); model.Remark = ConverToStr(rdr["Remark"]); rdr.Close(); rdr.Dispose(); return(model); }