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

            model.ID        = Convert.ToInt32(rdr["ID"]);
            model.Pid       = ConvertToInt(rdr["Pid"]);
            model.Title     = rdr["Title"].ToString();
            model.Source    = rdr["Source"].ToString();
            model.SType     = ConverToStr(rdr["SType"]);
            model.Condition = ConverToStr(rdr["Condition"]);
            model.SuitKey   = ConverToStr(rdr["SuitKey"]);
            model.CDate     = ConvertToDate(rdr["CDate"]);
            model.Status    = ConvertToInt(rdr["Status"]);
            rdr.Close();
            return(model);
        }
Exemple #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Sen_Task model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.Pid;
            sp[2].Value = model.Title;
            sp[3].Value = model.Source;
            sp[4].Value = model.SType;
            sp[5].Value = model.Condition;
            sp[6].Value = model.SuitKey;
            sp[7].Value = model.CDate;
            sp[8].Value = model.Status;
            return(sp);
        }