Пример #1
0
        public object FillReplacementEmployee(string action, Dictionary <string, object> extraParams)
        {
            StoreRequestParameters prms = new StoreRequestParameters(extraParams);

            //  return new
            // {
            return(Common.GetEmployeesFiltered(prms.Query));
        }
Пример #2
0
        public object FillEmployee(string action, Dictionary <string, object> extraParams)
        {
            StoreRequestParameters  prms      = new StoreRequestParameters(extraParams);
            List <EmployeeSnapShot> employees = Common.GetEmployeesFiltered(prms.Query);

            employees = employees.Where(x => x.activeStatus == Convert.ToInt16(ActiveStatus.ACTIVE)).ToList();
            return(employees);
        }
Пример #3
0
        public object FillApprover(string action, Dictionary <string, object> extraParams)
        {
            StoreRequestParameters  prms = new StoreRequestParameters(extraParams);
            List <EmployeeSnapShot> data = Common.GetEmployeesFiltered(prms.Query);

            data.ForEach(s => { s.fullName = s.name.fullName; });
            //  return new
            // {
            return(data);
        }
Пример #4
0
        public object FillEmployee(string action, Dictionary <string, object> extraParams)
        {
            StoreRequestParameters  prms = new StoreRequestParameters(extraParams);
            List <EmployeeSnapShot> data = Common.GetEmployeesFiltered(prms.Query);

            if (data.Count == 0)
            {
                X.Call("SetNameEnabled", true, " ");
            }

            return(data);
        }
Пример #5
0
        protected void Store1_RefreshData(object sender, StoreReadDataEventArgs e)
        {
            try {
                //GEtting the filter from the page

                //EmployeeListRequest empRequest = GetListRequest(e);


                string rep_params = vals.Text;
                EmployeeListRequest empRequest = new EmployeeListRequest();
                // ReportGenericRequest req = new ReportGenericRequest();
                empRequest.paramString = vals.Text;
                empRequest.StartAt     = e.Start.ToString();
                empRequest.SortBy      = "recordId";
                empRequest.Size        = "30";



                if (string.IsNullOrEmpty(searchTrigger.Text))
                {
                    ListResponse <Employee> emps = _employeeService.GetAll <Employee>(empRequest);
                    if (!emps.Success)
                    {
                        Common.errorMessage(emps);
                        return;
                    }
                    e.Total = emps.count;
                    if (emps.Items != null)
                    {
                        this.Store1.DataSource = emps.Items;
                        this.Store1.DataBind();
                    }
                }
                else
                {
                    List <EmployeeSnapShot> emps = Common.GetEmployeesFiltered(searchTrigger.Text);
                    e.Total = emps.Count();
                    this.Store1.DataSource = emps;
                    this.Store1.DataBind();
                    labelbar.Hidden = true;
                }
            }
            catch (Exception exp)
            {
                X.Msg.Alert(Resources.Common.Error, exp.Message).Show();
            }
        }
Пример #6
0
        public object FillEmployee(string action, Dictionary <string, object> extraParams)
        {
            StoreRequestParameters prms = new StoreRequestParameters(extraParams);

            if (prms.Query == "All" || prms.Query == "الكل")
            {
                List <Employee> data1 = new List <Employee>();
                data1.Add(new Employee()
                {
                    fullName = prms.Query, recordId = "0"
                });
                return(data1);
            }
            else
            {
                return(Common.GetEmployeesFiltered(prms.Query));
            }
        }
Пример #7
0
        public object FillSupervisor(string action, Dictionary <string, object> extraParams)
        {
            StoreRequestParameters prms = new StoreRequestParameters(extraParams);

            return(Common.GetEmployeesFiltered(prms.Query));
        }