public M_Content_Chart GetModelFromReader(DbDataReader rdr) { M_Content_Chart model = new M_Content_Chart(); model.ID = Convert.ToInt32(rdr["ID"]); model.TName = ConverToStr(rdr["TName"]); model.SType = ConverToStr(rdr["SType"]); model.option = ConverToStr(rdr["option"]); model.AdminID = ConvertToInt(rdr["AdminID"]); model.UserID = ConvertToInt(rdr["UserID"]); model.CDate = ConvertToDate(rdr["CDate"]); model.ChartTitle = ConverToStr(rdr["ChartTitle"]); model.ToolBox = ConverToStr(rdr["ToolBox"]); model.Package = ConverToStr(rdr["Package"]); model.Tag = ConverToStr(rdr["Tag"]); rdr.Close(); return(model); }
public override SqlParameter[] GetParameters() { M_Content_Chart model = this; SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.TName; sp[2].Value = model.SType; sp[3].Value = model.option; sp[4].Value = model.AdminID; sp[5].Value = model.UserID; sp[6].Value = model.CDate; sp[7].Value = model.ChartTitle; sp[8].Value = model.ToolBox; sp[9].Value = model.Package; sp[10].Value = model.Tag; return(sp); }