Esempio n. 1
0
        public ActionResult GetList()
        {
            int    offset   = Convert.ToInt32(Request["offset"]);
            string UserName = Request["UserName"];

            Business.Sys_ClockAttendance Sys_ClockAttendance = new Business.Sys_ClockAttendance();
            StringBuilder sb = new StringBuilder();

            if (!string.IsNullOrEmpty(UserName))
            {
                sb.Append(" and UserName='******'");
            }
            return(Json(new { total = Sys_ClockAttendance.GetClockAttendanceListCount(sb.ToString()), rows = Sys_ClockAttendance.UserClockAttendanceList(offset, sb.ToString()) }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public ActionResult AddClockAttendanceInfo()
        {
            Business.Sys_UserAdmin Sys_UserAdmin = new Business.Sys_UserAdmin();

            Model.ClockAttendance ClockAttendance = new Model.ClockAttendance()
            {
                UsersId      = Utility.ChangeText.GetUsersId(),
                Address      = Request["Address"],
                RealName     = Utility.ChangeText.GetRealName(),
                CheckAddress = Sys_UserAdmin.GetUserAdminByUserId(Utility.ChangeText.GetUsersId()).CheckAddress
            };
            Business.Sys_ClockAttendance Sys_ClockAttendance = new Business.Sys_ClockAttendance();
            if (Sys_ClockAttendance.InsertClockAttendance(ClockAttendance))
            {
                return(Content("1"));
            }
            return(Content("2"));
        }