public M_Shop_PrintMessage GetModelFromReader(DbDataReader rdr) { M_Shop_PrintMessage model = new M_Shop_PrintMessage(); model.ID = Convert.ToInt32(rdr["ID"]); model.MsgNo = ConverToStr(rdr["MsgNo"]); model.Mode = ConvertToInt(rdr["Mode"]); model.Detail = ConverToStr(rdr["Detail"]); model.TaskStatus = ConverToStr(rdr["TaskStatus"]); model.ReqTime = ConvertToDate(rdr["ReqTime"]); model.ReqStatus = ConverToStr(rdr["ReqStatus"]); model.DevID = ConvertToInt(rdr["DevID"]); model.TlpID = ConvertToInt(rdr["TlpID"]); model.OrderID = ConvertToInt(rdr["OrderID"]); model.Num = ConvertToInt(rdr["Num"]); return(model); }
public override SqlParameter[] GetParameters() { M_Shop_PrintMessage model = this; if (ReqTime <= DateTime.MinValue) { ReqTime = DateTime.Now; } SqlParameter[] sp = GetSP(); sp[0].Value = model.ID; sp[1].Value = model.MsgNo; sp[2].Value = model.Mode; sp[3].Value = model.Detail; sp[4].Value = model.TaskStatus; sp[5].Value = model.ReqTime; sp[6].Value = model.ReqStatus; sp[7].Value = model.DevID; sp[8].Value = model.TlpID; sp[9].Value = model.OrderID; sp[10].Value = model.Num; return(sp); }