private void FillUserSwipes()
    {
        IUserSwipeService service = null;

        try
        {
            DateTime fromDate = this.StartDate;
            DateTime toDate   = this.RetrieveCurrentDateTime().AddDays(1);

            //Validate
            this.ValidateUserSearch();

            // Create the service.
            service            = AppService.Create <IUserSwipeService>();
            service.AppManager = this.mAppManager;


            // Call service method.
            mSwipeList = service.Retrieve(Int32.Parse(hdnuserid.Value), fromDate, toDate);


            this.divMessage.InnerText = string.Empty;

            this.HideCalenderControl(true);
            //if(this.divMessage.InnerText.Trim()!="")
            if (Session["ResposeMessage"] != null)
            {
                this.divMessage.Style.Add("display", "block");
                this.divMessage.InnerText = Session["ResposeMessage"].ToString();
                this.Session.Remove("ResposeMessage");
            }
            else
            {
                this.divMessage.Style.Add("display", "none");
            }
        }

        catch (ValidationException ex)
        {
            //display the validation Message.
            StringBuilder message = new StringBuilder("<ul>");
            foreach (object value in ex.Data.Values)
            {
                message.Append(string.Format("<li>{0}</li>", value.ToString()));
            }
            message.Append("</ul>");
            this.divMessage.Style.Add("display", "block");
            this.divMessage.InnerHtml = message.ToString();
            this.HideCalenderControl(false);
            this.lblChooseEmployeeName.Text = "No Record Found";
        }
        catch { throw; }
    }
Ejemplo n.º 2
0
    private void FillUserSwipes()
    {
        IUserSwipeService service = null;

        try
        {
            DateTime fromDate = StartDate;

            DateTime toDate = this.RetrieveCurrentDateTime();

            // Create the service.
            service            = AppService.Create <IUserSwipeService>();
            service.AppManager = this.mAppManager;

            // Call service method.
            mSwipeList = service.Retrieve(this.mAppManager.LoginUser.Id, fromDate, toDate);
        }
        catch { throw; }
    }