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

            model.ID        = Convert.ToInt32(rdr["ID"]);
            model.Name      = rdr["Name"].ToString();
            model.LeaderIDS = rdr["LeaderIDS"].ToString();
            model.ParterIDS = rdr["ParterIDS"].ToString();
            model.LookIDS   = rdr["LookIDS"].ToString();
            model.StartDate = Convert.ToDateTime(rdr["StartDate"]);
            model.EndDate   = Convert.ToDateTime(rdr["EndDate"]);
            model.IsOpen    = Convert.ToInt32(rdr["IsOpen"]);
            model.Status    = Convert.ToInt32(rdr["Status"]);
            model.UserID    = Convert.ToInt32(rdr["UserID"]);
            model.Desc      = rdr["Desc"].ToString();
            model.Attach    = rdr["Attach"].ToString();
            return(model);
        }
Beispiel #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Plat_Pro model = this;

            EmptyDeal();
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.Name;
            sp[2].Value  = model.LeaderIDS;
            sp[3].Value  = model.ParterIDS;
            sp[4].Value  = model.LookIDS;
            sp[5].Value  = model.StartDate;
            sp[6].Value  = model.EndDate;
            sp[7].Value  = model.IsOpen;
            sp[8].Value  = model.Status;
            sp[9].Value  = model.UserID;
            sp[10].Value = model.Desc;
            sp[11].Value = model.Attach;
            return(sp);
        }