Beispiel #1
0
        public M_EDU_AutoPK GetModelFromReader(DbDataReader rdr)
        {
            M_EDU_AutoPK model = new M_EDU_AutoPK();

            model.ID       = Convert.ToInt32(rdr["ID"]);
            model.Config   = ConverToStr(rdr["Config"]);
            model.Ownclass = ConvertToInt(rdr["Ownclass"]);
            model.TechIDS  = ConverToStr(rdr["TechIDS"]);
            model.CDate    = ConvertToDate(rdr["CDate"]);
            model.SDate    = ConvertToDate(rdr["SDate"]);
            model.EDate    = ConvertToDate(rdr["EDate"]);
            model.UserID   = ConvertToInt(rdr["UserID"]);
            rdr.Close();
            return(model);
        }
Beispiel #2
0
        public override SqlParameter[] GetParameters()
        {
            if (CDate <= DateTime.MinValue)
            {
                CDate = DateTime.Now;
            }
            M_EDU_AutoPK model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.UserID;
            sp[2].Value = model.Config;
            sp[3].Value = model.Ownclass;
            sp[4].Value = model.TechIDS;
            sp[5].Value = model.CDate;
            sp[6].Value = model.SDate;
            sp[7].Value = model.EDate;
            return(sp);
        }