public void OnSubmitCompleted(FrameworkUI.AuditControl.AuditEventArgs.AuditResult args)
        {
            string state     = "";
            string UserState = "Audit";

            switch (args)
            {
            case SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs.AuditResult.Auditing:    //审核中
                state = Utility.GetCheckState(CheckStates.Approving);
                break;

            case SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs.AuditResult.Successful: //审核通过
                state = Utility.GetCheckState(CheckStates.Approved);
                ssc.EmployeeAddSumLotsofADDAsync(emploeeaddsumList);                      //薪资
                break;

            case SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs.AuditResult.Fail:    //审核未通过
                state = Utility.GetCheckState(CheckStates.UnApproved);
                break;
            }
            if (InfoObj.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString())
            {
                UserState = "Submit";
            }
            InfoObj.CHECKSTATE = state;
            BenefitsAdministration.UpdateWelfareProvisionAsync(InfoObj, UserState);
        }
        private void Save()
        {
            string strMsg = string.Empty;
            Dictionary <string, string> paras = new Dictionary <string, string>();

            //paras.Add("CITY", (cbxCity.SelectedItem as T_SYS_DICTIONARY).DICTIONARYVALUE.ToString());
            paras.Add("OWNERID", SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
            paras.Add("CREATEUSERID", SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
            paras.Add("OWNERCOMPANYID", SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID);
            paras.Add("OWNERDEPARTMENTID", SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID);
            paras.Add("OWNERPOSTID", SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID);
            paras.Add("YEAR", (Nuyear.Value).ToString());
            paras.Add("MONTH", (NuStartmounth.Value).ToString());
            RefreshUI(RefreshedTypes.ShowProgressBar);


            salaryClient.EmployeeAddSumLotsofADDAsync(ListPensions);
        }
Beispiel #3
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns>保存结果</returns>
        public bool Save()
        {
            RefreshUI(RefreshedTypes.ProgressBar);
            if (EmployeeAddsumInfoList.Count == 0)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("MUSTSEPARATOR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                RefreshUI(RefreshedTypes.ProgressBar);
                return(false);
            }
            if (combProtectType.SelectedIndex == -1)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("加扣款类型不能为空"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                RefreshUI(RefreshedTypes.ProgressBar);
                return(false);
            }

            if (FormType == FormTypes.New)
            {
                System.Collections.ObjectModel.ObservableCollection <T_HR_EMPLOYEEADDSUM> eaddsum = new System.Collections.ObjectModel.ObservableCollection <T_HR_EMPLOYEEADDSUM>();
                //
                List <V_EmployeeAddsumView> infoList = new List <V_EmployeeAddsumView>();
                infoList.AddRange(EmployeeAddsumInfoList);
                //添加删除的员工加扣款
                infoList.AddRange(EmployeeAddsumDelList);

                foreach (var admSum in infoList)
                {
                    if (admSum.PROJECTCODE != "del")
                    {
                        //不是删除的则做数据校验
                        if (admSum.PROJECTMONEY == 0 || isZore())
                        {
                            ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("输入的金额不能为0"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                            RefreshUI(RefreshedTypes.ProgressBar);
                            return(false);
                        }
                        if (admSum.PROJECTMONEY == null)
                        {
                            ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("请输入正确的金额"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                            RefreshUI(RefreshedTypes.ProgressBar);
                            return(false);
                        }
                    }


                    T_HR_EMPLOYEEADDSUM EmployeeAddSumNew = new T_HR_EMPLOYEEADDSUM();
                    //EmployeeAddSumNew.PROJECTNAME = admSum.PROJECTNAME;
                    EmployeeAddSumNew.PROJECTMONEY = admSum.PROJECTMONEY;
                    EmployeeAddSumNew.SYSTEMTYPE   = combProtectType.SelectedIndex.ToString();
                    EmployeeAddSumNew.DEALYEAR     = numYear.Value.ToString();
                    EmployeeAddSumNew.DEALMONTH    = numMonth.Value.ToString();
                    EmployeeAddSumNew.ADDSUMID     = admSum.ADDSUMID;
                    EmployeeAddSumNew.EMPLOYEEID   = admSum.EMPLOYEEID;
                    EmployeeAddSumNew.EMPLOYEECODE = admSum.EMPLOYEECODE;
                    //string employeeName = admSum.EMPLOYEENAME.Split('-')[0];
                    EmployeeAddSumNew.EMPLOYEENAME       = admSum.EMPLOYEENAME;
                    EmployeeAddSumNew.CREATEDATE         = System.DateTime.Now;
                    EmployeeAddSumNew.CREATEUSERID       = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    EmployeeAddSumNew.CREATECOMPANYID    = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                    EmployeeAddSumNew.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                    EmployeeAddSumNew.CREATEPOSTID       = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;
                    EmployeeAddSumNew.CHECKSTATE         = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                    EmployeeAddSumNew.OWNERCOMPANYID     = admSum.OWNERCOMPANYID;
                    EmployeeAddSumNew.OWNERDEPARTMENTID  = admSum.OWNERDEPARTMENTID;
                    EmployeeAddSumNew.OWNERID            = admSum.OWNERID;
                    EmployeeAddSumNew.OWNERPOSTID        = admSum.OWNERPOSTID;
                    EmployeeAddSumNew.PROJECTCODE        = admSum.PROJECTCODE;
                    EmployeeAddSumNew.REMARK             = admSum.REMARK;

                    eaddsum.Add(EmployeeAddSumNew);
                }
                //只提交第一个
                EmployeeAddSum = eaddsum.FirstOrDefault();
                client.EmployeeAddSumLotsofADDAsync(eaddsum);
            }
            else
            {
                initAddSum("2");
                if (EmployeeAddSum.PROJECTMONEY == 0 || EmployeeAddSum.PROJECTMONEY == null || isZore())
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("加扣款金额不能为0"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                    RefreshUI(RefreshedTypes.ProgressBar);
                    return(false);
                }
                EmployeeAddSum.UPDATEDATE   = System.DateTime.Now;
                EmployeeAddSum.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                client.EmployeeAddSumUpdateAsync(EmployeeAddSum, "Edit");
            }
            return(true);
        }