public M_GuestAnswer GetModelFromReader(DbDataReader rdr) { M_GuestAnswer model = new M_GuestAnswer(); model.ID = Convert.ToInt32(rdr["ID"].ToString()); model.QueId = Convert.ToInt32(rdr["QueId"]); model.Content = ConverToStr(rdr["Content"]); model.AddTime = ConvertToDate(rdr["AddTime"]); model.UserId = Convert.ToInt32(rdr["UserId"]); model.UserName = ConverToStr(rdr["UserName"]); model.Status = ConvertToInt(rdr["Status"]); model.supplymentid = ConvertToInt(rdr["supplymentid"]); model.audit = ConvertToInt(rdr["audit"]); model.IsNi = ConvertToInt(rdr["IsNi"]); rdr.Close(); return(model); }
public override SqlParameter[] GetParameters() { M_GuestAnswer model = this; SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.QueId; sp[2].Value = model.Content; sp[3].Value = model.AddTime; sp[4].Value = model.UserId; sp[5].Value = model.UserName; sp[6].Value = model.Status; sp[7].Value = model.supplymentid; sp[8].Value = model.audit; sp[9].Value = model.IsNi; return(sp); }