123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace LYFZ.Software.MainBusiness.FinancialManagement
- {
- public class frmWageQueryConfig :LYFZ.Software.UI.FinancialManagement.frmWageQueryConfig
- {
- public frmWageQueryConfig() {
- this.btnAddProgram.Click += btnAddProgram_Click;
- this.Shown += frmWageQueryConfig_Shown;
- this.bntRefresh.Click += bntRefresh_Click;
- this.dgvSetList.CellContentClick += dgvSetList_CellContentClick;
- this.btnExport.Click += btnExport_Click;
- this.btnImport.Click += btnImport_Click;
- this.btnClose.Click += btnClose_Click;
- this.btnClosed.Click += btnClosed_Click;
- this.dgvStatisticsList.CellContentClick += dgvStatisticsList_CellContentClick;
- this.dgvStatisticsList.ColumnHeaderMouseDoubleClick += dgvStatisticsList_ColumnHeaderMouseDoubleClick;
- this.cmbEmployeeName.IsSelectParentNode = false;
- this.cmbEmployeeName.ComboBoxTree_NodeMouseClick += cmbEmployeeName_ComboBoxTree_NodeMouseClick;
- this.btnSave.Click += btnSave_Click;
- this.btnAllDel.Click += btnAllDel_Click;
- }
- bool allSelected = false;
- void dgvStatisticsList_ColumnHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
- {
- if (e.RowIndex == -1 && e.ColumnIndex == 0&&!string.IsNullOrEmpty(this.CurrentUser_EmployeeID))
- {
- allSelected = !allSelected;
- SetCancelAllSelected(allSelected);
- }
- }
- void btnAllDel_Click(object sender, EventArgs e)
- {
- if (MessageBoxCustom.Show("正在准备删除全部工资统计方案,您确定要删除吗?", msgBoxButton: MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
- {
- bool isDelOk = false;
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- isDelOk = wqcBll.Delete("id>0");
- if (isDelOk)
- {
- LoadWageQueryConfig();
- }
- });
- if (isDelOk)
- {
- BindAllDGVList();
- }
- }
- }
- LYFZ.Model.Model_ErpWagesSet WagesSetMode = null;
- void btnSave_Click(object sender, EventArgs e)
- {
- if (string.IsNullOrEmpty(currentUser_EmployeeID))
- {
- MessageBoxCustom.Show("请选择要设置的员工");
- return;
- }
- try
- {
- List<string> TempList = new List<string>();
- foreach (DataGridViewRow row in this.dgvStatisticsList.Rows)
- {
- LYFZ.Model.Model_WageQueryConfig wMode = (LYFZ.Model.Model_WageQueryConfig)row.Tag;
- if (Convert.ToBoolean(row.Cells[0].Value))
- {
- TempList.Add(wMode.ID.ToString());
- }
- }
- bool isSaveOk = false;
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- WagesSetMode = (LYFZ.Model.Model_ErpWagesSet)frmWageStatisticsQuery.wagesSetBll.GetModelObject("Ws_StaffCode", currentUser_EmployeeID);
- WagesSetMode.Ws_EarlyCommissionScheme = string.Join(",",TempList);
- if (WagesSetMode != null && WagesSetMode.ID > 0)
- {
- isSaveOk = frmWageStatisticsQuery.wagesSetBll.Update(WagesSetMode);
- }
- else
- {
- WagesSetMode.Ws_StaffCode = currentUser_EmployeeID;
- WagesSetMode.Ws_BasicWage = 0;
- isSaveOk = frmWageStatisticsQuery.wagesSetBll.Add(WagesSetMode);
- }
- if (isSaveOk)
- {
- frmWageStatisticsQuery.LoadWagesSetDataTable();
- }
- });
- if (isSaveOk)
- {
-
- MessageBoxCustom.Show("保存成功");
- }
- else
- {
- MessageBoxCustom.Show("保存失败,请重试");
- }
- }
- catch (Exception ex)
- {
- MessageBoxCustom.Show("保存出错:" + ex.Message);
- }
- }
- /// <summary>
- ///
- /// </summary>
- string currentUser_EmployeeID = "";
- /// <summary>
- /// 当前选择用户ID
- /// </summary>
- public string CurrentUser_EmployeeID
- {
- get { return currentUser_EmployeeID; }
- set { currentUser_EmployeeID = value; }
- }
- void cmbEmployeeName_ComboBoxTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
- {
- if (e.Node.Tag == null || string.IsNullOrEmpty(e.Node.Tag.ToString()))
- {
- allSelected = false;
- SetCancelAllSelected(false);
- currentUser_EmployeeID = "";
- }
- else {
- string dataType = this.cmbEmployeeName.StrGetName.Trim();
- if (dataType.Length > 0)
- {
- switch (dataType.ToLower())
- {
- case "storename":
-
- break;
- case "department":
-
- break;
- case "user":
- currentUser_EmployeeID = e.Node.Tag.ToString();
- SetUserCommissionSchemeSelected(frmWageStatisticsQuery.GetCommissionScheme(currentUser_EmployeeID).Split(','));
- break;
- default:
-
- break;
- }
- }
-
- }
- }
- void SetUserCommissionSchemeSelected(string[] userCommissionSchemes)
- {
- bool tempSelected = true;
- foreach (DataGridViewRow row in this.dgvStatisticsList.Rows)
- {
- LYFZ.Model.Model_WageQueryConfig wMode = (LYFZ.Model.Model_WageQueryConfig)row.Tag;
- row.Cells[0].Value = GetSelected(wMode.ID.ToString(),userCommissionSchemes);
- if (!Convert.ToBoolean(row.Cells[0].Value))
- {
- tempSelected = false;
- }
- }
- this.allSelected = tempSelected;
- }
- void SetCancelAllSelected(bool selected)
- {
- foreach (DataGridViewRow row in this.dgvStatisticsList.Rows)
- {
- row.Cells[0].Value = selected;
- }
- }
- void dgvStatisticsList_CellContentClick(object sender, DataGridViewCellEventArgs e)
- {
- if (e.RowIndex >= 0 && e.ColumnIndex == 0)
- {
- this.dgvStatisticsList.Rows[e.RowIndex].Cells[0].Value = !Convert.ToBoolean(this.dgvStatisticsList.Rows[e.RowIndex].Cells[0].Value);
- }
- }
- void btnClosed_Click(object sender, EventArgs e)
- {
- this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- }
- void btnClose_Click(object sender, EventArgs e)
- {
- this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- }
- void btnImport_Click(object sender, EventArgs e)
- {
- OpenFileDialog ImportRoleDlg = new OpenFileDialog();
- ImportRoleDlg.Filter = "工资统计方案|*.wqc";
- if (ImportRoleDlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- try
- {
- string ImportRoleFileName = ImportRoleDlg.FileName;
- if (System.IO.File.Exists(ImportRoleFileName))
- {
- string[] ImportRoleDataList = System.IO.File.ReadAllText(ImportRoleFileName, Encoding.UTF8).Split('?');
- bool isSaveOk = false;
- int myCount = 1;
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- backgroundWorker.ReportProgress(0, "正在导入工资统计方案,请稍等...");
- foreach (string roleDatas in ImportRoleDataList)
- {
- string[] roles = roleDatas.Split('|');
- try
- {
- LYFZ.Model.Model_WageQueryConfig wModel = new Model.Model_WageQueryConfig();
- wModel.WQC_QueryName = LYFZ.WinAPI.SDKSecurity.Decode(roles[0]);
- wModel.WQC_StatisticalItems = Convert.ToInt32(LYFZ.WinAPI.SDKSecurity.Decode(roles[1]));
- wModel.WQC_ProjectContent = LYFZ.WinAPI.SDKSecurity.Decode(roles[2]);
- wModel.WQC_QueryCondition = LYFZ.WinAPI.SDKSecurity.Decode(roles[3]);
- wModel.WQC_CommissionProgram = LYFZ.WinAPI.SDKSecurity.Decode(roles[4]);
- wModel.WQC_Remarks = LYFZ.WinAPI.SDKSecurity.Decode(roles[5]);
- wModel.WQC_Type = Convert.ToInt32(LYFZ.WinAPI.SDKSecurity.Decode(roles[6]));
- wModel.WQC_CreateDateTime = SDateTime.NowToLong;
- wModel.WQC_CreateName = CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- wModel.WQC_UpdateDateTime = SDateTime.NowToLong;
- wModel.WQC_UpdateName = CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- backgroundWorker.ReportProgress(0, "正在导入" + myCount.ToString() + "/" + ImportRoleDataList.Length.ToString() + "条数据,请稍等...");
- if (!wqcBll.Exists("WQC_QueryName", wModel.WQC_QueryName))
- {
- isSaveOk = wqcBll.Add(wModel);
- if (!isSaveOk)
- {
- break;
- }
- }
- else {
- isSaveOk = true;
- }
- }
- catch (Exception ex)
- {
- isSaveOk = false;
- MessageBoxCustom.Show("工资统计方案导入失败:" + ex.Message);
- break;
- }
- }
- });
- if (isSaveOk)
- {
- LYFZ.BLL.BLL_ErpSystemLogs.WriteSystemLog(LYFZ.EnumPublic.SystemLogsType.其它操作, "导入工资统计方案:" + ImportRoleDataList.Length.ToString() + "条", LYFZ.BLL.BLL_ErpUser.UsersModel.User_EmployeeID, LYFZ.BLL.BLL_ErpUser.UsersModel.User_Name);
- MessageBoxCustom.Show("工资统计方案导入成功");
- }
- else
- {
- MessageBoxCustom.Show("工资统计方案导入失败,请重启软件后重试");
- }
- bntRefresh_Click(null, null);
- }
- else
- {
- MessageBoxCustom.Show("选择的工资统计方案文件不存在");
- }
- }
- catch (Exception ex)
- {
- MessageBoxCustom.Show("工资统计方案导入失败:" + ex.Message);
- }
- }
- }
- void btnExport_Click(object sender, EventArgs e)
- {
- SaveFileDialog ExportRoleDlg = new SaveFileDialog();
- ExportRoleDlg.Filter = "工资统计方案|*.wqc";
- ExportRoleDlg.FileName = "工资统计方案_" + SDateTime.Now.ToString("yyyy-MM-dd");
- if (ExportRoleDlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- try
- {
- string ImportRoleFileName = LYFZ.WinAPI.CustomPublicMethod.GetFullDirectoryPath(System.IO.Path.GetDirectoryName(ExportRoleDlg.FileName))
- + System.IO.Path.GetFileNameWithoutExtension(ExportRoleDlg.FileName) + ".wqc";
- string ExportRoleData = "";
- foreach (LYFZ.Model.Model_WageQueryConfig wModel in WageQueryConfigModelList)
- {
- ExportRoleData += LYFZ.WinAPI.SDKSecurity.Encode(wModel.WQC_QueryName)
- + "|" + LYFZ.WinAPI.SDKSecurity.Encode(wModel.WQC_StatisticalItems.ToString())
- + "|" + LYFZ.WinAPI.SDKSecurity.Encode(wModel.WQC_ProjectContent)
- + "|" + LYFZ.WinAPI.SDKSecurity.Encode(wModel.WQC_QueryCondition)
- + "|" + LYFZ.WinAPI.SDKSecurity.Encode(wModel.WQC_CommissionProgram)
- + "|" + LYFZ.WinAPI.SDKSecurity.Encode(wModel.WQC_Remarks)
- + "|" + LYFZ.WinAPI.SDKSecurity.Encode(wModel.WQC_Type.ToString()) + "?";
-
- }
- System.IO.File.WriteAllText(ImportRoleFileName, ExportRoleData.Trim('?'), Encoding.UTF8);
- MessageBoxCustom.Show("工资统计方案导出成功");
- }
- catch (Exception ex)
- {
- MessageBoxCustom.Show("工资统计方案导出失败:" + ex.Message);
- }
- }
- }
- void dgvSetList_CellContentClick(object sender, DataGridViewCellEventArgs e)
- {
- if (e.RowIndex >= 0 && e.ColumnIndex >= 5)
- {
- try
- {
- switch (e.ColumnIndex)
- {
- case 5:
- frmEditStatisticsProgram frmEditSP = new frmEditStatisticsProgram();
- frmEditSP.WqcModel = (LYFZ.Model.Model_WageQueryConfig)this.dgvSetList.Rows[e.RowIndex].Tag;
- if (frmEditSP.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- LoadWageQueryConfig();
- });
- BindAllDGVList();
- }
- break;
- case 6:
- if (MessageBoxCustom.Show("您确定要删除“" + this.dgvSetList.Rows[e.RowIndex].Cells[0].Value.ToString() + "”的统计方安吗?", msgBoxButton: MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
- {
- LYFZ.Model.Model_WageQueryConfig delModel = (LYFZ.Model.Model_WageQueryConfig)this.dgvSetList.Rows[e.RowIndex].Tag;
- bool delOK = false;
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- delOK = wqcBll.Delete(delModel.ID);
- });
- if (delOK)
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- LoadWageQueryConfig();
- });
- BindAllDGVList();
- }
- else
- {
- MessageBoxCustom.Show("删除失败,请重试");
- }
- }
- break;
- }
- }
- catch (Exception ex)
- {
- MessageBoxCustom.Show("操作出错:" + ex.Message);
- }
- }
- }
-
- void bntRefresh_Click(object sender, EventArgs e)
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- LoadWageQueryConfig();
- frmEditStatisticsProgram.LoadAllSystemCategory();
- LoadWageQueryConfig();
- });
- BindAllDGVList();
- }
- static LYFZ.BLL.BLL_WageQueryConfig wqcBll = new BLL.BLL_WageQueryConfig();
- static DataTable wQCTable = null;
- /// <summary>
- /// 统计方案配置信息
- /// </summary>
- public static DataTable WQCTable
- {
- get {
- if (wQCTable == null) {
- wQCTable = wqcBll.GetAllList("WQC_StatisticalItems,WQC_ProjectContent").Tables[0];
- wQCTable.PrimaryKey = new DataColumn[] { wQCTable.Columns["id"] };
- }
- return wQCTable; }
- set { wQCTable = value; }
- }
- static List<LYFZ.Model.Model_WageQueryConfig> _WageQueryConfigModelList = null;
- public static List<LYFZ.Model.Model_WageQueryConfig> WageQueryConfigModelList
- {
- get {
- if (_WageQueryConfigModelList == null)
- {
- LoadWageQueryConfig();
- }
- return frmWageQueryConfig._WageQueryConfigModelList; }
- }
- public static LYFZ.Model.Model_WageQueryConfig FindWageQueryConfig(string id)
- {
- foreach (LYFZ.Model.Model_WageQueryConfig wqcModel in frmWageQueryConfig.WageQueryConfigModelList)
- {
- if (id.Trim().ToLower().ToString() == wqcModel.ID.ToString().ToLower())
- {
- return wqcModel;
- }
- }
- return null;
- }
- // static System.Collections.Hashtable hashList = new System.Collections.Hashtable();
- /// <summary>
- /// 重新加载统计方案配置信息
- /// </summary>
- public static void LoadWageQueryConfig()
- {
- if (wQCTable != null)
- {
- wQCTable.Rows.Clear();
- wQCTable.Dispose();
- wQCTable = null;
- }
- wQCTable = wqcBll.GetAllList("WQC_StatisticalItems,WQC_ProjectContent").Tables[0];
- wQCTable.PrimaryKey = new DataColumn[] { wQCTable.Columns["id"] };
- if (_WageQueryConfigModelList != null)
- {
- _WageQueryConfigModelList.Clear();
- _WageQueryConfigModelList = null;
- }
- _WageQueryConfigModelList = new List<Model.Model_WageQueryConfig>();
- foreach (DataRow row in WQCTable.Rows)
- {
- _WageQueryConfigModelList.Add(new Model.Model_WageQueryConfig(row));
- }
-
- }
- void frmWageQueryConfig_Shown(object sender, EventArgs e)
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- if (wQCTable == null) {
- LoadWageQueryConfig();
- }
- });
- // 部门人员绑定
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_DepartmentAndEmployee(this.cmbEmployeeName, IsFirstNodeNull: true, IsShowResign: false, IsShowAdmin: true, tb_User: LYFZ.DAL.DAL_ErpUser.SimpleUserDataTable);
- if (!string.IsNullOrEmpty(CurrentUser_EmployeeID))
- {
- this.cmbEmployeeName.TagFindText(currentUser_EmployeeID);
- }
- BindAllDGVList();
- }
- void BindAllDGVList()
- {
- BindStatisticsList();
- BindSetList();
- }
- public static string GetClassCodeToCalssName(string classCode)
- {
- if (string.IsNullOrEmpty(classCode.Trim())) { return ""; }
- /*foreach (DataRow row in frmEditStatisticsProgram.AllSystemCategory.Rows)
- {
- if (row["Sc_ClassCode"].ToString().ToLower() == classCode.ToLower().Trim())
- {
- return row["Sc_ClassName"].ToString();
- }
- }
- if (classCode.ToUpper().StartsWith("B") || classCode.ToUpper().StartsWith("C")|| classCode.ToUpper().StartsWith("D"))
- {
- return "-";
- }*/
- return LYFZ.BLL.WageStatisticsProcess.GetClassCodeToCalssName(classCode);
- }
- /// <summary>
- /// 绑定方案选择列表
- /// </summary>
- /// <param name="uid"></param>
- void BindStatisticsList()
- {
- this.dgvStatisticsList.Rows.Clear();
- DataGridViewRow dgRow = null;
- foreach (LYFZ.Model.Model_WageQueryConfig wMode in WageQueryConfigModelList)
- {
- dgRow = new DataGridViewRow();
- dgRow.CreateCells(this.dgvStatisticsList);
- dgRow.Tag = wMode;
- dgRow.Cells[0].Value = GetSelected(wMode.ID.ToString(), frmWageStatisticsQuery.GetCommissionScheme(currentUser_EmployeeID).Split(','));
- dgRow.Cells[1].Value = wMode.WQC_QueryName;
- dgRow.Cells[2].Value = (LYFZ.Model.WageStatisticsQueryItem)wMode.WQC_StatisticalItems;//Convert.ToInt32(row["WQC_StatisticalItems"].ToString());
- dgRow.Cells[3].Value = GetClassCodeToCalssName(wMode.WQC_ProjectContent);//GetClassCodeToCalssName(row["WQC_ProjectContent"].ToString(), false);
- dgRow.Cells[4].Value = GetClassCodeToCalssName(wMode.WQC_CommissionProgram);
- dgRow.Cells[5].Value = GetQueryConditionText(wMode.WQC_QueryCondition, (LYFZ.Model.WageStatisticsQueryItem)wMode.WQC_StatisticalItems);
- this.dgvStatisticsList.Rows.Add(dgRow);
- }
- this.dgvStatisticsList.ClearSelection();
- }
- /// <summary>
- /// 获取指定方案ID 在指定用户的工资统计方案列表中是否存在
- /// </summary>
- /// <param name="wqcID"></param>
- /// <param name="userCommissionScheme"></param>
- /// <returns></returns>
- bool GetSelected(string wqcID, string[] userCommissionSchemes)
- {
- if (!string.IsNullOrEmpty(wqcID))
- {
- foreach (string uCSID in userCommissionSchemes)
- {
- if (uCSID.Trim().ToLower() == wqcID.Trim().ToLower())
- {
- return true;
- }
- }
- }
- return false;
- }
- /// <summary>
- /// 绑定统计方案设置列表
- /// </summary>
- void BindSetList()
- {
- this.dgvSetList.Rows.Clear();
- DataGridViewRow dgRow = null;
- foreach (LYFZ.Model.Model_WageQueryConfig wMode in WageQueryConfigModelList)
- {
- dgRow = new DataGridViewRow();
- dgRow.CreateCells(this.dgvSetList);
- dgRow.Tag = wMode;
- dgRow.Cells[0].Value = wMode.WQC_QueryName;
- dgRow.Cells[1].Value = (LYFZ.Model.WageStatisticsQueryItem)wMode.WQC_StatisticalItems;
- dgRow.Cells[2].Value = GetClassCodeToCalssName(wMode.WQC_ProjectContent);
- dgRow.Cells[3].Value = GetClassCodeToCalssName(wMode.WQC_CommissionProgram);
- dgRow.Cells[4].Value = GetQueryConditionText(wMode.WQC_QueryCondition, (LYFZ.Model.WageStatisticsQueryItem)wMode.WQC_StatisticalItems);
-
- dgRow.Cells[5].Value = "编辑";
- dgRow.Cells[6].Value ="删除";
- this.dgvSetList.Rows.Add(dgRow);
- }
- this.dgvSetList.ClearSelection();
- }
- string GetQueryConditionText(string queryCondition, Model.WageStatisticsQueryItem wqItem)
- {
- string retString = "";
- LYFZ.Model.AdditionalConditions acdit = new Model.AdditionalConditions(queryCondition);
- if (acdit.IsCustomerSource || acdit.IsOrderCategory || acdit.IsPaymentMethod)
- {
- LYFZ.Model.AdditionalConditions retAcdit = new Model.AdditionalConditions(queryCondition);
- if (acdit.IsCustomerSource)
- {
- retAcdit.CustomerSourceList.Clear();
- foreach (string code in acdit.CustomerSourceList)
- {
- retAcdit.CustomerSourceList.Add(GetClassCodeToCalssName(code));
- }
- }
- if (acdit.IsOrderCategory)
- {
- retAcdit.OrderCategoryList.Clear();
- foreach (string code in acdit.OrderCategoryList)
- {
- retAcdit.OrderCategoryList.Add(GetClassCodeToCalssName(code));
- }
- }
- if (acdit.IsPaymentMethod)
- {
- retAcdit.PaymentMethodList.Clear();
- foreach (string code in acdit.PaymentMethodList)
- {
- retAcdit.PaymentMethodList.Add(GetClassCodeToCalssName(code));
- }
- }
- acdit = null;
- retString = retAcdit.ToString().Trim('|');
- }
- else
- {
- acdit = null;
- retString = queryCondition.Trim('|');
- }
- if (wqItem == Model.WageStatisticsQueryItem.礼服租售
- ||wqItem== Model.WageStatisticsQueryItem.散客消费)
- {
- retString = retString.Replace("套系金额:", "订单金额:");
- }
- return retString;
- }
- void btnAddProgram_Click(object sender, EventArgs e)
- {
- frmEditStatisticsProgram frmEditSP = new frmEditStatisticsProgram();
- if (frmEditSP.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- LoadWageQueryConfig();
- });
- BindAllDGVList();
- }
- }
- }
- }
|