Beispiel #1
0
 public SqlParameter[] GetParameters(M_DocList model)
 {
     SqlParameter[] sp = GetSP();
     sp[0].Value = model.ID;
     sp[1].Value = model.ModelID;
     sp[2].Value = model.FileName;
     sp[3].Value = model.AddUser;
     sp[4].Value = model.CreateTime;
     sp[5].Value = model.FileUrl;
     return(sp);
 }
Beispiel #2
0
        public M_DocList GetModelFromReader(DbDataReader rdr)
        {
            M_DocList model = new M_DocList();

            model.ID         = Convert.ToInt32(rdr["ID"]);
            model.ModelID    = ConvertToInt(rdr["ModelID"]);
            model.FileName   = ConverToStr(rdr["FileName"]);
            model.AddUser    = rdr["AddUser"].ToString();
            model.CreateTime = ConvertToDate(rdr["CreateTime"].ToString());
            model.FileUrl    = ConverToStr(rdr["FileUrl"]);
            rdr.Close();
            return(model);
        }