Esempio n. 1
0
        public M_Pro_Flow GetModelFromReader(DbDataReader rdr)
        {
            M_Pro_Flow model = new M_Pro_Flow();

            model.ID        = ConvertToInt(rdr["ID"]);
            model.WorkName  = ConverToStr(rdr["WorkName"]);
            model.WorkIntro = ConverToStr(rdr["WorkIntro"]);
            model.ProjectID = ConvertToInt(rdr["ProjectID"]);
            model.Status    = ConvertToInt(rdr["Status"]);
            model.Approving = ConvertToInt(rdr["Approving"]);
            model.BDate     = ConvertToDate(rdr["BDate"]);
            model.EDate     = ConvertToDate(rdr["EDate"]);
            rdr.Close();
            return(model);
        }
Esempio n. 2
0
        public override SqlParameter[] GetParameters()
        {
            M_Pro_Flow model = this;

            if (BDate <= DateTime.MinValue)
            {
                BDate = DateTime.Now;
            }
            if (EDate <= DateTime.MinValue)
            {
                EDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.WorkName;
            sp[2].Value = model.WorkIntro;
            sp[3].Value = model.ProjectID;
            sp[4].Value = model.Status;
            sp[5].Value = model.Approving;
            sp[6].Value = model.BDate;
            sp[7].Value = model.EDate;
            return(sp);
        }