Пример #1
0
        void client_GetEmployeeAddSumBatchByIDCompleted(object sender, GetEmployeeAddSumBatchByIDCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                EmployeeAddSumBatch = new T_HR_EMPLOYEEADDSUMBATCH();
                if (e.Result != null)
                {
                    EmployeeAddSumBatch   = e.Result as T_HR_EMPLOYEEADDSUMBATCH;
                    txtBalanceYear.Text   = EmployeeAddSumBatch.BALANCEYEAR.ToString();
                    nudBalanceMonth.Value = Convert.ToDouble(EmployeeAddSumBatch.BALANCEMONTH.ToString());
                    CheckState            = EmployeeAddSumBatch.CHECKSTATE;
                    cbxkAssignedObjectType.SelectedIndex = EmployeeAddSumBatch.BALANCEOBJECTTYPE.ToInt32();
                    ObjectType  = EmployeeAddSumBatch.BALANCEOBJECTTYPE.ToInt32();
                    ObjectValue = EmployeeAddSumBatch.BALANCEOBJECTID;
                    BindAssignObjectLookup();

                    string   filter     = "";
                    int      pageCount  = 0;
                    DateTime?starttimes = new DateTime(Convert.ToInt32(EmployeeAddSumBatch.BALANCEYEAR), Convert.ToInt32(EmployeeAddSumBatch.BALANCEMONTH), 1);
                    DateTime?endtimes   = new DateTime(Convert.ToInt32(EmployeeAddSumBatch.BALANCEYEAR), Convert.ToInt32(EmployeeAddSumBatch.BALANCEMONTH), DateTime.DaysInMonth(Convert.ToInt32(EmployeeAddSumBatch.BALANCEYEAR), Convert.ToInt32(EmployeeAddSumBatch.BALANCEMONTH)));
                    System.Collections.ObjectModel.ObservableCollection <string> paras = new System.Collections.ObjectModel.ObservableCollection <string>();

                    filter += " T_HR_EMPLOYEEADDSUMBATCH.MONTHLYBATCHID==@" + paras.Count().ToString();
                    paras.Add(EmployeeAddSumBatch.MONTHLYBATCHID);

                    client.GetEmployeeAddSumAuditPagingAsync(dataPager.PageIndex, dataPager.PageSize, "ADDSUMID", filter, paras, pageCount, Convert.ToDateTime(starttimes), Convert.ToDateTime(endtimes), userID, EmployeeAddSumBatch.CHECKSTATE, Convert.ToInt32(EmployeeAddSumBatch.BALANCEOBJECTTYPE), EmployeeAddSumBatch.BALANCEOBJECTID);
                    this.DataContext = EmployeeAddSumBatch;
                    RefreshUI(RefreshedTypes.AuditInfo);
                    SetToolBar();
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
        }
Пример #2
0
        void client_GetEmployeeAddSumBatchByIDCompleted(object sender, GetEmployeeAddSumBatchByIDCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                EmployeeAddSumBatch = new T_HR_EMPLOYEEADDSUMBATCH();
                if (e.Result != null)
                {
                    EmployeeAddSumBatch = e.Result as T_HR_EMPLOYEEADDSUMBATCH;
                    txtBalanceYear.Text = EmployeeAddSumBatch.BALANCEYEAR.ToString();
                    nudBalanceMonth.Value = Convert.ToDouble(EmployeeAddSumBatch.BALANCEMONTH.ToString());
                    CheckState = EmployeeAddSumBatch.CHECKSTATE;
                    cbxkAssignedObjectType.SelectedIndex = EmployeeAddSumBatch.BALANCEOBJECTTYPE.ToInt32();
                    ObjectType = EmployeeAddSumBatch.BALANCEOBJECTTYPE.ToInt32();
                    ObjectValue = EmployeeAddSumBatch.BALANCEOBJECTID;
                    BindAssignObjectLookup();

                    string filter = "";
                    int pageCount = 0;
                    DateTime? starttimes = new DateTime(Convert.ToInt32(EmployeeAddSumBatch.BALANCEYEAR), Convert.ToInt32(EmployeeAddSumBatch.BALANCEMONTH), 1);
                    DateTime? endtimes = new DateTime(Convert.ToInt32(EmployeeAddSumBatch.BALANCEYEAR), Convert.ToInt32(EmployeeAddSumBatch.BALANCEMONTH), DateTime.DaysInMonth(Convert.ToInt32(EmployeeAddSumBatch.BALANCEYEAR), Convert.ToInt32(EmployeeAddSumBatch.BALANCEMONTH)));
                    System.Collections.ObjectModel.ObservableCollection<string> paras = new System.Collections.ObjectModel.ObservableCollection<string>();

                    filter += " T_HR_EMPLOYEEADDSUMBATCH.MONTHLYBATCHID==@" + paras.Count().ToString();
                    paras.Add(EmployeeAddSumBatch.MONTHLYBATCHID);

                    client.GetEmployeeAddSumAuditPagingAsync(dataPager.PageIndex, dataPager.PageSize, "ADDSUMID", filter, paras, pageCount, Convert.ToDateTime(starttimes), Convert.ToDateTime(endtimes), userID, EmployeeAddSumBatch.CHECKSTATE, Convert.ToInt32(EmployeeAddSumBatch.BALANCEOBJECTTYPE), EmployeeAddSumBatch.BALANCEOBJECTID);
                    this.DataContext = EmployeeAddSumBatch;
                    RefreshUI(RefreshedTypes.AuditInfo);
                    SetToolBar();
                }

            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
        }