/// <summary> /// 从view页面弹出批量审核的页面 还未提交 /// </summary> /// <param name="formtype"></param> /// <param name="strType"></param> /// <param name="strValue"></param> /// <param name="year"></param> /// <param name="month"></param> /// <param name="strCheckState"></param> public EmployeeAddSumMassAudit(FormTypes formtype, int strType, string strValue, string year, string month, string strCheckState) { InitializeComponent(); txtBalanceYear.Text = year; nudBalanceMonth.Value = Convert.ToDouble(month); FormType = formtype; CheckState = strCheckState; cbxkAssignedObjectType.SelectedIndex = strType; ObjectType = strType; ObjectValue = strValue; BindAssignObjectLookup(); basePage.GetEntityLogo("T_HR_EMPLOYEEADDSUMBATCH"); EmployeeAddSumBatch = new T_HR_EMPLOYEEADDSUMBATCH(); EmployeeAddSumBatch.MONTHLYBATCHID = Guid.NewGuid().ToString(); EmployeeAddSumBatch.BALANCEOBJECTNAME = string.Empty; EmployeeAddSumBatch.BALANCEOBJECTID = ObjectValue; EmployeeAddSumBatch.BALANCEOBJECTTYPE = ObjectType.ToString(); EmployeeAddSumBatch.BALANCEYEAR = Convert.ToDecimal(txtBalanceYear.Text); EmployeeAddSumBatch.BALANCEMONTH = Convert.ToDecimal(nudBalanceMonth.Value); EmployeeAddSumBatch.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString(); EmployeeAddSumBatch.CREATEDATE = System.DateTime.Now; EmployeeAddSumBatch.EDITSTATE = Convert.ToInt32(EditStates.UnActived).ToString(); EmployeeAddSumBatch.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; EmployeeAddSumBatch.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; EmployeeAddSumBatch.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; EmployeeAddSumBatch.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; EmployeeAddSumBatch.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; EmployeeAddSumBatch.CREATECOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; EmployeeAddSumBatch.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; EmployeeAddSumBatch.CREATEPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; this.Loaded += new RoutedEventHandler(EmployeeAddSumMassAudit_Loaded); }
private string GetXmlString(string StrSource, T_HR_EMPLOYEEADDSUMBATCH Info) { Dictionary <string, string> systype = new Dictionary <string, string>(); systype.Add("0", "员工加扣款"); systype.Add("1", "员工代扣款"); //systype.Add("2", "绩效奖金"); //systype.Add("3", "其他......"); 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.Tools.PermissionWS.T_SYS_DICTIONARY AssignType = cbxkAssignedObjectType.SelectedItem as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY; 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_EMPLOYEEADDSUMBATCH", "CHECKSTATE", "1", checkState)); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCEOBJECTTYPE", Info.BALANCEOBJECTTYPE, AssignType != null ? AssignType.DICTIONARYNAME : "")); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCEOBJECTID", Info.BALANCEOBJECTID, lkAssignObject.TxtLookUp.Text)); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName)); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName)); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName)); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCESHORTDATE", Info.BALANCEYEAR + " - " + Info.BALANCEMONTH, Info.BALANCEYEAR + " - " + Info.BALANCEMONTH));//新加字段发薪年月 foreach (var v in listDetail) { AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "SYSTEMTYPE", v.SYSTEMTYPE, systype[v.SYSTEMTYPE.ToString()], v.ADDSUMID)); AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "CHECKSTATE", "1", checkState, v.ADDSUMID)); AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "DEALDATE", v.DEALYEAR + " - " + v.DEALMONTH, v.DEALYEAR + " - " + v.DEALMONTH, v.ADDSUMID)); //新加字典加扣款年月 } string a = mx.TableToXml(Info, listDetail, StrSource, AutoList); return(a); }
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)); } }
public void EmployeeAddSumBatchUpdate(T_HR_EMPLOYEEADDSUMBATCH entity) { using (EmployeeAddSumBatchBLL bll = new EmployeeAddSumBatchBLL()) { bll.EmployeeAddSumBatchUpdate(entity); } }
public bool EmployeeAddSumBatchAdd(T_HR_EMPLOYEEADDSUMBATCH entity, string[] addsumids) { using (EmployeeAddSumBatchBLL bll = new EmployeeAddSumBatchBLL()) { return bll.EmployeeAddSumBatchAdd(entity, addsumids); } }
private string GetXmlString(string StrSource, T_HR_EMPLOYEEADDSUMBATCH Info) { Dictionary<string, string> systype = new Dictionary<string, string>(); systype.Add("0", "员工加扣款"); systype.Add("1", "员工代扣款"); //systype.Add("2", "绩效奖金"); //systype.Add("3", "其他......"); 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.Tools.PermissionWS.T_SYS_DICTIONARY AssignType = cbxkAssignedObjectType.SelectedItem as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY; 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_EMPLOYEEADDSUMBATCH", "CHECKSTATE", "1", checkState)); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCEOBJECTTYPE", Info.BALANCEOBJECTTYPE, AssignType != null ? AssignType.DICTIONARYNAME : "")); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCEOBJECTID", Info.BALANCEOBJECTID, lkAssignObject.TxtLookUp.Text)); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName)); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName)); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName)); AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCESHORTDATE", Info.BALANCEYEAR + " - " + Info.BALANCEMONTH, Info.BALANCEYEAR + " - " + Info.BALANCEMONTH));//新加字段发薪年月 foreach (var v in listDetail) { AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "SYSTEMTYPE", v.SYSTEMTYPE, systype[v.SYSTEMTYPE.ToString()], v.ADDSUMID)); AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "CHECKSTATE", "1", checkState, v.ADDSUMID)); AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "DEALDATE", v.DEALYEAR + " - " + v.DEALMONTH, v.DEALYEAR + " - " + v.DEALMONTH, v.ADDSUMID));//新加字典加扣款年月 } string a = mx.TableToXml(Info, listDetail, StrSource, AutoList); return a; }
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)); } }