public M_Shop_Present GetModelFromReader(DataRow rdr) { M_Shop_Present model = new M_Shop_Present(); model.ID = ConvertToInt(rdr["ID"]); model.ProID = ConvertToInt(rdr["ProID"]); model.W_StartNum = ConvertToInt(rdr["W_StartNum"]); model.P_ID = ConvertToInt(rdr["P_ID"]); model.P_Num = ConvertToInt(rdr["P_Num"]); model.P_Name = ConverToStr(rdr["P_Name"]); model.P_Price = ConverToDouble(rdr["P_Price"]); model.W_Type = ConvertToInt(rdr["W_Type"]); model.Name = ConverToStr(rdr["Name"]); return(model); }
public override SqlParameter[] GetParameters() { M_Shop_Present model = this; SqlParameter[] sp = GetSP(); if (model.W_StartNum < 1) { model.W_StartNum = 1; } sp[0].Value = model.ID; sp[1].Value = model.ProID; sp[2].Value = model.W_StartNum; sp[3].Value = model.P_ID; sp[4].Value = model.P_Num; sp[5].Value = model.P_Name; sp[6].Value = model.P_Price; sp[7].Value = model.W_Type; sp[8].Value = model.Name; return(sp); }