Пример #1
0
        public override SqlParameter[] GetParameters()
        {
            M_DicCategory model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value = model.DicCateID;
            sp[1].Value = model.CategoryName;
            sp[2].Value = model.IsUsed;
            return(sp);
        }
Пример #2
0
        public M_DicCategory GetModelFromReader(DbDataReader rdr)
        {
            M_DicCategory model = new M_DicCategory();

            model.DicCateID    = Convert.ToInt32(rdr["DicCateID"]);
            model.CategoryName = ConverToStr(rdr["CategoryName"]);
            model.IsUsed       = ConverToBool(rdr["IsUsed"]);
            rdr.Close();
            rdr.Dispose();
            return(model);
        }