Ejemplo n.º 1
0
        public M_Content_ScheTask GetModelFromDR(DataRow rdr)
        {
            M_Content_ScheTask model = new M_Content_ScheTask();

            model.ID          = Convert.ToInt32(rdr["ID"]);
            model.TaskName    = ConverToStr(rdr["TaskName"]);
            model.TaskContent = ConverToStr(rdr["TaskContent"]);
            model.TaskType    = ConvertToInt(rdr["TaskType"]);
            model.IsLoop      = ConvertToInt(rdr["IsLoop"]);
            model.ExecuteType = ConvertToInt(rdr["ExecuteType"]);
            model.ExecuteTime = ConverToStr(rdr["ExecuteTime"]);
            model.LastTime    = ConverToStr(rdr["LastTime"]);
            model.Status      = ConvertToInt(rdr["Status"]);
            model.Remind      = ConverToStr(rdr["Remind"]);
            model.Interval    = ConvertToInt(rdr["Interval"]);
            model.CDate       = ConvertToDate(rdr["CDate"]);
            model.AdminID     = ConvertToInt(rdr["AdminID"]);
            return(model);
        }
Ejemplo n.º 2
0
        public override SqlParameter[] GetParameters()
        {
            M_Content_ScheTask model = this;

            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();;
            sp[0].Value  = model.ID;
            sp[1].Value  = model.TaskName;
            sp[2].Value  = model.TaskContent;
            sp[3].Value  = model.TaskType;
            sp[4].Value  = model.ExecuteType;
            sp[5].Value  = model.ExecuteTime;
            sp[6].Value  = model.LastTime;//LastTime
            sp[7].Value  = model.Status;
            sp[8].Value  = model.Remind;
            sp[9].Value  = model.IsLoop;
            sp[10].Value = model.Interval;
            sp[11].Value = model.CDate;
            sp[12].Value = model.AdminID;
            return(sp);
        }