Exemple #1
0
        public M_Questions_Knowledge GetModelFromReader(DbDataReader rdr)
        {
            M_Questions_Knowledge model = new M_Questions_Knowledge();

            model.K_id       = Convert.ToInt32(rdr["k_id"]);
            model.K_name     = ConverToStr(rdr["k_name"]);
            model.K_class_id = ConvertToInt(rdr["k_Class_id"]);
            model.K_OrderBy  = ConvertToInt(rdr["k_OrderBy"]);
            model.Status     = ConvertToInt(rdr["Status"]);
            model.Grade      = ConvertToInt(rdr["Grade"]);
            model.IsSys      = ConvertToInt(rdr["IsSys"]);
            model.CDate      = ConvertToDate(rdr["CDate"]);
            model.CUser      = ConvertToInt(rdr["CUser"]);
            model.Pid        = ConvertToInt(rdr["Pid"]);
            rdr.Close();
            rdr.Dispose();
            return(model);
        }
Exemple #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Questions_Knowledge model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value = model.K_id;
            sp[1].Value = model.K_name;
            sp[2].Value = model.K_class_id;
            sp[3].Value = model.K_OrderBy;
            sp[4].Value = model.Status;
            sp[5].Value = model.Grade;
            sp[6].Value = model.IsSys;
            sp[7].Value = model.CDate;
            sp[8].Value = model.CUser;
            sp[9].Value = model.Pid;

            return(sp);
        }