public M_Plat_Comp GetModelFromReader(DbDataReader rdr) { M_Plat_Comp model = new M_Plat_Comp(); model.ID = Convert.ToInt32(rdr["ID"]); model.CompLogo = rdr["CompLogo"].ToString(); model.CompName = rdr["CompName"].ToString(); model.CompDesc = rdr["CompDesc"].ToString(); model.CompType = Convert.ToInt32(rdr["CompType"]); model.Status = Convert.ToInt32(rdr["Status"]); model.CreateUser = Convert.ToInt32(rdr["CreateUser"]); model.CreateTime = Convert.ToDateTime(rdr["CreateTime"]); model.Mails = ConverToStr(rdr["Mails"]); model.CompHref = ConverToStr(rdr["CompHref"]); model.UPPath = ConverToStr(rdr["UPPath"]); model.CompShort = ConverToStr(rdr["CompShort"]); model.Telephone = ConverToStr(rdr["Telephone"]); model.Mobile = ConverToStr(rdr["Mobile"]); rdr.Close(); return(model); }
public override SqlParameter[] GetParameters() { M_Plat_Comp model = this; EmptyDeal(); SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.CompLogo; sp[2].Value = model.CompName; sp[3].Value = model.CompDesc; sp[4].Value = model.CompType; sp[5].Value = model.Status; sp[6].Value = model.CreateUser; sp[7].Value = model.CreateTime; sp[8].Value = model.Mails; sp[9].Value = model.CompHref; sp[10].Value = model.UPPath; sp[11].Value = model.CompShort; sp[12].Value = model.Telephone; sp[13].Value = model.Mobile; return(sp); }