Beispiel #1
0
        public M_Arrive GetModelFromReader(DataRow rdr)
        {
            M_Arrive model = new M_Arrive();

            model.ID         = Convert.ToInt32(rdr["ID"]);
            model.ArriveNO   = ConverToStr(rdr["ArriveNO"]);
            model.UserID     = Convert.ToInt32(rdr["UserID"]);
            model.MinAmount  = ConverToDouble(rdr["MinAmount"]);
            model.MaxAmount  = ConverToDouble(rdr["MaxAmount"]);
            model.Amount     = Convert.ToInt32(rdr["Amount"]);
            model.AgainTime  = ConvertToDate(rdr["AgainTime"]);
            model.EndTime    = ConvertToDate(rdr["EndTime"]);
            model.State      = Convert.ToInt32(rdr["State"]);
            model.ArriveName = ConverToStr(rdr["ArriveName"]);
            model.ArrivePwd  = ConverToStr(rdr["ArrivePwd"]);
            model.UseTime    = ConvertToDate(rdr["UseTime"]);
            model.Type       = ConvertToInt(rdr["Type"]);
            model.ArriveDesc = ConverToStr(rdr["ArriveDesc"]);
            model.PreviewImg = ConverToStr(rdr["PreviewImg"]);
            model.Flow       = ConverToStr(rdr["Flow"]);
            model.UseRemind  = ConverToStr(rdr["UseRemind"]);
            model.ProIDS     = ConverToStr(rdr["ProIDS"]);
            model.ProNodeIDS = ConverToStr(rdr["ProNodeIDS"]);
            model.StoreID    = ConvertToInt(rdr["StoreID"]);
            model.CUser      = ConvertToInt(rdr["CUser"]);
            model.CAdmin     = ConvertToInt(rdr["CAdmin"]);
            model.Amount_Max = ConverToDouble(rdr["AMount_Max"]);
            model.DateType   = ConvertToInt(rdr["DateType"]);
            model.DateDays   = ConvertToInt(rdr["DateDays"]);
            model.CDate      = ConvertToDate(rdr["CDate"]);
            return(model);
        }
Beispiel #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Arrive model = this;

            SqlParameter[] sp = GetSP();
            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            sp[0].Value  = model.ID;
            sp[1].Value  = model.ArriveNO;
            sp[2].Value  = model.UserID;
            sp[3].Value  = model.MinAmount;
            sp[4].Value  = model.MaxAmount;
            sp[5].Value  = model.Amount;
            sp[6].Value  = model.AgainTime;
            sp[7].Value  = model.EndTime;
            sp[8].Value  = model.State;
            sp[9].Value  = model.ArriveName;
            sp[10].Value = model.ArrivePwd;
            sp[11].Value = model.UseTime;
            sp[12].Value = model.Type;
            sp[13].Value = model.ArriveDesc;
            sp[14].Value = model.PreviewImg;
            sp[15].Value = model.Flow;
            sp[16].Value = model.UseRemind;
            sp[17].Value = model.ProIDS;
            sp[18].Value = model.ProNodeIDS;
            sp[19].Value = model.StoreID;
            sp[20].Value = model.CUser;
            sp[21].Value = model.CAdmin;
            sp[22].Value = model.Amount_Max;
            sp[23].Value = model.DateType;
            sp[24].Value = model.DateDays;
            return(sp);
        }