Exemplo n.º 1
0
 public SqlParameter[] GetParameters(M_DataList model)
 {
     SqlParameter[] sp = GetSP();
     sp[0].Value = model.ID;
     sp[1].Value = model.TableName;
     sp[2].Value = model.Type;
     sp[3].Value = model.Explain;
     sp[4].Value = model.SecShort;
     sp[5].Value = model.ThrShort;
     return(sp);
 }
Exemplo n.º 2
0
        public M_DataList GetModelFromReader(DbDataReader rdr)
        {
            M_DataList model = new M_DataList();

            model.ID        = Convert.ToInt32(rdr["ID"]);
            model.TableName = rdr["TableName"].ToString();
            model.Type      = Convert.ToInt32(rdr["Type"]);
            model.Explain   = rdr["Explain"].ToString();
            model.SecShort  = rdr["SecShort"].ToString();
            model.ThrShort  = rdr["ThrShort"].ToString();
            rdr.Close();
            return(model);
        }