123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664 |
- using LYFZ.BLL;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace LYFZ.Software.MainBusiness.FinancialManagement
- {
- public class frmWageStatisticsViewList : LYFZ.Software.UI.FinancialManagement.frmWageStatisticsViewList
- {
- public frmWageStatisticsViewList() {
- this.Load += frmWageStatisticsViewList_Load;
- this.btnClosed.Click += btnClosed_Click;
- this.btnQuery.Click += btnQuery_Click;
- this.btnExport.Click += btnExport_Click;
- this.cmbItemCategory.SelectedIndexChanged += cmbItemCategory_SelectedIndexChanged;
- this.dgvStatisticsList.EraseCell = true;
- }
- void cmbItemCategory_SelectedIndexChanged(object sender, EventArgs e)
- {
- BindUserWageStatisticsPerformanceCommissionList(this.cmbItemCategory.SelectedIndex);
- }
-
-
-
-
-
- void btnExport_Click(object sender, EventArgs e)
- {
- this.dgvStatisticsList.ExportDataTable();
- }
-
-
-
- public DateTime StartDateTime;
-
-
-
- public DateTime EndDateTime;
-
-
-
-
- void BindUserWageStatisticsPerformanceCommissionList(int WSQueryItem)
- {
- DataGridViewRow dgRow = null;
- this.dgvStatisticsList.Rows.Clear();
- foreach (UserWageStatisticsPerformanceCommission userWSPC in this.UserWageStatisticsPerformanceCommissionList)
- {
- dgRow = new DataGridViewRow();
- dgRow.CreateCells(this.dgvStatisticsList);
- SetDataGridViewRowCellStyle(dgRow, Color.LightCyan,fStyle:FontStyle.Bold,size:12f);
- dgRow.Cells[0].Value = userWSPC.User_DividedShopName;
- dgRow.Cells[1].Value = userWSPC.Dt_Name;
- dgRow.Cells[2].Value = userWSPC.User_Name;
- dgRow.Cells[3].Value = userWSPC.BasicWage;
- dgRow.Cells[4].Value = userWSPC.Bonus;
- dgRow.Cells[5].Value = userWSPC.FineMoney;
- dgRow.Cells[7].Value = "合计";
- dgRow.Cells[8].Value = "";
- userWSPC.SumComputePerformanceCommission(WSQueryItem);
- dgRow.Cells[9].Value = "";
- dgRow.Cells[10].Value = GetToDecimal(userWSPC.SumPerformance);
- dgRow.Cells[11].Value = GetToDecimal(userWSPC.SumCommission);
-
- dgRow.Cells[6].Value = GetToDecimal(userWSPC.BasicWage + userWSPC.Bonus + userWSPC.FineMoney + userWSPC.SumCommission);
- this.dgvStatisticsList.Rows.Add(dgRow);
- for (int i = 0; i < userWSPC.PerformanceCommissionList.Count; i++)
- {
- PerformanceCommissionInfo pcInfo = userWSPC.PerformanceCommissionList[i];
- if (WSQueryItem == 0 || pcInfo.WageQueryProgram.WQC_StatisticalItems == WSQueryItem)
- {
- bool isEndRow = false;
- if (i == userWSPC.PerformanceCommissionList.Count - 1)
- {
- isEndRow = true;
- }
- if (pcInfo.WageDataRowObjList.Count > 0)
- {
- this.dgvStatisticsList.Rows.Add(GetSubDataGridViewRow(pcInfo, null, false, true));
- }
- for (int j = 0; j < pcInfo.WageDataRowObjList.Count; j++)
- {
- WageDataRowObj wageRowObj = pcInfo.WageDataRowObjList[j];
- if (j == pcInfo.WageDataRowObjList.Count - 1&&isEndRow)
- {
- this.dgvStatisticsList.Rows.Add(GetSubDataGridViewRow(pcInfo, wageRowObj,true));
- }
- else
- {
- this.dgvStatisticsList.Rows.Add(GetSubDataGridViewRow(pcInfo, wageRowObj));
- }
- }
-
-
- }
-
- }
- }
-
- }
-
-
-
-
-
-
-
- DataGridViewRow GetSubDataGridViewRow(PerformanceCommissionInfo pcInfo, WageDataRowObj wageRowObj, bool isEndRow = false, bool isSumRow = false)
- {
- LYFZ.Model.WageStatisticsQueryItem wItem = (LYFZ.Model.WageStatisticsQueryItem)Convert.ToInt32(pcInfo.WageQueryProgram.WQC_StatisticalItems);
- DataGridViewRow dgRow = new DataGridViewRow();
- dgRow.CreateCells(this.dgvStatisticsList);
- SetDataGridViewRowCellStyle(dgRow, Color.White);
- if (isEndRow)
- {
- dgRow.Cells[0].Tag = this.dgvStatisticsList.EraseCellDrawLineHEnd;
- dgRow.Cells[1].Tag = this.dgvStatisticsList.EraseCellDrawLineHEnd;
- dgRow.Cells[2].Tag = this.dgvStatisticsList.EraseCellDrawLineHEnd;
- dgRow.Cells[3].Tag = this.dgvStatisticsList.EraseCellDrawLineHEnd;
- dgRow.Cells[4].Tag = this.dgvStatisticsList.EraseCellDrawLineHEnd;
- dgRow.Cells[5].Tag = this.dgvStatisticsList.EraseCellDrawLineHEnd;
- dgRow.Cells[6].Tag = this.dgvStatisticsList.EraseCellDrawLineVHEnd;
- }
- else
- {
- dgRow.Cells[0].Tag = this.dgvStatisticsList.EraseCellDrawLine;
- dgRow.Cells[1].Tag = this.dgvStatisticsList.EraseCellDrawLine;
- dgRow.Cells[2].Tag = this.dgvStatisticsList.EraseCellDrawLine;
- dgRow.Cells[3].Tag = this.dgvStatisticsList.EraseCellDrawLine;
- dgRow.Cells[4].Tag = this.dgvStatisticsList.EraseCellDrawLine;
- dgRow.Cells[5].Tag = this.dgvStatisticsList.EraseCellDrawLine;
- dgRow.Cells[6].Tag = this.dgvStatisticsList.EraseCellDrawLineVEnd;
- }
- if (isSumRow)
- {
- SetDataGridViewRowCellStyle(dgRow, Color.LightCoral,bgStarIndex: 7,fStyle:FontStyle.Bold);
- dgRow.Tag = "FontStyle.Bold";
- dgRow.Cells[7].Value = "小计";
-
- dgRow.Cells[9].Value = "";
- dgRow.Cells[10].Value = GetToDecimal(pcInfo.Performance);
- dgRow.Cells[11].Value = GetToDecimal(pcInfo.Commission);
- }
- else
- {
- dgRow.Cells[7].Value = wItem.ToString();
- dgRow.Cells[8].Value = pcInfo.WageQueryProgram.WQC_QueryName;
- try
- {
- dgRow.Cells[9].Value = wageRowObj.ResponsiblePosition;
- dgRow.Cells[10].Value = GetToDecimal(wageRowObj.CurrentPerformance);
- if (wItem == Model.WageStatisticsQueryItem.计件提成)
- {
- dgRow.Cells[11].Value = GetToDecimal(wageRowObj.CurrentPerformance);
-
- }
- else {
- dgRow.Cells[11].Value = "";
- }
-
-
- switch (wItem)
- {
- case Model.WageStatisticsQueryItem.订单前期:
- case Model.WageStatisticsQueryItem.订单后期:
- case Model.WageStatisticsQueryItem.服务前期:
- case Model.WageStatisticsQueryItem.服务后期:
-
- if (wageRowObj.ReceiptRow != null)
- {
- dgRow.Cells[12].Value = GetToDecimal(wageRowObj.ReceiptRow["PaidAmount"]);
- dgRow.Cells[13].Value = GetRowValueToString(wageRowObj.ReceiptRow["Pay_Category"]);
- dgRow.Cells[14].Value =GetsCollectionCategoryType(wItem,wageRowObj.ReceiptRow["Pay_TwoPinsCategory"]);
- dgRow.Cells[15 + 1].Value = GetClassCodeToCalssName(wageRowObj.ReceiptRow["Pay_PaymentMethod"]);
- dgRow.Cells[16 + 1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.ReceiptRow["Pay_OpenSingle"])); ;
- dgRow.Cells[17 + 1].Value = GetDateTimeString(wageRowObj.ReceiptRow["Pay_CreateDatetime"]);
- }
-
-
- if (wageRowObj.OrderCustomer != null)
- {
- string orderNumber = GetRowValueToString(wageRowObj.OrderCustomer["Ord_SinceOrderNumber"]);
- if (String.IsNullOrEmpty(orderNumber))
- {
- orderNumber = GetRowValueToString(wageRowObj.OrderCustomer["Ord_Number"]);
- }
- dgRow.Cells[18+1].Value = orderNumber;
- dgRow.Cells[19+1].Value = GetRowValueToString(wageRowObj.OrderCustomer["Cus_Name"]);
- dgRow.Cells[20+1].Value = ((EnumPublic.OrderType)Convert.ToInt32(wageRowObj.OrderCustomer["Ord_Type"].ToString())).ToString();
- dgRow.Cells[21+1].Value = GetRowValueToString(wageRowObj.OrderCustomer["Ord_SeriesName"]);
- dgRow.Cells[22+1].Value = GetToDecimal(wageRowObj.OrderCustomer["Ord_SeriesPrice"]);
- dgRow.Cells[23+1].Value = GetDateTimeString(wageRowObj.OrderCustomer["Ord_CreateDateTime"]);
- dgRow.Cells[24+1].Value = GetRowValueToString(wageRowObj.OrderCustomer["Ordpg_Sights"]);
- dgRow.Cells[25+1].Value = GetPhotographyStatus(wageRowObj.OrderCustomer["PhotographyStatus"], GetDateTimeString(wageRowObj.OrderCustomer["Ordpg_PhotographyTime"]));
- dgRow.Cells[26+1].Value = GetDateTimeString(wageRowObj.OrderCustomer["Ordpg_PhotographyTime"]);
- dgRow.Cells[27+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.OrderCustomer["Ordpg_Photographer"]));
- dgRow.Cells[28+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.OrderCustomer["Ordpg_PhotographyAssistant"]));
- dgRow.Cells[29+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.OrderCustomer["Ordpg_MakeupArtist"]));
- dgRow.Cells[30+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.OrderCustomer["Ordpg_MakeupAssistant"]));
- dgRow.Cells[31+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.OrderCustomer["Ordpg_BootDivision"]));
- dgRow.Cells[32+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.OrderCustomer["Ordpg_BootDivisionAssistant"]));
- dgRow.Cells[33+1].Value = GetProcessStatus(wageRowObj.OrderCustomer["ordv_EarlyRepairStatus"], "初修");
- dgRow.Cells[34+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.OrderCustomer["Ordv_EarlyRepairName"]));
- dgRow.Cells[35+1].Value = GetDateTimeString(wageRowObj.OrderCustomer["Ordv_EarlyRepairTime"]);
- dgRow.Cells[36+1].Value = GetProcessFilmSelectionStatus(wageRowObj.OrderCustomer["Ordv_FilmSelectionStatus"]);
- dgRow.Cells[37+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.OrderCustomer["Ordv_FilmSelectionName"]));
- dgRow.Cells[38+1].Value = GetDateTimeString(wageRowObj.OrderCustomer["Ordv_FilmSelectionTime"]);
- dgRow.Cells[39+1].Value = GetProcessStatus(wageRowObj.OrderCustomer["Ordv_RefinementStatus"], "精修");
- dgRow.Cells[40+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.OrderCustomer["Ordv_RefinementName"]));
- dgRow.Cells[41+1].Value = GetDateTimeString(wageRowObj.OrderCustomer["Ordv_RefinementTime"]);
- dgRow.Cells[42+1].Value = GetProcessStatus(wageRowObj.OrderCustomer["Ordv_DesignerStatus"], "设计");
- dgRow.Cells[43+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.OrderCustomer["Ordv_DesignerName"]));
- dgRow.Cells[44+1].Value = GetDateTimeString(wageRowObj.OrderCustomer["Ordv_DesignerTime"]);
- dgRow.Cells[45+1].Value = GetRowValueToString(wageRowObj.OrderCustomer["PickupStatus"]);
- dgRow.Cells[46+1].Value = GetDateTimeString(wageRowObj.OrderCustomer["OPlist_PickupTime"]);
- dgRow.Cells[47 + 1].Value = WageStatisticsSatisfactionScore(wageRowObj.SatisfactionScore);
- }
-
-
- break;
- case Model.WageStatisticsQueryItem.散客消费:
- if (wageRowObj.ReceiptRow != null)
- {
- dgRow.Cells[12].Value = GetToDecimal(wageRowObj.ReceiptRow["PaidAmount"]);
- dgRow.Cells[13].Value = GetRowValueToString(wageRowObj.ReceiptRow["Pay_Category"]);
- dgRow.Cells[14].Value = GetClassCodeToCalssName(wageRowObj.ReceiptRow["Tsorder_Category"]);
- dgRow.Cells[15+1].Value = GetClassCodeToCalssName(wageRowObj.ReceiptRow["Pay_PaymentMethod"]);
- dgRow.Cells[16+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.ReceiptRow["Pay_OpenSingle"]));
- dgRow.Cells[17+1].Value = GetDateTimeString(wageRowObj.ReceiptRow["Pay_CreateDatetime"]);
- dgRow.Cells[18+1].Value = wageRowObj.ReceiptRow["Tsorder_Number"].ToString();
- dgRow.Cells[19+1].Value = wageRowObj.ReceiptRow["Cus_Name"].ToString();
- dgRow.Cells[20+1].Value = wItem.ToString();
- dgRow.Cells[21+1].Value = GetRowValueToString(wageRowObj.ReceiptRow["Tsorder_Name"]);
- dgRow.Cells[22+1].Value = GetToDecimal(wageRowObj.ReceiptRow["Tsorder_Money"]);
- dgRow.Cells[23 + 1].Value = GetDateTimeString(wageRowObj.ReceiptRow["Tsorder_CreateDatetime"]);
-
- }
- break;
- case Model.WageStatisticsQueryItem.计件提成:
- if (wageRowObj.ReceiptRow != null)
- {
- dgRow.Cells[12].Value = "";
- dgRow.Cells[13].Value = wItem.ToString();
- dgRow.Cells[14].Value = GetClassCodeToCalssName(wageRowObj.ReceiptRow["Pcr_CompletionContents"]);
- dgRow.Cells[15].Value =wageRowObj.ReceiptRow["Pcr_Quantity"].ToString();
- dgRow.Cells[15+1].Value = GetPcr_Type(wageRowObj.ReceiptRow["Pcr_Type"]);
- dgRow.Cells[16+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.ReceiptRow["Pcr_DigitalDivision"]));
- dgRow.Cells[17+1].Value = GetDateTimeString(wageRowObj.ReceiptRow["Pcr_Date"]);
- dgRow.Cells[18 + 1].Value = GetRowValueToString(wageRowObj.ReceiptRow["Pcr_OrderNumber"]);
- }
- if (wageRowObj.OrderCustomer != null)
- {
- dgRow.Cells[18 + 1].Value = GetRowValueToString(wageRowObj.OrderCustomer["订单号"]);
- dgRow.Cells[19 + 1].Value = GetRowValueToString(wageRowObj.OrderCustomer["客户姓名"]);
- string orderTypeString = GetRowValueToString(wageRowObj.OrderCustomer["订单类型"]);
- if (orderTypeString.Trim().Length > 0 && orderTypeString != "散客消费")
- {
- dgRow.Cells[20 + 1].Value = Enum.ToObject(typeof(LYFZ.EnumPublic.OrderType), Convert.ToInt32(orderTypeString)).ToString();
- }
- else
- {
- dgRow.Cells[20 + 1].Value = orderTypeString;
- }
-
- dgRow.Cells[21 + 1].Value = GetRowValueToString(wageRowObj.OrderCustomer["套系名称"]);
- dgRow.Cells[22 + 1].Value = GetRowValueToString(wageRowObj.OrderCustomer["套系价格"]);
- dgRow.Cells[23 + 1].Value = GetDateTimeString(wageRowObj.OrderCustomer["录入日期"]);
- }
- break;
- case Model.WageStatisticsQueryItem.礼服租售:
- if (wageRowObj.ReceiptRow != null)
- {
- dgRow.Cells[12].Value = GetToDecimal(wageRowObj.ReceiptRow["PaidAmount"]);
- dgRow.Cells[13].Value = "礼服租售收款";
- dgRow.Cells[14].Value = GetRowValueToString(wageRowObj.ReceiptRow["Pay_ReceivableProject"]);
- dgRow.Cells[15+1].Value = GetClassCodeToCalssName(wageRowObj.ReceiptRow["Pay_PaymentMethod"]);
- dgRow.Cells[16+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.ReceiptRow["Pay_OpenSingle"]));
- dgRow.Cells[17+1].Value = GetDateTimeString(wageRowObj.ReceiptRow["Pay_CreateDatetime"]);
- dgRow.Cells[18+1].Value = GetRowValueToString(wageRowObj.ReceiptRow["Dsro_Number"]);
- dgRow.Cells[19+1].Value = GetRowValueToString(wageRowObj.ReceiptRow["Cus_Name"]);
- dgRow.Cells[20+1].Value = wItem.ToString();
- dgRow.Cells[21+1].Value = GetRowValueToString(wageRowObj.ReceiptRow["Pay_ReceivableProject"]);
- dgRow.Cells[22+1].Value = GetToDecimal(wageRowObj.ReceiptRow["Dsro_Amount"]);
- dgRow.Cells[23 + 1].Value = GetDateTimeString(wageRowObj.ReceiptRow["Dsro_CreateDateTime"]);
- }
- break;
- case Model.WageStatisticsQueryItem.会员充值:
- if (wageRowObj.ReceiptRow != null)
- {
- dgRow.Cells[12].Value = GetToDecimal(wageRowObj.ReceiptRow["Mcrr_RechargeAmount"]);
- dgRow.Cells[13].Value = "会员充值收款";
- dgRow.Cells[14].Value = GetRowValueToString(wageRowObj.ReceiptRow["Mcrr_RechargeName"]);
- dgRow.Cells[15+1].Value = GetClassCodeToCalssName(wageRowObj.ReceiptRow["Mcrr_PaymentMethod"]);
- dgRow.Cells[16+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.ReceiptRow["Mcrr_OrderPerson"]));
- dgRow.Cells[17+1].Value = GetDateTimeString(wageRowObj.ReceiptRow["Mcrr_CreateDatetime"]);
- dgRow.Cells[18+1].Value = GetRowValueToString(wageRowObj.ReceiptRow["Mcrr_RechargeNumber"]);
- dgRow.Cells[19+1].Value = GetRowValueToString(wageRowObj.ReceiptRow["Cus_Name"]) + "【" + GetRowValueToString(wageRowObj.ReceiptRow["Mc_CradNumber"]) + "】";
- dgRow.Cells[20+1].Value = wItem.ToString();
- dgRow.Cells[21+1].Value = GetRowValueToString(wageRowObj.ReceiptRow["Mcrr_RechargeName"]);
- dgRow.Cells[22+1].Value = GetToDecimal(wageRowObj.ReceiptRow["Mcrr_RechargeAmount"]);
- dgRow.Cells[23 + 1].Value = GetDateTimeString(wageRowObj.ReceiptRow["Mcrr_CreateDatetime"]);
- }
- break;
- case Model.WageStatisticsQueryItem.服务卡充值:
- if (wageRowObj.ReceiptRow != null)
- {
- dgRow.Cells[12].Value = GetToDecimal(wageRowObj.ReceiptRow["Mcpt_PaymentAmount"]);
- dgRow.Cells[13].Value = "会员服务卡充值收款";
- dgRow.Cells[14].Value = GetRowValueToString(wageRowObj.ReceiptRow["Mcpt_PaymentType"]);
- dgRow.Cells[15+1].Value = GetClassCodeToCalssName(wageRowObj.ReceiptRow["Mcpt_PaymentMethod"]);
- dgRow.Cells[16+1].Value = GetUserIDToUserName(GetRowValueToString(wageRowObj.ReceiptRow["Mcpt_OrderPerson"]));
- dgRow.Cells[17+1].Value = GetDateTimeString(wageRowObj.ReceiptRow["Mcpt_CreateDatetime"]);
- dgRow.Cells[18+1].Value = GetRowValueToString(wageRowObj.ReceiptRow["Mcpt_PaymentNumber"]);
- dgRow.Cells[19+1].Value = GetRowValueToString(wageRowObj.ReceiptRow["Cus_Name"]) + "【" + GetRowValueToString(wageRowObj.ReceiptRow["Mc_CradNumber"]) + "】";
- dgRow.Cells[20+1].Value = wItem.ToString();
- dgRow.Cells[21+1].Value = "会员服务卡充值";
- dgRow.Cells[22+1].Value = GetToDecimal(wageRowObj.ReceiptRow["Mcpt_PaymentAmount"]);
- dgRow.Cells[23 + 1].Value = GetDateTimeString(wageRowObj.ReceiptRow["Mcpt_CreateDatetime"]);
- }
- break;
- }
- }
- catch (Exception ex){
- MessageBoxCustom.Show(ex.Message);
- this.Close();
- }
- }
- return dgRow;
- }
- string GetPcr_Type(object obj)
- {
- int type = 0;
-
- if (obj != null && obj.ToString().Trim().Length > 0)
- {
- type = Convert.ToInt32(obj.ToString());
- }
- switch (type)
- {
- case 0:return "直接录入";
- case 1: return "预约服务录入";
- case 2: return "拍照导片录入";
- case 3: return "初修导片录入";
- case 4: return "设计导片录入";
- }
- return "直接录入";
- }
-
-
-
-
-
- string GetsCollectionCategoryType(Model.WageStatisticsQueryItem witem,object obj)
- {
- string rettype = "未知";
- switch (witem)
- {
- case Model.WageStatisticsQueryItem.订单前期:
- rettype = "订单前期收款";
- break;
- case Model.WageStatisticsQueryItem.订单后期:
- case Model.WageStatisticsQueryItem.服务前期:
- case Model.WageStatisticsQueryItem.服务后期:
- rettype = GetClassCodeToCalssName(obj);
- break;
- }
- return rettype;
- }
- string GetClassCodeToCalssName(object obj)
- {
- if (obj != null && obj.ToString().Length>0)
- {
- return LYFZ.BLL.WageStatisticsProcess.GetClassCodeToCalssName(obj.ToString());
- }
- return "";
- }
- string WageStatisticsSatisfactionScore(DataRow row)
- {
- if (row != null&&row["sumScores"]!=null)
- {
- return row["sumScores"].ToString();
- }
- return "";
- }
- string GetProcessFilmSelectionStatus(object obj)
- {
- if (obj != null)
- {
- if (obj.ToString() == "1")
- {
- return "选片OK";
- }
- }
- return "未选";
- }
-
-
-
-
-
- string GetProcessStatus(object obj,string text="初修")
- {
- if (obj != null)
- {
- if (obj.ToString() == "2")
- {
- return text+"OK";
- }
- else if (obj.ToString() == "1")
- {
- return text + "中";
- }
- }
- return "未"+text;
- }
-
-
-
-
-
-
- string GetPhotographyStatus(object status, string time)
- {
- if (status != null && status.ToString() == "1")
- {
- return "拍照OK";
- }
- else if (time.Trim().Length > 1)
- {
- return "拍照中";
- }
- else {
- return "未拍";
- }
- }
-
-
-
-
-
- string GetRowValueToString(object obj)
- {
- if (obj != null)
- {
- return obj.ToString();
- }
- return "";
- }
-
-
-
-
-
- string GetUserIDToUserName(string userIDs)
- {
- return LYFZ.DAL.DAL_ErpUser.GetUserIDToUserName(userIDs);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- string GetToDecimal(object number)
- {
- if (number != null && number.ToString().Trim().Length > 0)
- {
- return Convert.ToDecimal(number).ToString("n2");
- }
- return "0";
- }
- string GetDateTimeString(object time)
- {
- if (time != null && time.ToString().Trim().Length>0)
- {
- return Convert.ToDateTime(time.ToString()).ToString("yyyy-MM-dd HH:mm");
- }
- return "";
- }
-
-
-
-
-
-
-
-
- void SetDataGridViewRowCellStyle(DataGridViewRow row, System.Drawing.Color bgcolor,int bgStarIndex=0, System.Drawing.FontStyle fStyle= System.Drawing.FontStyle.Regular,float size=10.5f,System.Windows.Forms.DataGridViewContentAlignment alignment = DataGridViewContentAlignment.MiddleCenter)
- {
-
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
- dataGridViewCellStyle2.Alignment = alignment;
- dataGridViewCellStyle2.BackColor = bgcolor;
- dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", size, fStyle, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
- dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- for (int i = 0; i < row.Cells.Count;i++ )
- {
- if (i >= bgStarIndex)
- {
- DataGridViewCell cell = row.Cells[i];
-
- cell.Style = dataGridViewCellStyle2;
- }
-
- }
- }
- void btnQuery_Click(object sender, EventArgs e)
- {
-
- }
- void btnClosed_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- List<UserWageStatisticsPerformanceCommission> _UserWageStatisticsPerformanceCommissionList = new List<UserWageStatisticsPerformanceCommission>();
-
-
-
- public List<UserWageStatisticsPerformanceCommission> UserWageStatisticsPerformanceCommissionList
- {
- get { return _UserWageStatisticsPerformanceCommissionList; }
- set { _UserWageStatisticsPerformanceCommissionList = value; }
- }
- void frmWageStatisticsViewList_Load(object sender, EventArgs e)
- {
- this.btnExport.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.StatisticalInquiryAllWagesCompetence, CustomAttributes.OperatingAuthority.DataExport);
- this.dgvStatisticsList.Columns[0].Visible = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.IsGroupEdition;
-
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_DepartmentAndEmployee(this.cmbEmployeeName, IsFirstNodeNull: true, IsFirstNodeName: "全部", IsShowResign: false, IsShowAdmin: true, tb_User: LYFZ.DAL.DAL_ErpUser.SimpleUserDataTable);
- BindItemCategory();
- }
-
-
-
- void BindItemCategory()
- {
- this.cmbItemCategory.Items.Clear();
- this.cmbItemCategory.Items.Add("所有项目");
- string[] WageStatisticsQueryItems = Enum.GetNames(typeof(LYFZ.Model.WageStatisticsQueryItem));
- foreach (string qItem in WageStatisticsQueryItems)
- {
- this.cmbItemCategory.Items.Add(qItem);
- }
- this.cmbItemCategory.SelectedIndex = 0;
- }
- }
-
- }
|