Esempio n. 1
0
 public SqlParameter[] GetParameters(M_DocModel model)
 {
     SqlParameter[] sp = GetSP();
     sp[0].Value = model.ID;
     sp[1].Value = model.DocName;
     sp[2].Value = model.AddUser;
     sp[3].Value = model.AddTime;
     sp[4].Value = model.AllowGroup;
     sp[5].Value = model.Status;
     sp[6].Value = model.Form;
     sp[7].Value = model.TemUrl;
     sp[8].Value = model.ParentID;
     return(sp);
 }
Esempio n. 2
0
        public M_DocModel GetModelFromReader(DbDataReader rdr)
        {
            M_DocModel model = new M_DocModel();

            model.ID         = Convert.ToInt32(rdr["ID"]);
            model.DocName    = rdr["DocName"].ToString();
            model.AddUser    = rdr["AddUser"].ToString();
            model.AddTime    = Convert.ToDateTime(rdr["AddTime"].ToString());
            model.AllowGroup = rdr["AllowGroup"].ToString();
            model.Status     = Convert.ToInt32(rdr["Status"]);
            model.Form       = rdr["Form"].ToString();
            model.TemUrl     = rdr["TemUrl"].ToString();
            model.ParentID   = rdr["ParentID"].ToString();
            rdr.Close();
            return(model);
        }