Exemplo n.º 1
0
        public override SqlParameter[] GetParameters()
        {
            M_MisAttendance model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.DepartMent;
            sp[2].Value = model.BeginTime;
            sp[3].Value = model.EndTime;
            sp[4].Value = model.UserName;
            sp[5].Value = model.Comment;
            sp[6].Value = model.BeginStatus;
            sp[7].Value = model.EndStatus;
            return(sp);
        }
Exemplo n.º 2
0
        public M_MisAttendance GetModelFromReader(DbDataReader rdr)
        {
            M_MisAttendance model = new M_MisAttendance();

            model.ID          = Convert.ToInt32(rdr["ID"]);
            model.DepartMent  = ConverToStr(rdr["Department"]);
            model.BeginTime   = ConverToStr(rdr["BeginTime"]);
            model.EndTime     = ConverToStr(rdr["EndTime"]);
            model.UserName    = ConverToStr(rdr["UserName"]);
            model.Comment     = ConverToStr(rdr["Comment"]);
            model.BeginStatus = ConvertToInt(rdr["BeginStatus"]);
            model.EndStatus   = ConvertToInt(rdr["EndStatus"]);
            if (!rdr.HasRows)
            {
                rdr.Close();
                rdr.Dispose();
            }
            return(model);
        }