public M_Shop_GroupPro GetModelFromReader(DbDataReader rdr) { M_Shop_GroupPro model = new M_Shop_GroupPro(); model.ID = ConvertToInt(rdr["ID"]); model.Name = ConverToStr(rdr["Name"]); model.ProIDS = ConverToStr(rdr["ProIDS"]); model.AdminID = ConvertToInt(rdr["AdminID"]); model.CDate = ConvertToDate(rdr["CDate"]); model.Remind = ConverToStr(rdr["Remind"]); model.UserID = ConvertToInt(rdr["UserID"]); model.StoreID = ConvertToInt(rdr["StoreID"]); rdr.Close(); return(model); }
public override SqlParameter[] GetParameters() { M_Shop_GroupPro model = this; if (model.CDate <= DateTime.MinValue) { model.CDate = DateTime.Now; } SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.Name; sp[2].Value = PureIdsForDB(model.ProIDS); sp[3].Value = model.AdminID; sp[4].Value = model.CDate; sp[5].Value = model.Remind; sp[6].Value = model.UserID; sp[7].Value = model.StoreID; return(sp); }