示例#1
0
 void btnReSubmit_Click(object sender, RoutedEventArgs e)
 {
     ///TODO: 重新提交审核
     if (DtGrid.SelectedItems.Count > 0)
     {
         T_HR_EMPLOYEESALARYPOSTASIGN tmpEnt = DtGrid.SelectedItems[0] as T_HR_EMPLOYEESALARYPOSTASIGN;
         if (tmpEnt.CHECKSTATE != "3")
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), "只有审核未通过的才可以重新提交", Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
             return;
         }
         else
         {
             Form.Salary.EmployeeBalancePostAddForm form = new Form.Salary.EmployeeBalancePostAddForm(FormTypes.Resubmit, tmpEnt.EMPLOYEESALARYPOSTASIGNID);
             EntityBrowser browser = new EntityBrowser(form);
             form.MinWidth            = 600;
             form.MinHeight           = 240;
             browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
             browser.FormType         = FormTypes.Resubmit;
             browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
         }
     }
     else
     {
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
         //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "AUDIT"));
         return;
     }
 }
        private string GetXmlString(string StrSource, T_HR_EMPLOYEESALARYPOSTASIGN Info)
        {
            //SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY ownerCompany = (Application.Current.Resources["SYS_CompanyInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY>).Where(s => s.COMPANYID == Info.OWNERCOMPANYID).FirstOrDefault();
            //SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT ownerDepartment = (Application.Current.Resources["SYS_DepartmentInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT>).Where(s => s.DEPARTMENTID == Info.OWNERDEPARTMENTID).FirstOrDefault();
            //SMT.Saas.Tools.OrganizationWS.T_HR_POST ownerPost = (Application.Current.Resources["SYS_PostInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_POST>).Where(s => s.POSTID == Info.OWNERPOSTID).FirstOrDefault();
            //string ownerCompanyName = string.Empty;
            //string ownerDepartmentName = string.Empty;
            //string ownerPostName = string.Empty;
            //if (ownerCompany != null)
            //{
            //    ownerCompanyName = ownerCompany.CNAME;
            //}
            //if (ownerDepartment != null)
            //{
            //    ownerDepartmentName = ownerDepartment.T_HR_DEPARTMENTDICTIONARY == null ? "" : ownerDepartment.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME;
            //}
            //if (ownerPost != null)
            //{
            //    ownerPostName = ownerPost.T_HR_POSTDICTIONARY == null ? "" : ownerPost.T_HR_POSTDICTIONARY.POSTNAME;
            //}
            decimal?stateValue = Convert.ToDecimal("1");
            string  checkState = string.Empty;

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY checkStateDict = (Application.Current.Resources["SYS_DICTIONARY"] as List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "CHECKSTATE" && s.DICTIONARYVALUE == stateValue).FirstOrDefault();
            checkState = checkStateDict == null ? "" : checkStateDict.DICTIONARYNAME;

            SMT.SaaS.MobileXml.MobileXml             mx       = new SMT.SaaS.MobileXml.MobileXml();
            List <SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List <SMT.SaaS.MobileXml.AutoDictionary>();

            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "CHECKSTATE", "1", checkState));

            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTID", Info.BALANCEPOSTID, Info.BALANCEPOSTID));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTNAME", Info.BALANCEPOSTNAME, Info.BALANCEPOSTNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "NOTESCONTENT", strRemarkNotes, strRemarkNotes));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));

            ObservableCollection <Object> TrListObj = new ObservableCollection <Object>();

            foreach (var item in listDetails)
            {
                item.EMPLOYEENAME = item.EMPLOYEENAME + "-" + item.EMPLOYEEPOSTNAME + "-" + item.EMPLOYEEDEPARTMENTNAME + "-" + item.EMPLOYEECOMPANYNAME;
                TrListObj.Add(item);
            }

            string a = mx.TableToXml(Info, TrListObj, StrSource, AutoList);

            return(a);
        }
 void EmployeeBalancePostAddForm_Loaded(object sender, RoutedEventArgs e)
 {
     
     InitParas();
     if (string.IsNullOrEmpty(addBalanceAsignID))
     {
         
         EmployeeAddBalancePost = new T_HR_EMPLOYEESALARYPOSTASIGN();
         EmployeeAddBalancePost.EMPLOYEESALARYPOSTASIGNID = Guid.NewGuid().ToString();
         EmployeeAddBalancePost.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
         EmployeeAddBalancePost.CREATEUSERNAME = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName;
         EmployeeAddBalancePost.CREATEDATE = System.DateTime.Now;
         addBalanceAsignID = EmployeeAddBalancePost.EMPLOYEESALARYPOSTASIGNID;
         EmployeeAddBalancePost.UPDATEDATE = System.DateTime.Now;
         EmployeeAddBalancePost.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
         
         EmployeeAddBalancePost.CREATECOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
         EmployeeAddBalancePost.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
         EmployeeAddBalancePost.CREATEPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;
         EmployeeAddBalancePost.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
         EmployeeAddBalancePost.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
         EmployeeAddBalancePost.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
         EmployeeAddBalancePost.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
         EmployeeAddBalancePost.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID;
         this.DataContext = EmployeeAddBalancePost;
         SetToolBar();
         
     }
     else
     {
         NotShow(FormType);
         RefreshUI(RefreshedTypes.ShowProgressBar);
         client.GetBalancePostsByBalanceIDAsync(addBalanceAsignID, EmployeeAddBalancePost);
     }
     if (FormType != FormTypes.Browse && FormType  != FormTypes.Audit)
     {
         //Load事件之后,加载完后获取到父控件
         EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>();
         entBrowser.BtnSaveSubmit.Click -= new RoutedEventHandler(entBrowser.btnSubmit_Click);
         entBrowser.BtnSaveSubmit.Click += new RoutedEventHandler(BtnSaveSubmit_Click);
         //perClient.GetEmployeeByIDAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
         //Utility.InitFileLoad("EmployeeLeaveRecord", LeaveRecordID, FormType, uploadFile);
     }
 }
示例#4
0
        void BtnView_Click(object sender, RoutedEventArgs e)
        {
            if (DtGrid.SelectedItems.Count > 0)
            {
                T_HR_EMPLOYEESALARYPOSTASIGN tmpEnt = DtGrid.SelectedItems[0] as T_HR_EMPLOYEESALARYPOSTASIGN;

                Form.Salary.EmployeeBalancePostDetailForm form = new SMT.HRM.UI.Form.Salary.EmployeeBalancePostDetailForm(FormTypes.Browse, tmpEnt.EMPLOYEESALARYPOSTASIGNID);
                form.IsEnabled = false;
                EntityBrowser browser = new EntityBrowser(form);
                browser.FormType         = FormTypes.Browse;
                form.MinWidth            = 600;
                form.MinHeight           = 240;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT"));
                return;
            }
        }
示例#5
0
 public List<T_HR_BALANCEPOSTDETAIL> GetBalancePostsByBalanceID(string asignID, ref T_HR_EMPLOYEESALARYPOSTASIGN asign)
 {
     using (EmployeeBalancePostBLL bll = new EmployeeBalancePostBLL())
     {
         return bll.GetBalancePostsByBalanceID(asignID, ref asign);
     }
 }
示例#6
0
 public string BalancePostUpdate(T_HR_EMPLOYEESALARYPOSTASIGN obj, List<T_HR_BALANCEPOSTDETAIL> details, string flag, ref string strResult)
 {
     using (EmployeeBalancePostBLL bll = new EmployeeBalancePostBLL())
     {
         return bll.BalancePostUpdate(obj, details, flag, ref strResult);
     }
 }
        private string GetXmlString(string StrSource, T_HR_EMPLOYEESALARYPOSTASIGN Info)
        {
            //SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY ownerCompany = (Application.Current.Resources["SYS_CompanyInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY>).Where(s => s.COMPANYID == Info.OWNERCOMPANYID).FirstOrDefault();
            //SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT ownerDepartment = (Application.Current.Resources["SYS_DepartmentInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT>).Where(s => s.DEPARTMENTID == Info.OWNERDEPARTMENTID).FirstOrDefault();
            //SMT.Saas.Tools.OrganizationWS.T_HR_POST ownerPost = (Application.Current.Resources["SYS_PostInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_POST>).Where(s => s.POSTID == Info.OWNERPOSTID).FirstOrDefault();
            //string ownerCompanyName = string.Empty;
            //string ownerDepartmentName = string.Empty;
            //string ownerPostName = string.Empty;
            //if (ownerCompany != null)
            //{
            //    ownerCompanyName = ownerCompany.CNAME;
            //}
            //if (ownerDepartment != null)
            //{
            //    ownerDepartmentName = ownerDepartment.T_HR_DEPARTMENTDICTIONARY == null ? "" : ownerDepartment.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME;
            //}
            //if (ownerPost != null)
            //{
            //    ownerPostName = ownerPost.T_HR_POSTDICTIONARY == null ? "" : ownerPost.T_HR_POSTDICTIONARY.POSTNAME;
            //}
            decimal? stateValue = Convert.ToDecimal("1");
            string checkState = string.Empty;
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY checkStateDict = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "CHECKSTATE" && s.DICTIONARYVALUE == stateValue).FirstOrDefault();
            checkState = checkStateDict == null ? "" : checkStateDict.DICTIONARYNAME;

            SMT.SaaS.MobileXml.MobileXml mx = new SMT.SaaS.MobileXml.MobileXml();
            List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>();
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "CHECKSTATE", "1", checkState));

            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTID", Info.BALANCEPOSTID, Info.BALANCEPOSTID));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTNAME", Info.BALANCEPOSTNAME, Info.BALANCEPOSTNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "NOTESCONTENT", strRemarkNotes, strRemarkNotes));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));

            ObservableCollection<Object> TrListObj = new ObservableCollection<Object>();
            foreach (var item in listDetails)
            {
                item.EMPLOYEENAME = item.EMPLOYEENAME + "-" + item.EMPLOYEEPOSTNAME + "-" + item.EMPLOYEEDEPARTMENTNAME + "-" + item.EMPLOYEECOMPANYNAME;
                TrListObj.Add(item);
            }

            string a = mx.TableToXml(Info, TrListObj, StrSource, AutoList);

            return a;
        }
        private string GetXmlString(string StrSource, T_HR_EMPLOYEESALARYPOSTASIGN Info)
        {
            //SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY ownerCompany = (Application.Current.Resources["SYS_CompanyInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY>).Where(s => s.COMPANYID == Info.OWNERCOMPANYID).FirstOrDefault();
            //SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT ownerDepartment = (Application.Current.Resources["SYS_DepartmentInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT>).Where(s => s.DEPARTMENTID == Info.OWNERDEPARTMENTID).FirstOrDefault();
            //SMT.Saas.Tools.OrganizationWS.T_HR_POST ownerPost = (Application.Current.Resources["SYS_PostInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_POST>).Where(s => s.POSTID == Info.OWNERPOSTID).FirstOrDefault();
            //string ownerCompanyName = string.Empty;
            //string ownerDepartmentName = string.Empty;
            //string ownerPostName = string.Empty;
            //if (ownerCompany != null)
            //{
            //    ownerCompanyName = ownerCompany.CNAME;
            //}
            //if (ownerDepartment != null)
            //{
            //    ownerDepartmentName = ownerDepartment.T_HR_DEPARTMENTDICTIONARY == null ? "" : ownerDepartment.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME;
            //}
            //if (ownerPost != null)
            //{
            //    ownerPostName = ownerPost.T_HR_POSTDICTIONARY == null ? "" : ownerPost.T_HR_POSTDICTIONARY.POSTNAME;
            //}
            decimal? stateValue = Convert.ToDecimal("1");
            string checkState = string.Empty;
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY checkStateDict = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "CHECKSTATE" && s.DICTIONARYVALUE == stateValue).FirstOrDefault();
            checkState = checkStateDict == null ? "" : checkStateDict.DICTIONARYNAME;

            SMT.SaaS.MobileXml.MobileXml mx = new SMT.SaaS.MobileXml.MobileXml();
            List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>();
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "CHECKSTATE", "1", checkState));
           
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTID", Info.BALANCEPOSTID, Info.BALANCEPOSTID));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTNAME", Info.BALANCEPOSTNAME, Info.BALANCEPOSTNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "NOTESCONTENT", strRemarkNotes, strRemarkNotes));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));

            foreach (T_HR_BALANCEPOSTDETAIL objDetail in EmployeeBalanceInfoList)//填充子表
            {
                string strSalary = "";
                string strAttendance = "";
                if (objDetail.ATTENDANCESET == "0")
                {
                    strAttendance = "否";                    
                }
                else
                {
                    strAttendance = "是";
                }
                if (objDetail.SALARYSET == "0")
                {
                    strSalary = "否";                    
                }
                else
                {
                    strSalary = "是";
                }
                AutoList.Add(basedata("T_HR_BALANCEPOSTDETAIL", "ATTENDANCESET", objDetail.ATTENDANCESET, strAttendance, objDetail.BALANCEPOSTDETAIL));
                AutoList.Add(basedata("T_HR_BALANCEPOSTDETAIL", "SALARYSET", objDetail.SALARYSET, strSalary, objDetail.BALANCEPOSTDETAIL));                
            }
            string a = mx.TableToXml(Info, EmployeeBalanceInfoList, StrSource, AutoList);
            return a;
        }