public M_WX_PayLog GetModelFromReader(DbDataReader rdr) { M_WX_PayLog model = new M_WX_PayLog(); model.ID = Convert.ToInt32(rdr["ID"]); model.OpenID = ConverToStr(rdr["OpenID"]); model.AMount = ConverToDouble(rdr["AMount"]); model.TrueName = ConverToStr(rdr["TrueName"]); model.PayType = ConvertToInt(rdr["PayType"]); model.FormXML = ConverToStr(rdr["FormXML"]); model.WXResult = ConverToStr(rdr["WXResult"]); model.ZStatus = ConvertToInt(rdr["ZStatus"]); model.AdminID = ConvertToInt(rdr["AdminID"]); model.CDate = ConvertToDate(rdr["CDate"]); model.Remind = ConverToStr(rdr["Remind"]); model.SysRemind = ConverToStr(rdr["SysRemind"]); model.AppID = ConvertToInt(rdr["AppID"]); rdr.Close(); return(model); }
public override SqlParameter[] GetParameters() { M_WX_PayLog model = this; if (model.CDate <= DateTime.MinValue) { model.CDate = DateTime.Now; } SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.OpenID; sp[2].Value = model.AMount; sp[3].Value = model.TrueName; sp[4].Value = model.PayType; sp[5].Value = model.FormXML; sp[6].Value = model.WXResult; sp[7].Value = model.ZStatus; sp[8].Value = model.AdminID; sp[9].Value = model.CDate; sp[10].Value = model.Remind; sp[11].Value = model.SysRemind; sp[12].Value = model.AppID; return(sp); }