Esempio n. 1
0
        void client_GetEmployeeSalaryRecordByIDCompleted(object sender, GetEmployeeSalaryRecordByIDCompletedEventArgs e)
        {
            if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message))
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
            else
            {
                if (e.Result == null)
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTFOUND"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                    //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTFOUND"));
                    return;
                }
                if (e.Result.T_HR_SALARYRECORDBATCH != null)
                {
                    try
                    {
                        T_HR_SALARYRECORDBATCH temp = e.Result.T_HR_SALARYRECORDBATCH as T_HR_SALARYRECORDBATCH;
                        string strCollection        = string.Empty;
                        strCollection = temp.BALANCEOBJECTTYPE + "," + temp.BALANCEOBJECTID + "," + temp.BALANCEYEAR.ToString() + "," + temp.BALANCEMONTH.ToString() + "," + temp.CHECKSTATE + "," + temp.MONTHLYBATCHID;
                        Form.Salary.SalaryRecordMassAudit form = new Form.Salary.SalaryRecordMassAudit(FormTypes.Audit, strCollection);

                        EntityBrowser browser = new EntityBrowser(form);
                        //browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                        //browser.AuditCtrl.Auditing += new EventHandler<SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs>(AuditCtrl_Auditing);
                        browser.FormType = FormTypes.Audit;
                        browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
                        EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>();
                        entBrowser.Close();
                    }
                    catch { }
                    return;
                }
                SalaryRecord     = e.Result;
                this.DataContext = SalaryRecord;
                client.GetEmployeeSalaryRecordItemByIDAsync(SalaryRecord.EMPLOYEESALARYRECORDID);

                //EntityBrowser browsers = new EntityBrowser(this);
                ////browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                ////browser.AuditCtrl.Auditing += new EventHandler<SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs>(AuditCtrl_Auditing);
                ////browsers.FormType = FormTypes.Audit;
                //browsers.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });

                RefreshUI(RefreshedTypes.AuditInfo);
                SetToolBar();
            }
        }
Esempio n. 2
0
        void client_GetEmployeeSalaryRecordByIDCompleted(object sender, GetEmployeeSalaryRecordByIDCompletedEventArgs e)
        {
            if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message))
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
            else
            {
                if (e.Result == null)
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTFOUND"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                    //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTFOUND"));
                    return;
                }
                if (e.Result.T_HR_SALARYRECORDBATCH != null)
                {
                    try
                    {
                        T_HR_SALARYRECORDBATCH temp = e.Result.T_HR_SALARYRECORDBATCH as T_HR_SALARYRECORDBATCH;
                        string strCollection = string.Empty;
                        strCollection = temp.BALANCEOBJECTTYPE + "," + temp.BALANCEOBJECTID + "," + temp.BALANCEYEAR.ToString() + "," + temp.BALANCEMONTH.ToString() + "," + temp.CHECKSTATE + "," + temp.MONTHLYBATCHID;
                        Form.Salary.SalaryRecordMassAudit form = new Form.Salary.SalaryRecordMassAudit(FormTypes.Audit, strCollection);

                        EntityBrowser browser = new EntityBrowser(form);
                        //browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                        //browser.AuditCtrl.Auditing += new EventHandler<SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs>(AuditCtrl_Auditing);
                        browser.FormType = FormTypes.Audit;
                        browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
                        EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>();
                        entBrowser.Close();
                    }
                    catch { }
                    return;
                }
                SalaryRecord = e.Result;
                this.DataContext = SalaryRecord;
                client.GetEmployeeSalaryRecordItemByIDAsync(SalaryRecord.EMPLOYEESALARYRECORDID);

                //EntityBrowser browsers = new EntityBrowser(this);
                ////browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                ////browser.AuditCtrl.Auditing += new EventHandler<SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs>(AuditCtrl_Auditing);
                ////browsers.FormType = FormTypes.Audit;
                //browsers.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });

                RefreshUI(RefreshedTypes.AuditInfo);
                SetToolBar();
            }
        }
Esempio n. 3
0
        public void MassAudit_Click(object o, RoutedEventArgs e)
        {
            try
            {
                ///TODO:ADD 审核  
                if (DtGriddy == null) return;
                int sType = 0;
                string sValue = "";
                string state = "";

                //选择一条数据
                if (DtGriddy.SelectedItems.Count > 0)
                {
                    T_HR_EMPLOYEESALARYRECORD tmpEnt = DtGriddy.SelectedItems[0] as T_HR_EMPLOYEESALARYRECORD;
                    if (tmpEnt.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString())
                    {
                        sType = 3; //单条记录
                        sValue = tmpEnt.EMPLOYEESALARYRECORDID;
                    }
                    else
                    {
                        return;
                    }
                }
                else
                {
                    string selectedType = treeOrganization.sType;
                    if (!string.IsNullOrEmpty(selectedType))
                    {
                        switch (selectedType)
                        {
                            case "Company":
                                sType = 0;
                                break;
                            case "Department":
                                sType = 1;
                                break;
                            case "Post":
                                sType = 2;
                                break;
                        }
                        sValue = treeOrganization.sValue;
                    }
                    else
                    {
                        return;
                    }
                }
                state = CheckStates.UnSubmit.ToInt32().ToString();

                NumericUpDown nuYear = Utility.FindChildControl<NumericUpDown>(expander, "Nuyear");
                NumericUpDown nuStartmounth = Utility.FindChildControl<NumericUpDown>(expander, "NuStartmounth");

                List<string> paras = new List<string>();
                paras.Add(sType.ToString());
                paras.Add(sValue);
                paras.Add(nuYear.Value.ToString());
                paras.Add(nuStartmounth.Value.ToString());
                paras.Add(state);
                paras.Add("");


                form = new Form.Salary.SalaryRecordMassAudit(FormTypes.Audit, paras);
                EntityBrowser browser = new EntityBrowser(form);
                browser.FormType = FormTypes.Audit;
                browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });

            }
            catch (Exception ex)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),
Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
        }
Esempio n. 4
0
        void btnAudit_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                ///TODO:ADD 审核  
                if (DtGriddy.SelectedItems.Count > 0)
                {
                    T_HR_EMPLOYEESALARYRECORD tmpEnt = DtGriddy.SelectedItems[0] as T_HR_EMPLOYEESALARYRECORD;
                    if (tmpEnt.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString())
                        client.FBStatisticsAsync(tmpEnt.EMPLOYEEID, Convert.ToInt32(tmpEnt.SALARYYEAR), Convert.ToInt32(tmpEnt.SALARYMONTH), (object)tmpEnt.EMPLOYEESALARYRECORDID);
                    Form.Salary.EmployeeSalaryRecordForm form = new Form.Salary.EmployeeSalaryRecordForm(FormTypes.Audit, tmpEnt.EMPLOYEESALARYRECORDID);
                    EntityBrowser browser = new EntityBrowser(form);
                    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    browser.AuditCtrl.Auditing += new EventHandler<SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs>(AuditCtrl_Auditing);
                    browser.FormType = FormTypes.Audit;
                    browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
                }
                else
                {
                    int sType = 0;
                    string sValue = "";
                    string state = "";
                    string strCollection = string.Empty;
                    string selectedType = treeOrganization.sType;
                    if (!string.IsNullOrEmpty(selectedType))
                    {
                        switch (selectedType)
                        {
                            case "Company":
                                sType = 0;
                                break;
                            case "Department":
                                sType = 1;
                                break;
                            case "Post":
                                sType = 2;
                                break;
                        }
                        sValue = treeOrganization.sValue;
                    }
                    else
                    {
                        return;
                    }
                    //TreeViewItem selectedItem = treeOrganization.SelectedItem as TreeViewItem;
                    //if (selectedItem != null)
                    //{
                    //    string IsTag = selectedItem.Tag.ToString();
                    //    switch (IsTag)
                    //    {
                    //        case "0":
                    //            OrganizationWS.T_HR_COMPANY company = selectedItem.DataContext as OrganizationWS.T_HR_COMPANY;
                    //            sType = 0;
                    //            sValue = company.COMPANYID;
                    //            break;
                    //        case "1":
                    //            OrganizationWS.T_HR_DEPARTMENT department = selectedItem.DataContext as OrganizationWS.T_HR_DEPARTMENT;
                    //            sType = 1;
                    //            sValue = department.DEPARTMENTID;
                    //            break;
                    //        case "2":
                    //            OrganizationWS.T_HR_POST post = selectedItem.DataContext as OrganizationWS.T_HR_POST;
                    //            sType = 2;
                    //            sValue = post.POSTID;
                    //            break;
                    //    }
                    //}
                    //else
                    //{
                    //    return;
                    //}
                    if (Checkstate != CheckStates.All.ToInt32().ToString())
                    {
                        state = Checkstate;
                    }
                    else
                    {
                        state = CheckStates.UnSubmit.ToInt32().ToString();
                    }
                    NumericUpDown nuYear = Utility.FindChildControl<NumericUpDown>(expander, "Nuyear");
                    NumericUpDown nuStartmounth = Utility.FindChildControl<NumericUpDown>(expander, "NuStartmounth");

                    //Form.Salary.SalaryRecordMassAudit form = new Form.Salary.SalaryRecordMassAudit(FormTypes.Audit, sType, sValue, nuYear.Value.ToString(), nuStartmounth.Value.ToString(), state);
                    strCollection = sType.ToString() + "," + sValue + "," + nuYear.Value.ToString() + "," + nuStartmounth.Value.ToString() + "," + state;
                    Form.Salary.SalaryRecordMassAudit form = new Form.Salary.SalaryRecordMassAudit(FormTypes.Audit, strCollection);


                    EntityBrowser browser = new EntityBrowser(form);
                    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    if ((DtGriddy.SelectedItems[0] as T_HR_EMPLOYEESALARYRECORD).CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString())
                        browser.AuditCtrl.Auditing += new EventHandler<SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs>(AuditCtrl_Auditing);
                    browser.FormType = FormTypes.Audit;
                    browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
                }
            }
            catch (Exception ex)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),
Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message.ToString()));
            }

        }