예제 #1
0
        public override SqlParameter[] GetParameters()
        {
            M_Order_Exp model = this;

            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.OrderID;
            sp[2].Value  = model.CompType;
            sp[3].Value  = model.ExpComp;
            sp[4].Value  = model.ExpNo;
            sp[5].Value  = model.ExpStatus;
            sp[6].Value  = model.ExpRemind;
            sp[7].Value  = model.SendDate;
            sp[8].Value  = model.SignDate;
            sp[9].Value  = model.BackDate;
            sp[10].Value = model.UserRemind;
            sp[11].Value = model.AdminRemind;
            sp[12].Value = model.UserID;
            sp[13].Value = model.CDate;
            sp[14].Value = model.APILink;
            return(sp);
        }
예제 #2
0
        public M_Order_Exp GetModelFromReader(DbDataReader rdr)
        {
            M_Order_Exp model = new M_Order_Exp();

            model.ID          = Convert.ToInt32(rdr["ID"]);
            model.OrderID     = ConvertToInt(rdr["OrderID"]);
            model.CompType    = ConverToStr(rdr["CompType"]);
            model.ExpComp     = ConverToStr(rdr["ExpComp"]);
            model.ExpNo       = ConverToStr(rdr["ExpNo"]);
            model.ExpStatus   = ConverToStr(rdr["ExpStatus"]);
            model.ExpRemind   = ConverToStr(rdr["ExpRemind"]);
            model.SendDate    = ConverToStr(rdr["SendDate"]);
            model.SignDate    = ConverToStr(rdr["SignDate"]);
            model.BackDate    = ConverToStr(rdr["BackDate"]);
            model.UserRemind  = ConverToStr(rdr["UserRemind"]);
            model.AdminRemind = ConverToStr(rdr["AdminRemind"]);
            model.UserID      = ConvertToInt(rdr["UserID"]);
            model.CDate       = ConvertToDate(rdr["CDate"]);
            model.APILink     = ConverToStr(rdr["APILink"]);
            rdr.Close();
            return(model);
        }