123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575 |
- using LYFZ.ComponentLibrary;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace LYFZ.Software.MainBusiness.MarketingAllPerson
- {
- public partial class TeamCompetitionFormMain : LYFZ.Software.UI.MarketingAllPerson.TeamCompetitionFormMain
- {
- LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
- public TeamCompetitionFormMain()
- {
- this.Load += TeamCompetitionFormMain_Load;
- this.Shown += TeamCompetitionFormMain_Shown;
- this.cmbtreevActivityName.ComboBoxTree_NodeMouseClick += cmbtreevActivityName_ComboBoxTree_NodeMouseClick;
- this.cmbtreevMaxTeamName.ComboBoxTree_NodeMouseClick += cmbtreevMaxTeamName_ComboBoxTree_NodeMouseClick;
- this.cmbtreevMinTeamName.ComboBoxTree_NodeMouseClick += cmbtreevMinTeamName_ComboBoxTree_NodeMouseClick;
- this.chkYejiOrderBy.Click += chkYejiOrderBy_Click;
- this.btnNewActivity.Click += btnNewActivity_Click;
- this.btnSaveAs.Click += btnSaveAs_Click;
- this.btnClose.Click += btnClose_Click;
- this.pictImage.Click += pictImage_Click;
- this.Resize += TeamCompetitionFormMain_Resize;
- }
- /// <summary>
- /// 主门市比重
- /// </summary>
- decimal MinStoreProportion = 0;
- /// <summary>
- /// 副门市比重
- /// </summary>
- decimal ViceStoreProportion = 0;
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void TeamCompetitionFormMain_Load(object sender, EventArgs e)
- {
- DataTable dtProportion = orbll.GetView_Custom("tb_ErpCommissionPercentage", StrWhere: "Cp_ProportionType = 1", ShowColumnName: "Cp_ProportionCode,Cp_Proportion").Tables[0];
- for (int i = 0; i < dtProportion.Rows.Count; i++)
- {
- switch (dtProportion.Rows[i]["Cp_ProportionCode"].ToString().Trim())
- {
- case "MainStoreProportion": MinStoreProportion = Convert.ToDecimal(dtProportion.Rows[i]["Cp_Proportion"]); break;
- case "DeputyStoreProportion": ViceStoreProportion = Convert.ToDecimal(dtProportion.Rows[i]["Cp_Proportion"]); break;
- }
- }
- }
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void TeamCompetitionFormMain_Shown(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_TeamActivityName(this.cmbtreevActivityName);
- this.PublicFunctionRows();
- bool b = LYFZ.Software.MainBusiness.VersionControl.StaticVersion.UIFunctionVersion(VersionControl.VersionFunctionEnum.全员营销);
- if (!b)
- {
- this.Close();
- }
- }
- /// <summary>
- /// 活动名称选择事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void cmbtreevActivityName_ComboBoxTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_TeamMaxTaskName(this.cmbtreevMaxTeamName, this.cmbtreevActivityName.Tag.ToString().Trim(), IsFirstNodeNull: true);
- this.PublicFunctionRows();
- }
- /// <summary>
- /// 大队名称选择事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void cmbtreevMaxTeamName_ComboBoxTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_TeamMinTaskName(this.cmbtreevMinTeamName, this.cmbtreevActivityName.Tag.ToString().Trim(), this.cmbtreevMaxTeamName.Tag.ToString().Trim(), IsFirstNodeNull: true);
- this.PublicFunctionRows();
- }
- /// <summary>
- /// 小组名称选择事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void cmbtreevMinTeamName_ComboBoxTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
- {
- this.PublicFunctionRows();
- }
- /// <summary>
- /// 按业绩排序
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkYejiOrderBy_Click(object sender, EventArgs e)
- {
- this.PublicFunctionRows();
- }
- /// <summary>
- /// 新建活动
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnNewActivity_Click(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.MarketingAllPerson.SetSmallForm.AddTeamPersonSmallForm frm = new SetSmallForm.AddTeamPersonSmallForm();
- frm.StartPosition = FormStartPosition.Manual;
- frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- frm.ShowDialog();
- if (frm.IsSaveed)
- { LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_TeamActivityName(this.cmbtreevActivityName); }
- }
- /// <summary>
- /// 另存为
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnSaveAs_Click(object sender, EventArgs e)
- {
- string StrFilleName = "";
- if (!string.IsNullOrEmpty(this.cmbtreevMinTeamName.Text.Trim()))
- { StrFilleName += this.cmbtreevMinTeamName.Text.Trim() + "组PK图"; }
- else if (!string.IsNullOrEmpty(this.cmbtreevMaxTeamName.Text.Trim()))
- { StrFilleName += this.cmbtreevMaxTeamName.Text.Trim() + "队PK图"; }
- else if (!string.IsNullOrEmpty(this.cmbtreevActivityName.Text.Trim()))
- { StrFilleName += this.cmbtreevActivityName.Text.Trim() + "PK图"; }
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadSaveAs(this.pictImage.Image, StrFilleName: StrFilleName);
- }
- /// <summary>
- /// 关闭
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- /// <summary>
- /// 图片点击获取焦点
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void pictImage_Click(object sender, EventArgs e)
- {
- this.pictImage.Focus();
- }
- /// <summary>
- /// 窗体大小发生变事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void TeamCompetitionFormMain_Resize(object sender, EventArgs e)
- {
- //this.panelEx3.Height = this.panelEx1.Height - this.panelEx2.Height - 6;
- }
- /// <summary>
- /// 绘制数据
- /// </summary>
- void PublicFunctionRows()
- {
- if (!string.IsNullOrEmpty(this.cmbtreevActivityName.Text.Trim()) && this.cmbtreevActivityName.Tag != null && !string.IsNullOrEmpty(this.cmbtreevActivityName.Tag.ToString().Trim()))
- {
- string StrTasNumber = this.cmbtreevActivityName.Tag.ToString().Trim();
- DataTable dtActive = orbll.GetView_Custom("tb_ErpTeamActiveSet", StrWhere: "Tas_Number = '" + StrTasNumber + "'", ShowColumnName: "Tas_DateTimeStart,Tas_DateTimeEnd,Tas_BaodiTask,Tas_TargetTask,Tas_SprintTask").Tables[0];
- if (dtActive.Rows.Count > 0)
- {
- DataTable dtOpenSingle = OpenOrderPersonGroupDataTable(OpenOrderPersonDataTable(Convert.ToDateTime(dtActive.Rows[0]["Tas_DateTimeStart"]), Convert.ToDateTime(dtActive.Rows[0]["Tas_DateTimeEnd"])));
- string StrWhere = "Where Tps_TasNumber = '" + StrTasNumber + "'";
- if (this.cmbtreevMaxTeamName.Tag != null && !string.IsNullOrEmpty(this.cmbtreevMaxTeamName.Tag.ToString()))
- { StrWhere += " And Tps_TmxtNumber = '" + this.cmbtreevMaxTeamName.StrGetName.Trim() + "'"; }
- if (this.cmbtreevMinTeamName.Tag != null && !string.IsNullOrEmpty(this.cmbtreevMinTeamName.Tag.ToString()))
- { StrWhere += " And Tps_TmitNumber = '" + this.cmbtreevMinTeamName.StrGetName.Trim() + "'"; }
- string ExecuteSql = "select Tps_TmxtNumber,Tps_TmitNumber,Tps_UserNumber,Tmxn_Name,Tmin_Name,User_Name,Tps_BaodiTask,Tps_TargetTask,Tps_SprintTask from tb_ErpTeamPersonSet Left Join tb_ErpUser on User_EmployeeID = Tps_UserNumber Left Join tb_ErpTeamMaxNameSet on Tmxn_Number = Tps_TmxnNumber Left Join tb_ErpTeamMinNameSet on Tmin_Number = Tps_TminNumber " + StrWhere + ";";
- ExecuteSql += "select Tmxt_TasNumber,Tmxt_Number,Tmxn_Name,Tmxt_BaodiTask,Tmxt_TargetTask,Tmxt_SprintTask from tb_ErpTeamMaxTaskSet Left Join tb_ErpTeamMaxNameSet on Tmxn_Number = Tmxt_TmxnNumber where Tmxt_TasNumber = '" + StrTasNumber + "';";
- ExecuteSql += "select Tmit_TmxtNumber,Tmit_Number,Tmin_Name,Tmit_BaodiTask,Tmit_TargetTask,Tmit_SprintTask from tb_ErpTeamMinTaskSet Left Join tb_ErpTeamMinNameSet on Tmin_Number = Tmit_TminNumber where Tmit_TasNumber = '" + StrTasNumber + "';";
- DataSet dsData = orbll.GetView_Custom(ExecuteSql);
- DataTable dtTeamPerson = TeamPersonRankedDataTable(dsData.Tables["ds"], dtOpenSingle);
- DataTable dtTeamMax = dsData.Tables["ds1"];
- DataTable dtTeamMin = dsData.Tables["ds2"];
- #region 绘标题
- int TopAdd = 5;
- int LeftWidth = 0;
- int RowHeight = 30;
- Hashtable htColumnWidth = this.GetColumnWidth();
- int newBmpWidth = 0;
- for (int i = 0; i < dtTeamPerson.Columns.Count; i++)
- {
- switch (dtTeamPerson.Columns[i].ColumnName.Trim())
- {
- case "大队编号":
- case "小组编号":
- break;
- default:
- if (!this.chkYejiOrderBy.Checked)
- {
- if (dtTeamPerson.Columns[i].ColumnName.Trim() == "大队名称")
- {
- if (!string.IsNullOrEmpty(this.cmbtreevMaxTeamName.Text.Trim()) || !string.IsNullOrEmpty(this.cmbtreevMinTeamName.Text.Trim()))
- { break; }
- }
- if (dtTeamPerson.Columns[i].ColumnName.Trim() == "小组名称")
- {
- if (!string.IsNullOrEmpty(this.cmbtreevMinTeamName.Text.Trim()))
- { break; }
- }
- }
- newBmpWidth += Convert.ToInt32(htColumnWidth[dtTeamPerson.Columns[i].ColumnName.Trim()].ToString());
- break;
- }
- }
- int newBmpHeight = RowHeight * dtTeamPerson.Rows.Count + 50;
- if (!this.chkYejiOrderBy.Checked)
- {
- if (string.IsNullOrEmpty(this.cmbtreevMaxTeamName.Text.Trim()))
- { newBmpHeight += RowHeight * dtTeamMax.Rows.Count; }
- if (string.IsNullOrEmpty(this.cmbtreevMinTeamName.Text.Trim()))
- { newBmpHeight += RowHeight * dtTeamMin.Rows.Count; }
- }
- if (newBmpHeight < (this.panelEx3.Height - 23))
- { newBmpHeight = (this.panelEx3.Height - 23); }
- Bitmap newBmp = new Bitmap(newBmpWidth + LeftWidth * 2 + 10, newBmpHeight);
- Graphics g = Graphics.FromImage(newBmp);
- g.Clear(System.Drawing.Color.White);
- Brush b = Brushes.Black;
- Pen p = new Pen(Brushes.Black, 1);
- Font ft11b = new Font("微软雅黑", 11);
- Font ft11 = new Font("微软雅黑", 11, FontStyle.Italic);
- Font ft15 = new Font("微软雅黑", 15);
- int TableWidth = newBmp.Width - LeftWidth * 2 - 10;
- Rectangle rec1 = new Rectangle(LeftWidth, 0, TableWidth, RowHeight);
- g.FillRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.backColortitle, rec1);//画标题矩形
- Rectangle rec = new Rectangle(LeftWidth, 0, TableWidth, RowHeight);
- g.DrawRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, rec);
- int intForTitleLeft = rec1.X;
- for (int i = 0; i < dtTeamPerson.Columns.Count; i++)
- {
- switch (dtTeamPerson.Columns[i].ColumnName.Trim())
- {
- case "大队编号":
- case "小组编号":
- break;
- default:
- if (!this.chkYejiOrderBy.Checked)
- {
- if (dtTeamPerson.Columns[i].ColumnName.Trim() == "大队名称")
- {
- if (!string.IsNullOrEmpty(this.cmbtreevMaxTeamName.Text.Trim()) || !string.IsNullOrEmpty(this.cmbtreevMinTeamName.Text.Trim()))
- { break; }
- }
- if (dtTeamPerson.Columns[i].ColumnName.Trim() == "小组名称")
- {
- if (!string.IsNullOrEmpty(this.cmbtreevMinTeamName.Text.Trim()))
- { break; }
- }
- }
- int IntColumnWidth = Convert.ToInt32(htColumnWidth[dtTeamPerson.Columns[i].ColumnName.Trim()].ToString().Trim());
- SizeF sizef = g.MeasureString(dtTeamPerson.Columns[i].ColumnName.Trim(), ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- int FtHeigth = Convert.ToInt32(sizef.Height);
- Rectangle rec1_1 = new Rectangle(intForTitleLeft + IntColumnWidth / 2 - FtWidth / 2, rec1.Y + TopAdd, IntColumnWidth, FtHeigth);
- g.DrawString(dtTeamPerson.Columns[i].ColumnName.Trim(), ft11b, Brushes.White, rec1_1);
- if (i < dtTeamPerson.Columns.Count - 1)
- {
- Point p11_1 = new Point(intForTitleLeft + IntColumnWidth, rec1.Y);
- Point p11_2 = new Point(intForTitleLeft + IntColumnWidth, rec1.Y + rec1.Height);
- g.DrawLine(new Pen(Brushes.Lavender, 1), p11_1, p11_2);
- }
- intForTitleLeft += IntColumnWidth;
- break;
- }
- }
- int intForRowTop = rec1.Y;
- #endregion
- if (!this.chkYejiOrderBy.Checked)
- {
- if (string.IsNullOrEmpty(this.cmbtreevMaxTeamName.Text.Trim()) && string.IsNullOrEmpty(this.cmbtreevMinTeamName.Text.Trim()))
- {
- #region 只选择活动名称
- DataTable dtTeamMaxGroupBy = this.GetTeamMaxGroupBy(dtTeamMax, dtTeamPerson);
- DataTable dtTeamMinGroupBy = this.GetTeamMinGroupBy(dtTeamMin, dtTeamPerson);
- DataRow[] dtRowMaxGroupBy = dtTeamMaxGroupBy.Select("", "完成任务 DESC");
- for (int i = 0; i < dtRowMaxGroupBy.Length; i++)
- {
- #region 绘制大队
- intForRowTop += RowHeight;
- Rectangle recMax = new Rectangle(rec1.X, intForRowTop, TableWidth, RowHeight);
- g.DrawRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, recMax);
- Rectangle recMaxBackColor = new Rectangle(recMax.X + 1, recMax.Y + 1, recMax.Width - 1, recMax.Height - 1);
- g.FillRectangle(Brushes.LightSalmon, recMaxBackColor);
- int intMaxGroupRowLeft = recMax.X;
- for (int j = 0; j < dtTeamPerson.Columns.Count; j++)
- {
- switch (dtTeamPerson.Columns[j].ColumnName.Trim())
- {
- case "大队编号":
- case "小组编号":
- break;
- default:
- int IntColumnWidth = Convert.ToInt32(htColumnWidth[dtTeamPerson.Columns[j].ColumnName.Trim()].ToString().Trim());
- if (dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("保底完成情况") != -1 || dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("目标完成情况") != -1 || dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("冲刺完成情况") != -1)
- {
- Rectangle recA = new Rectangle(intMaxGroupRowLeft + TopAdd, recMax.Y + (RowHeight - 20) / 2, 150, 20);
- g.DrawRectangle(new Pen(Brushes.LightSkyBlue, 1), recA);
- decimal decValue = Convert.ToDecimal(dtRowMaxGroupBy[i][dtTeamPerson.Columns[j].ColumnName.Trim()]);
- int recBWidth = Convert.ToInt32(recA.Width * decValue / 100);
- if (recBWidth > (recA.Width - 1))
- { recBWidth = recA.Width - 1; }
- Rectangle recB = new Rectangle(recA.X + 1, recA.Y + 1, recBWidth, recA.Height - 1);
- g.FillRectangle(Brushes.LightSlateGray, recB);
- string StrValue = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(decValue) + "%";
- SizeF sizef = g.MeasureString(StrValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- Rectangle recC = new Rectangle(recA.X + recA.Width + TopAdd, intForRowTop + TopAdd, FtWidth, RowHeight);
- g.DrawString(StrValue, ft11b, b, recC);
- }
- else
- {
- string StrStringValue = dtRowMaxGroupBy[i][dtTeamPerson.Columns[j].ColumnName.Trim()].ToString().Trim();
- int WidthLeft = intMaxGroupRowLeft;
- if (dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("任务") != -1 || dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("业绩") != -1 || dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("均价") != -1)
- {
- StrStringValue = Convert.ToDecimal(StrStringValue).ToString("0.00");
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intMaxGroupRowLeft + IntColumnWidth - FtWidth - TopAdd;
- }
- else if (dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("单数") != -1)
- {
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intMaxGroupRowLeft + IntColumnWidth / 2 - FtWidth / 2;
- }
- else
- {
- WidthLeft = intMaxGroupRowLeft + TopAdd;
- }
- Rectangle rec1_1 = new Rectangle(WidthLeft, intForRowTop + TopAdd, IntColumnWidth, RowHeight);
- g.DrawString(StrStringValue, ft11b, b, rec1_1);
- }
- Point p11_1 = new Point(intMaxGroupRowLeft + IntColumnWidth, intForRowTop);
- Point p11_2 = new Point(intMaxGroupRowLeft + IntColumnWidth, intForRowTop + recMax.Height);
- g.DrawLine(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, p11_1, p11_2);
- intMaxGroupRowLeft += IntColumnWidth;
- break;
- }
- }
- #endregion
- DataRow[] dtMinGroupBy = dtTeamMinGroupBy.Select("大队编号 = '" + dtRowMaxGroupBy[i]["大队编号"].ToString().Trim() + "'", "完成任务 DESC");
- for (int j = 0; j < dtMinGroupBy.Length; j++)
- {
- #region 绘制小组
- intForRowTop += RowHeight;
- Rectangle recMin = new Rectangle(rec1.X, intForRowTop, TableWidth, RowHeight);
- g.DrawRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, recMin);
- int MaxTeamWidth = Convert.ToInt32(htColumnWidth["大队名称"]);
- Rectangle recMinBackColor = new Rectangle(recMin.X + MaxTeamWidth + 1, recMin.Y + 1, recMin.Width - MaxTeamWidth - 1, recMin.Height - 1);
- g.FillRectangle(Brushes.Wheat, recMinBackColor);
- int intMinGroupRowLeft = recMin.X;
- for (int k = 0; k < dtTeamPerson.Columns.Count; k++)
- {
- switch (dtTeamPerson.Columns[k].ColumnName.Trim())
- {
- case "大队编号":
- case "小组编号":
- break;
- default:
- int IntColumnWidth = Convert.ToInt32(htColumnWidth[dtTeamPerson.Columns[k].ColumnName.Trim()].ToString().Trim());
- if (dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("保底完成情况") != -1 || dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("目标完成情况") != -1 || dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("冲刺完成情况") != -1)
- {
- Rectangle recA = new Rectangle(intMinGroupRowLeft + TopAdd, recMin.Y + (RowHeight - 20) / 2, 150, 20);
- g.DrawRectangle(new Pen(Brushes.LightSkyBlue, 1), recA);
- decimal decValue = Convert.ToDecimal(dtMinGroupBy[j][dtTeamPerson.Columns[k].ColumnName.Trim()]);
- int recBWidth = Convert.ToInt32(recA.Width * decValue / 100);
- if (recBWidth > (recA.Width - 1))
- { recBWidth = recA.Width - 1; }
- Rectangle recB = new Rectangle(recA.X + 1, recA.Y + 1, recBWidth, recA.Height - 1);
- g.FillRectangle(Brushes.LightSlateGray, recB);
- string StrValue = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(decValue) + "%";
- SizeF sizef = g.MeasureString(StrValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- Rectangle recC = new Rectangle(recA.X + recA.Width + TopAdd, intForRowTop + TopAdd, FtWidth, RowHeight);
- g.DrawString(StrValue, ft11b, b, recC);
- }
- else
- {
- string StrStringValue = dtMinGroupBy[j][dtTeamPerson.Columns[k].ColumnName.Trim()].ToString().Trim();
- int WidthLeft = intMinGroupRowLeft;
- if (dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("任务") != -1 || dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("业绩") != -1 || dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("均价") != -1)
- {
- StrStringValue = Convert.ToDecimal(StrStringValue).ToString("0.00");
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intMinGroupRowLeft + IntColumnWidth - FtWidth - TopAdd;
- }
- else if (dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("单数") != -1)
- {
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intMinGroupRowLeft + IntColumnWidth / 2 - FtWidth / 2;
- }
- else
- {
- WidthLeft = intMinGroupRowLeft + TopAdd;
- }
- Rectangle rec1_1 = new Rectangle(WidthLeft, intForRowTop + TopAdd, IntColumnWidth, RowHeight);
- g.DrawString(StrStringValue, ft11b, b, rec1_1);
- }
- Point p11_1 = new Point(intMinGroupRowLeft + IntColumnWidth, intForRowTop);
- Point p11_2 = new Point(intMinGroupRowLeft + IntColumnWidth, intForRowTop + recMin.Height);
- g.DrawLine(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, p11_1, p11_2);
- intMinGroupRowLeft += IntColumnWidth;
- break;
- }
- }
- #endregion
- DataRow[] dtRowTeamPerson = dtTeamPerson.Select("大队编号 = '" + dtRowMaxGroupBy[i]["大队编号"].ToString().Trim() + "' And 小组编号 = '" + dtMinGroupBy[j]["小组编号"].ToString().Trim() + "'", "完成任务 DESC");
- for (int k = 0; k < dtRowTeamPerson.Length; k++)
- {
- #region 绘制组员
- intForRowTop += RowHeight;
- Rectangle recGroup = new Rectangle(rec1.X, intForRowTop, TableWidth, RowHeight);
- g.DrawRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, recGroup);
- int intGroupRowLeft = recGroup.X;
- for (int l = 0; l < dtTeamPerson.Columns.Count; l++)
- {
- switch (dtTeamPerson.Columns[l].ColumnName.Trim())
- {
- case "大队编号":
- case "小组编号":
- break;
- default:
- int IntColumnWidth = Convert.ToInt32(htColumnWidth[dtTeamPerson.Columns[l].ColumnName.Trim()].ToString().Trim());
- if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("保底完成情况") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("目标完成情况") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("冲刺完成情况") != -1)
- {
- Rectangle recA = new Rectangle(intGroupRowLeft + TopAdd, recGroup.Y + (RowHeight - 20) / 2, 150, 20);
- g.DrawRectangle(new Pen(Brushes.LightSkyBlue, 1), recA);
- decimal decValue = Convert.ToDecimal(dtRowTeamPerson[k][dtTeamPerson.Columns[l].ColumnName.Trim()]);
- int recBWidth = Convert.ToInt32(recA.Width * decValue / 100);
- if (recBWidth > (recA.Width - 1))
- { recBWidth = recA.Width - 1; }
- Rectangle recB = new Rectangle(recA.X + 1, recA.Y + 1, recBWidth, recA.Height - 1);
- g.FillRectangle(Brushes.LightSlateGray, recB);
- string StrValue = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(decValue) + "%";
- SizeF sizef = g.MeasureString(StrValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- Rectangle recC = new Rectangle(recA.X + recA.Width + TopAdd, intForRowTop + TopAdd, FtWidth, RowHeight);
- g.DrawString(StrValue, ft11b, b, recC);
- }
- else
- {
- string StrStringValue = dtRowTeamPerson[k][dtTeamPerson.Columns[l].ColumnName.Trim()].ToString().Trim();
- int WidthLeft = intGroupRowLeft;
- if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("任务") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("业绩") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("均价") != -1)
- {
- StrStringValue = Convert.ToDecimal(StrStringValue).ToString("0.00");
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intGroupRowLeft + IntColumnWidth - FtWidth - TopAdd;
- }
- else if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("单数") != -1)
- {
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intGroupRowLeft + IntColumnWidth / 2 - FtWidth / 2;
- }
- else
- {
- WidthLeft = intGroupRowLeft + TopAdd;
- }
- if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("大队名称") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("小组名称") != -1)
- {
- StrStringValue = "";
- }
- Rectangle rec1_1 = new Rectangle(WidthLeft, intForRowTop + TopAdd, IntColumnWidth, RowHeight);
- g.DrawString(StrStringValue, ft11b, b, rec1_1);
- }
- Point p11_1 = new Point(intGroupRowLeft + IntColumnWidth, intForRowTop);
- Point p11_2 = new Point(intGroupRowLeft + IntColumnWidth, intForRowTop + recGroup.Height);
- g.DrawLine(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, p11_1, p11_2);
- intGroupRowLeft += IntColumnWidth;
- break;
- }
- }
- #endregion
- }
- }
- }
- #endregion
- }
- else if (!string.IsNullOrEmpty(this.cmbtreevMaxTeamName.Text.Trim()) && string.IsNullOrEmpty(this.cmbtreevMinTeamName.Text.Trim()))
- {
- #region 只选择活动名称和大队名称
- DataTable dtTeamMinGroupBy = this.GetTeamMinGroupBy(dtTeamMin, dtTeamPerson);
- DataRow[] dtMinGroupBy = dtTeamMinGroupBy.Select("大队编号 = '" + this.cmbtreevMaxTeamName.StrGetName.ToString().Trim() + "'", "完成任务 DESC");
- for (int j = 0; j < dtMinGroupBy.Length; j++)
- {
- #region 绘制小组
- intForRowTop += RowHeight;
- Rectangle recMin = new Rectangle(rec1.X, intForRowTop, TableWidth, RowHeight);
- g.DrawRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, recMin);
- Rectangle recMinBackColor = new Rectangle(recMin.X + 1, recMin.Y + 1, recMin.Width - 1, recMin.Height - 1);
- g.FillRectangle(Brushes.Wheat, recMinBackColor);
- int intMinGroupRowLeft = recMin.X;
- for (int k = 0; k < dtTeamPerson.Columns.Count; k++)
- {
- switch (dtTeamPerson.Columns[k].ColumnName.Trim())
- {
- case "大队编号":
- case "小组编号":
- case "大队名称":
- break;
- default:
- int IntColumnWidth = Convert.ToInt32(htColumnWidth[dtTeamPerson.Columns[k].ColumnName.Trim()].ToString().Trim());
- if (dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("保底完成情况") != -1 || dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("目标完成情况") != -1 || dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("冲刺完成情况") != -1)
- {
- Rectangle recA = new Rectangle(intMinGroupRowLeft + TopAdd, recMin.Y + (RowHeight - 20) / 2, 150, 20);
- g.DrawRectangle(new Pen(Brushes.LightSkyBlue, 1), recA);
- decimal decValue = Convert.ToDecimal(dtMinGroupBy[j][dtTeamPerson.Columns[k].ColumnName.Trim()]);
- int recBWidth = Convert.ToInt32(recA.Width * decValue / 100);
- if (recBWidth > (recA.Width - 1))
- { recBWidth = recA.Width - 1; }
- Rectangle recB = new Rectangle(recA.X + 1, recA.Y + 1, recBWidth, recA.Height - 1);
- g.FillRectangle(Brushes.LightSlateGray, recB);
- string StrValue = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(decValue) + "%";
- SizeF sizef = g.MeasureString(StrValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- Rectangle recC = new Rectangle(recA.X + recA.Width + TopAdd, intForRowTop + TopAdd, FtWidth, RowHeight);
- g.DrawString(StrValue, ft11b, b, recC);
- }
- else
- {
- string StrStringValue = dtMinGroupBy[j][dtTeamPerson.Columns[k].ColumnName.Trim()].ToString().Trim();
- int WidthLeft = intMinGroupRowLeft;
- if (dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("任务") != -1 || dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("业绩") != -1 || dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("均价") != -1)
- {
- StrStringValue = Convert.ToDecimal(StrStringValue).ToString("0.00");
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intMinGroupRowLeft + IntColumnWidth - FtWidth - TopAdd;
- }
- else if (dtTeamPerson.Columns[k].ColumnName.Trim().IndexOf("单数") != -1)
- {
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intMinGroupRowLeft + IntColumnWidth / 2 - FtWidth / 2;
- }
- else
- { WidthLeft = intMinGroupRowLeft + TopAdd; }
- Rectangle rec1_1 = new Rectangle(WidthLeft, intForRowTop + TopAdd, IntColumnWidth, RowHeight);
- g.DrawString(StrStringValue, ft11b, b, rec1_1);
- }
- Point p11_1 = new Point(intMinGroupRowLeft + IntColumnWidth, intForRowTop);
- Point p11_2 = new Point(intMinGroupRowLeft + IntColumnWidth, intForRowTop + recMin.Height);
- g.DrawLine(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, p11_1, p11_2);
- intMinGroupRowLeft += IntColumnWidth;
- break;
- }
- }
- #endregion
- DataRow[] dtRowTeamPerson = dtTeamPerson.Select("大队编号 = '" + this.cmbtreevMaxTeamName.StrGetName.ToString().Trim() + "' And 小组编号 = '" + dtMinGroupBy[j]["小组编号"].ToString().Trim() + "'", "完成任务 DESC");
- for (int k = 0; k < dtRowTeamPerson.Length; k++)
- {
- #region 绘制组员
- intForRowTop += RowHeight;
- Rectangle recGroup = new Rectangle(rec1.X, intForRowTop, TableWidth, RowHeight);
- g.DrawRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, recGroup);
- int intGroupRowLeft = recGroup.X;
- for (int l = 0; l < dtTeamPerson.Columns.Count; l++)
- {
- switch (dtTeamPerson.Columns[l].ColumnName.Trim())
- {
- case "大队编号":
- case "小组编号":
- case "大队名称":
- break;
- default:
- int IntColumnWidth = Convert.ToInt32(htColumnWidth[dtTeamPerson.Columns[l].ColumnName.Trim()].ToString().Trim());
- if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("保底完成情况") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("目标完成情况") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("冲刺完成情况") != -1)
- {
- Rectangle recA = new Rectangle(intGroupRowLeft + TopAdd, recGroup.Y + (RowHeight - 20) / 2, 150, 20);
- g.DrawRectangle(new Pen(Brushes.LightSkyBlue, 1), recA);
- decimal decValue = Convert.ToDecimal(dtRowTeamPerson[k][dtTeamPerson.Columns[l].ColumnName.Trim()]);
- int recBWidth = Convert.ToInt32(recA.Width * decValue / 100);
- if (recBWidth > (recA.Width - 1))
- { recBWidth = recA.Width - 1; }
- Rectangle recB = new Rectangle(recA.X + 1, recA.Y + 1, recBWidth, recA.Height - 1);
- g.FillRectangle(Brushes.LightSlateGray, recB);
- string StrValue = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(decValue) + "%";
- SizeF sizef = g.MeasureString(StrValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- Rectangle recC = new Rectangle(recA.X + recA.Width + TopAdd, intForRowTop + TopAdd, FtWidth, RowHeight);
- g.DrawString(StrValue, ft11b, b, recC);
- }
- else
- {
- string StrStringValue = dtRowTeamPerson[k][dtTeamPerson.Columns[l].ColumnName.Trim()].ToString().Trim();
- int WidthLeft = intGroupRowLeft;
- if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("任务") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("业绩") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("均价") != -1)
- {
- StrStringValue = Convert.ToDecimal(StrStringValue).ToString("0.00");
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intGroupRowLeft + IntColumnWidth - FtWidth - TopAdd;
- }
- else if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("单数") != -1)
- {
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intGroupRowLeft + IntColumnWidth / 2 - FtWidth / 2;
- }
- else
- { WidthLeft = intGroupRowLeft + TopAdd; }
- if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("大队名称") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("小组名称") != -1)
- { StrStringValue = ""; }
- Rectangle rec1_1 = new Rectangle(WidthLeft, intForRowTop + TopAdd, IntColumnWidth, RowHeight);
- g.DrawString(StrStringValue, ft11b, b, rec1_1);
- }
- Point p11_1 = new Point(intGroupRowLeft + IntColumnWidth, intForRowTop);
- Point p11_2 = new Point(intGroupRowLeft + IntColumnWidth, intForRowTop + recGroup.Height);
- g.DrawLine(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, p11_1, p11_2);
- intGroupRowLeft += IntColumnWidth;
- break;
- }
- }
- #endregion
- }
- }
- #endregion
- }
- else if (!string.IsNullOrEmpty(this.cmbtreevMaxTeamName.Text.Trim()) && !string.IsNullOrEmpty(this.cmbtreevMinTeamName.Text.Trim()))
- {
- #region 选择活动名称和大队名称、小组名称
- DataRow[] dtRowTeamPerson = dtTeamPerson.Select("大队编号 = '" + this.cmbtreevMaxTeamName.StrGetName.ToString().Trim() + "' And 小组编号 = '" + this.cmbtreevMinTeamName.StrGetName.ToString().Trim() + "'", "完成任务 DESC");
- for (int k = 0; k < dtRowTeamPerson.Length; k++)
- {
- #region 绘制组员
- intForRowTop += RowHeight;
- Rectangle recGroup = new Rectangle(rec1.X, intForRowTop, TableWidth, RowHeight);
- g.DrawRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, recGroup);
- Rectangle rec2_1 = new Rectangle(recGroup.X + 1, recGroup.Y + 1, recGroup.Width - 1, recGroup.Height - 1);
- if ((k % 2) > 0)
- { g.FillRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.brSingle, rec2_1); }
- else
- { g.FillRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.brDouble, rec2_1); }
- int intGroupRowLeft = recGroup.X;
- for (int l = 0; l < dtTeamPerson.Columns.Count; l++)
- {
- switch (dtTeamPerson.Columns[l].ColumnName.Trim())
- {
- case "大队编号":
- case "小组编号":
- case "大队名称":
- case "小组名称":
- break;
- default:
- int IntColumnWidth = Convert.ToInt32(htColumnWidth[dtTeamPerson.Columns[l].ColumnName.Trim()].ToString().Trim());
- if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("保底完成情况") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("目标完成情况") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("冲刺完成情况") != -1)
- {
- Rectangle recA = new Rectangle(intGroupRowLeft + TopAdd, recGroup.Y + (RowHeight - 20) / 2, 150, 20);
- g.DrawRectangle(new Pen(Brushes.LightSkyBlue, 1), recA);
- decimal decValue = Convert.ToDecimal(dtRowTeamPerson[k][dtTeamPerson.Columns[l].ColumnName.Trim()]);
- int recBWidth = Convert.ToInt32(recA.Width * decValue / 100);
- if (recBWidth > (recA.Width - 1))
- { recBWidth = recA.Width - 1; }
- Rectangle recB = new Rectangle(recA.X + 1, recA.Y + 1, recBWidth, recA.Height - 1);
- g.FillRectangle(Brushes.LightSlateGray, recB);
- string StrValue = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(decValue) + "%";
- SizeF sizef = g.MeasureString(StrValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- Rectangle recC = new Rectangle(recA.X + recA.Width + TopAdd, intForRowTop + TopAdd, FtWidth, RowHeight);
- g.DrawString(StrValue, ft11b, b, recC);
- }
- else
- {
- string StrStringValue = dtRowTeamPerson[k][dtTeamPerson.Columns[l].ColumnName.Trim()].ToString().Trim();
- int WidthLeft = intGroupRowLeft;
- if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("任务") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("业绩") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("均价") != -1)
- {
- StrStringValue = Convert.ToDecimal(StrStringValue).ToString("0.00");
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intGroupRowLeft + IntColumnWidth - FtWidth - TopAdd;
- }
- else if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("单数") != -1)
- {
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intGroupRowLeft + IntColumnWidth / 2 - FtWidth / 2;
- }
- else
- { WidthLeft = intGroupRowLeft + TopAdd; }
- if (dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("大队名称") != -1 || dtTeamPerson.Columns[l].ColumnName.Trim().IndexOf("小组名称") != -1)
- { StrStringValue = ""; }
- Rectangle rec1_1 = new Rectangle(WidthLeft, intForRowTop + TopAdd, IntColumnWidth, RowHeight);
- g.DrawString(StrStringValue, ft11b, b, rec1_1);
- }
- Point p11_1 = new Point(intGroupRowLeft + IntColumnWidth, intForRowTop);
- Point p11_2 = new Point(intGroupRowLeft + IntColumnWidth, intForRowTop + recGroup.Height);
- g.DrawLine(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, p11_1, p11_2);
- intGroupRowLeft += IntColumnWidth;
- break;
- }
- }
- #endregion
- }
- #endregion
- }
- }
- else
- {
- #region 按个人业绩排序
- DataRow[] dtRows = dtTeamPerson.Select("", "完成任务 DESC,小组名称 ASC,员工姓名 ASC");
- for (int i = 0; i < dtRows.Length; i++)
- {
- intForRowTop += RowHeight;
- Rectangle rec2 = new Rectangle(rec1.X, intForRowTop, TableWidth, RowHeight);
- g.DrawRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, rec2);
- Rectangle rec2_1 = new Rectangle(rec1.X + 1, rec2.Y + 1, rec2.Width - 1, rec2.Height - 1);
- if ((i % 2) > 0)
- { g.FillRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.brSingle, rec2_1); }
- else
- { g.FillRectangle(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.brDouble, rec2_1); }
- int intForRowLeft = rec2.X;
- for (int j = 0; j < dtTeamPerson.Columns.Count; j++)
- {
- switch (dtTeamPerson.Columns[j].ColumnName.Trim())
- {
- case "大队编号":
- case "小组编号":
- break;
- default:
- int IntColumnWidth = Convert.ToInt32(htColumnWidth[dtTeamPerson.Columns[j].ColumnName.Trim()].ToString().Trim());
- if (dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("保底完成情况") != -1 || dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("目标完成情况") != -1 || dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("冲刺完成情况") != -1)
- {
- Rectangle recA = new Rectangle(intForRowLeft + TopAdd, rec2.Y + (RowHeight - 20) / 2, 150, 20);
- g.DrawRectangle(new Pen(Brushes.LightSkyBlue, 1), recA);
- decimal decValue = Convert.ToDecimal(dtRows[i][dtTeamPerson.Columns[j].ColumnName.Trim()]);
- int recBWidth = Convert.ToInt32(recA.Width * decValue / 100);
- if (recBWidth > (recA.Width - 1))
- { recBWidth = recA.Width - 1; }
- Rectangle recB = new Rectangle(recA.X + 1, recA.Y + 1, recBWidth, recA.Height - 1);
- g.FillRectangle(Brushes.LightSlateGray, recB);
- string StrValue = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(decValue) + "%";
- SizeF sizef = g.MeasureString(StrValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- Rectangle recC = new Rectangle(recA.X + recA.Width + TopAdd, intForRowTop + TopAdd, FtWidth, RowHeight);
- g.DrawString(StrValue, ft11b, b, recC);
- }
- else
- {
- string StrStringValue = dtRows[i][dtTeamPerson.Columns[j].ColumnName.Trim()].ToString().Trim();
- int WidthLeft = intForRowLeft;
- if (dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("任务") != -1 || dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("业绩") != -1 || dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("均价") != -1)
- {
- StrStringValue = Convert.ToDecimal(StrStringValue).ToString("0.00");
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intForRowLeft + IntColumnWidth - FtWidth - TopAdd;
- }
- else if (dtTeamPerson.Columns[j].ColumnName.Trim().IndexOf("单数") != -1)
- {
- SizeF sizef = g.MeasureString(StrStringValue, ft11b);
- int FtWidth = Convert.ToInt32(sizef.Width) + 1;
- WidthLeft = intForRowLeft + IntColumnWidth / 2 - FtWidth / 2;
- }
- else
- { WidthLeft = intForRowLeft + TopAdd; }
- Rectangle rec1_1 = new Rectangle(WidthLeft, intForRowTop + TopAdd, IntColumnWidth, RowHeight);
- g.DrawString(StrStringValue, ft11b, b, rec1_1);
- }
- Point p11_1 = new Point(intForRowLeft + IntColumnWidth, intForRowTop);
- Point p11_2 = new Point(intForRowLeft + IntColumnWidth, intForRowTop + rec2.Height);
- g.DrawLine(LYFZ.Software.MainBusiness.DoorCityProcess.PublicGraphics.PenborderColor, p11_1, p11_2);
- intForRowLeft += IntColumnWidth;
- break;
- }
- }
- }
- #endregion
- }
- this.pictImage.Dock = DockStyle.None;
- this.pictImage.Image = newBmp;
- this.pictImage.Height = newBmp.Height;
- this.pictImage.Width = newBmp.Width;
- }
- }
- }
- /// <summary>
- /// 获取列宽
- /// </summary>
- Hashtable GetColumnWidth()
- {
- Hashtable htColumnWidth = new Hashtable();
- htColumnWidth["大队名称"] = 130;
- htColumnWidth["小组名称"] = 130;
- htColumnWidth["员工姓名"] = 100;
- htColumnWidth["完成任务"] = 100;
- htColumnWidth["保底任务"] = 100;
- htColumnWidth["保底完成情况"] = 230;
- htColumnWidth["目标任务"] = 100;
- htColumnWidth["目标完成情况"] = 230;
- htColumnWidth["冲刺任务"] = 100;
- htColumnWidth["冲刺完成情况"] = 230;
- htColumnWidth["婚纱单数"] = 100;
- htColumnWidth["婚纱业绩"] = 100;
- htColumnWidth["婚纱均价"] = 100;
- htColumnWidth["儿童单数"] = 100;
- htColumnWidth["儿童业绩"] = 100;
- htColumnWidth["儿童均价"] = 100;
- htColumnWidth["写真单数"] = 100;
- htColumnWidth["写真业绩"] = 100;
- htColumnWidth["写真均价"] = 100;
- htColumnWidth["服务单数"] = 100;
- htColumnWidth["服务业绩"] = 100;
- htColumnWidth["服务均价"] = 100;
- htColumnWidth["婚庆单数"] = 100;
- htColumnWidth["婚庆业绩"] = 100;
- htColumnWidth["婚庆均价"] = 100;
- return htColumnWidth;
- }
- /// <summary>
- /// 组织收款接单人数据
- /// </summary>
- /// <param name="dt"></param>
- DataTable OpenOrderPersonDataTable(DateTime StrTimeStart, DateTime StrTimeEnd)
- {
- DataTable NewTable = new DataTable();
- NewTable.Columns.Add("OrdNumber", typeof(string));
- NewTable.Columns.Add("OpenSingle", typeof(string));
- NewTable.Columns.Add("OrdType", typeof(string));
- NewTable.Columns.Add("PaymentAmount", typeof(decimal));
- NewTable.Columns.Add("SeriesPrice", typeof(decimal));
- NewTable.Columns.Add("MinVice", typeof(string));
- string StrTableName = "tb_ErpPayment Left Join tb_ErpOrder on Ord_Number = Pay_OrdNumber";
- string StrWhere = "Pay_Type = '0' And Pay_Category in ('预约收款', '预约补款', '全款') And (Pay_CreateDatetime between '" + StrTimeStart.ToString("yyyy-MM-dd HH:mm:ss") + "' And '" + StrTimeEnd.ToString("yyyy-MM-dd HH:mm:ss") + "')";
- string StrColumnName = "Pay_OrdNumber,Sum(Pay_AmountOf) AS Pay_AmountOf,Pay_OpenSingle,Ord_Type,Max(Ord_SeriesPrice) AS Ord_SeriesPrice";
- DataTable dt = orbll.GetView_Custom(StrTableName, StrWhere: StrWhere, ShowColumnName: StrColumnName, GroupBy: "Pay_OrdNumber,Pay_OpenSingle,Ord_Type").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- string[] StrArray = dt.Rows[i]["Pay_OpenSingle"].ToString().Trim().Split(',');
- for (int j = 0; j < StrArray.Length; j++)
- {
- if (!string.IsNullOrEmpty(StrArray[j].Trim()))
- {
- DataRow newRow = NewTable.NewRow();
- newRow["OrdNumber"] = dt.Rows[i]["Pay_OrdNumber"].ToString().Trim();
- newRow["OpenSingle"] = StrArray[j].Trim();
- newRow["OrdType"] = dt.Rows[i]["Ord_Type"].ToString().Trim();
- decimal decAmount = Convert.ToDecimal(dt.Rows[i]["Pay_AmountOf"]) / (MinStoreProportion + ViceStoreProportion * (dt.Rows[i]["Pay_OpenSingle"].ToString().Trim().Length - dt.Rows[i]["Pay_OpenSingle"].ToString().Trim().Replace(",", "").Trim().Length));
- if (j == 0)
- {
- newRow["PaymentAmount"] = decAmount * MinStoreProportion;
- newRow["SeriesPrice"] = Convert.ToDecimal(dt.Rows[i]["Ord_SeriesPrice"]);
- newRow["MinVice"] = "Min";
- }
- else
- {
- newRow["PaymentAmount"] = decAmount * ViceStoreProportion;
- newRow["SeriesPrice"] = 0;
- newRow["MinVice"] = "Vice";
- }
- NewTable.Rows.Add(newRow);
- }
- }
- }
- }
- return NewTable;
- }
- /// <summary>
- /// 合并计算实收金额
- /// </summary>
- /// <param name="dt"></param>
- /// <returns></returns>
- DataTable OpenOrderPersonGroupDataTable(DataTable dt)
- {
- Hashtable htData = new Hashtable();
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- string StrKeys = dt.Rows[i]["OpenSingle"].ToString().Trim();
- DataRow[] dtRow = dt.Select("OpenSingle = '" + StrKeys.Trim() + "' And OrdType = '0' And MinVice = 'Min'");
- DataRow[] dtRow1 = dt.Select("OpenSingle = '" + StrKeys.Trim() + "' And OrdType = '1' And MinVice = 'Min'");
- DataRow[] dtRow2 = dt.Select("OpenSingle = '" + StrKeys.Trim() + "' And OrdType = '2' And MinVice = 'Min'");
- DataRow[] dtRow3 = dt.Select("OpenSingle = '" + StrKeys.Trim() + "' And OrdType = '3' And MinVice = 'Min'");
- DataRow[] dtRow4 = dt.Select("OpenSingle = '" + StrKeys.Trim() + "' And OrdType = '4' And MinVice = 'Min'");
- decimal SeriesPrice = 0;
- decimal SeriesPrice1 = 0;
- decimal SeriesPrice2 = 0;
- decimal SeriesPrice3 = 0;
- decimal SeriesPrice4 = 0;
- for (int j = 0; j < dtRow.Length; j++)
- { SeriesPrice += Convert.ToDecimal(dtRow[j]["SeriesPrice"]); }
- for (int j = 0; j < dtRow1.Length; j++)
- { SeriesPrice1 += Convert.ToDecimal(dtRow1[j]["SeriesPrice"]); }
- for (int j = 0; j < dtRow2.Length; j++)
- { SeriesPrice2 += Convert.ToDecimal(dtRow2[j]["SeriesPrice"]); }
- for (int j = 0; j < dtRow3.Length; j++)
- { SeriesPrice3 += Convert.ToDecimal(dtRow3[j]["SeriesPrice"]); }
- for (int j = 0; j < dtRow4.Length; j++)
- { SeriesPrice4 += Convert.ToDecimal(dtRow4[j]["SeriesPrice"]); }
- string StrOrdering = "0:" + dtRow.Length + ":" + SeriesPrice;
- StrOrdering += "/1:" + dtRow1.Length + ":" + SeriesPrice1;
- StrOrdering += "/2:" + dtRow2.Length + ":" + SeriesPrice2;
- StrOrdering += "/3:" + dtRow3.Length + ":" + SeriesPrice3;
- StrOrdering += "/4:" + dtRow4.Length + ":" + SeriesPrice4;
- if (htData.ContainsKey(StrKeys))
- {
- string[] StrValue = htData[StrKeys].ToString().Trim().Split('|');
- decimal decPaymentAmount = Convert.ToDecimal(dt.Rows[i]["PaymentAmount"]) + Convert.ToDecimal(StrValue[0].Trim());
- //decimal decSeriesPrice = Convert.ToDecimal(dt.Rows[i]["SeriesPrice"]) + Convert.ToDecimal(StrValue[1].Trim());
- htData[StrKeys] = decPaymentAmount.ToString().Trim() + "|" + StrOrdering;
- //htData[StrKeys] = decPaymentAmount.ToString().Trim() + "|" + decSeriesPrice.ToString().Trim() + "|" + dtRow.Length.ToString().Trim();
- }
- else
- { htData[StrKeys] = dt.Rows[i]["PaymentAmount"].ToString().Trim() + "|" + StrOrdering; }
- }
- DataTable NewTable = new DataTable();
- NewTable.Columns.Add("OpenSingle", typeof(string));
- NewTable.Columns.Add("PaymentAmount", typeof(decimal));
- NewTable.Columns.Add("SeriesPrice", typeof(decimal));
- NewTable.Columns.Add("Quantity", typeof(int));
- NewTable.Columns.Add("AveragePrice", typeof(string));
- NewTable.Columns.Add("SeriesPrice1", typeof(decimal));
- NewTable.Columns.Add("Quantity1", typeof(int));
- NewTable.Columns.Add("AveragePrice1", typeof(string));
- NewTable.Columns.Add("SeriesPrice2", typeof(decimal));
- NewTable.Columns.Add("Quantity2", typeof(int));
- NewTable.Columns.Add("AveragePrice2", typeof(string));
- NewTable.Columns.Add("SeriesPrice3", typeof(decimal));
- NewTable.Columns.Add("Quantity3", typeof(int));
- NewTable.Columns.Add("AveragePrice3", typeof(string));
- NewTable.Columns.Add("SeriesPrice4", typeof(decimal));
- NewTable.Columns.Add("Quantity4", typeof(int));
- NewTable.Columns.Add("AveragePrice4", typeof(string));
- switch (LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- {
- case LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.婚纱版:
- NewTable.Columns.Remove("SeriesPrice1");
- NewTable.Columns.Remove("Quantity1");
- NewTable.Columns.Remove("AveragePrice1");
- break;
- case LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.儿童版:
- NewTable.Columns.Remove("SeriesPrice");
- NewTable.Columns.Remove("Quantity");
- NewTable.Columns.Remove("AveragePrice");
- break;
- default:
- break;
- }
- if (!LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.IsEnablePhotoEdition)
- {
- NewTable.Columns.Remove("SeriesPrice2");
- NewTable.Columns.Remove("Quantity2");
- NewTable.Columns.Remove("AveragePrice2");
- }
- foreach (DictionaryEntry item in htData)
- {
- string StrKey = item.Key.ToString().Trim();
- string[] StrArrayValue = item.Value.ToString().Trim().Split('|');
- DataRow newRow = NewTable.NewRow();
- newRow["OpenSingle"] = StrKey.Trim();
- newRow["PaymentAmount"] = Convert.ToDecimal(StrArrayValue[0].Trim());
- string[] StrArrayType = StrArrayValue[1].Trim().Split('/');
- for (int i = 0; i < StrArrayType.Length; i++)
- {
- string[] StrArray = StrArrayType[i].Trim().Split(':');
- switch (StrArray[0].Trim())
- {
- case "0":
- if (NewTable.Columns.Contains("SeriesPrice"))
- {
- newRow["Quantity"] = StrArray[1].Trim();
- newRow["SeriesPrice"] = StrArray[2].Trim();
- newRow["AveragePrice"] = 0;
- if (Convert.ToDecimal(StrArray[1]) > 0)
- { newRow["AveragePrice"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((Convert.ToDecimal(StrArray[2]) / Convert.ToDecimal(StrArray[1])).ToString("0.00")); }
- }
- break;
- case "1":
- if (NewTable.Columns.Contains("SeriesPrice1"))
- {
- newRow["Quantity1"] = StrArray[1].Trim();
- newRow["SeriesPrice1"] = StrArray[2].Trim();
- newRow["AveragePrice1"] = 0;
- if (Convert.ToDecimal(StrArray[1]) > 0)
- { newRow["AveragePrice1"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((Convert.ToDecimal(StrArray[2]) / Convert.ToDecimal(StrArray[1])).ToString("0.00")); }
- }
- break;
- case "2":
- if (NewTable.Columns.Contains("SeriesPrice2"))
- {
- newRow["Quantity2"] = StrArray[1].Trim();
- newRow["SeriesPrice2"] = StrArray[2].Trim();
- newRow["AveragePrice2"] = 0;
- if (Convert.ToDecimal(StrArray[1]) > 0)
- { newRow["AveragePrice2"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((Convert.ToDecimal(StrArray[2]) / Convert.ToDecimal(StrArray[1])).ToString("0.00")); }
- }
- break;
- case "3":
- if (NewTable.Columns.Contains("SeriesPrice3"))
- {
- newRow["Quantity3"] = StrArray[1].Trim();
- newRow["SeriesPrice3"] = StrArray[2].Trim();
- newRow["AveragePrice3"] = 0;
- if (Convert.ToDecimal(StrArray[1]) > 0)
- { newRow["AveragePrice3"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((Convert.ToDecimal(StrArray[2]) / Convert.ToDecimal(StrArray[1])).ToString("0.00")); }
- }
- break;
- case "4":
- if (NewTable.Columns.Contains("SeriesPrice4"))
- {
- newRow["Quantity4"] = StrArray[1].Trim();
- newRow["SeriesPrice4"] = StrArray[2].Trim();
- newRow["AveragePrice4"] = 0;
- if (Convert.ToDecimal(StrArray[1]) > 0)
- { newRow["AveragePrice4"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((Convert.ToDecimal(StrArray[2]) / Convert.ToDecimal(StrArray[1])).ToString("0.00")); }
- }
- break;
- }
- }
- NewTable.Rows.Add(newRow);
- }
- return NewTable;
- }
- /// <summary>
- /// 获取参与活动的所有小组人员的数据
- /// </summary>
- /// <returns></returns>
- DataTable TeamPersonRankedDataTable(DataTable dtTeamPerson, DataTable dtOpenSingle)
- {
- DataTable NewTable = new DataTable();
- NewTable.Columns.Add("大队编号", typeof(string));
- NewTable.Columns.Add("小组编号", typeof(string));
- NewTable.Columns.Add("大队名称", typeof(string));
- NewTable.Columns.Add("小组名称", typeof(string));
- NewTable.Columns.Add("员工姓名", typeof(string));
- NewTable.Columns.Add("完成任务", typeof(decimal));
- NewTable.Columns.Add("保底任务", typeof(string));
- NewTable.Columns.Add("保底完成情况", typeof(string));
- NewTable.Columns.Add("目标任务", typeof(string));
- NewTable.Columns.Add("目标完成情况", typeof(string));
- NewTable.Columns.Add("冲刺任务", typeof(string));
- NewTable.Columns.Add("冲刺完成情况", typeof(string));
- if (dtOpenSingle.Columns.Contains("SeriesPrice"))
- {
- NewTable.Columns.Add("婚纱单数", typeof(string));
- NewTable.Columns.Add("婚纱业绩", typeof(string));
- NewTable.Columns.Add("婚纱均价", typeof(string));
- }
- if (dtOpenSingle.Columns.Contains("SeriesPrice1"))
- {
- NewTable.Columns.Add("儿童单数", typeof(string));
- NewTable.Columns.Add("儿童业绩", typeof(string));
- NewTable.Columns.Add("儿童均价", typeof(string));
- }
- if (dtOpenSingle.Columns.Contains("SeriesPrice2"))
- {
- NewTable.Columns.Add("写真单数", typeof(string));
- NewTable.Columns.Add("写真业绩", typeof(string));
- NewTable.Columns.Add("写真均价", typeof(string));
- }
- if (dtOpenSingle.Columns.Contains("SeriesPrice3"))
- {
- NewTable.Columns.Add("服务单数", typeof(string));
- NewTable.Columns.Add("服务业绩", typeof(string));
- NewTable.Columns.Add("服务均价", typeof(string));
- }
- if (dtOpenSingle.Columns.Contains("SeriesPrice4"))
- {
- NewTable.Columns.Add("婚庆单数", typeof(string));
- NewTable.Columns.Add("婚庆业绩", typeof(string));
- NewTable.Columns.Add("婚庆均价", typeof(string));
- }
- for (int i = 0; i < dtTeamPerson.Rows.Count; i++)
- {
- DataRow[] dtRow = dtOpenSingle.Select("OpenSingle = '" + dtTeamPerson.Rows[i]["Tps_UserNumber"].ToString().Trim() + "'");
- decimal decCompletedTask = 0;
- if (dtRow.Length > 0)
- { decCompletedTask = Convert.ToDecimal(dtRow[0]["PaymentAmount"]); }
- DataRow newRow = NewTable.NewRow();
- newRow["大队编号"] = dtTeamPerson.Rows[i]["Tps_TmxtNumber"].ToString().Trim();
- newRow["小组编号"] = dtTeamPerson.Rows[i]["Tps_TmitNumber"].ToString().Trim();
- newRow["大队名称"] = dtTeamPerson.Rows[i]["Tmxn_Name"].ToString().Trim();
- newRow["小组名称"] = dtTeamPerson.Rows[i]["Tmin_Name"].ToString().Trim();
- newRow["员工姓名"] = dtTeamPerson.Rows[i]["User_Name"].ToString().Trim();
- newRow["完成任务"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(decCompletedTask);
- newRow["保底任务"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtTeamPerson.Rows[i]["Tps_BaodiTask"]);
- newRow["保底完成情况"] = 0;
- if (Convert.ToDecimal(dtTeamPerson.Rows[i]["Tps_BaodiTask"]) > 0)
- { newRow["保底完成情况"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompletedTask / Convert.ToDecimal(dtTeamPerson.Rows[i]["Tps_BaodiTask"]) * 100).ToString("0.00")); }
- newRow["目标任务"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtTeamPerson.Rows[i]["Tps_TargetTask"]);
- newRow["目标完成情况"] = 0;
- if (Convert.ToDecimal(dtTeamPerson.Rows[i]["Tps_TargetTask"]) > 0)
- { newRow["目标完成情况"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompletedTask / Convert.ToDecimal(dtTeamPerson.Rows[i]["Tps_TargetTask"]) * 100).ToString("0.00")); }
- newRow["冲刺任务"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtTeamPerson.Rows[i]["Tps_SprintTask"]);
- newRow["冲刺完成情况"] = 0;
- if (Convert.ToDecimal(dtTeamPerson.Rows[i]["Tps_SprintTask"]) > 0)
- { newRow["冲刺完成情况"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompletedTask / Convert.ToDecimal(dtTeamPerson.Rows[i]["Tps_SprintTask"]) * 100).ToString("0.00")); }
- if (NewTable.Columns.Contains("婚纱单数"))
- {
- newRow["婚纱单数"] = "0";
- newRow["婚纱业绩"] = "0";
- newRow["婚纱均价"] = "0";
- if (dtOpenSingle.Columns.Contains("SeriesPrice") && dtRow.Length > 0)
- {
- newRow["婚纱单数"] = dtRow[0]["Quantity"].ToString().Trim();
- newRow["婚纱业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtRow[0]["SeriesPrice"]);
- newRow["婚纱均价"] = dtRow[0]["AveragePrice"].ToString().Trim();
- }
- }
- if (NewTable.Columns.Contains("儿童单数"))
- {
- newRow["儿童单数"] = "0";
- newRow["儿童业绩"] = "0";
- newRow["儿童均价"] = "0";
- if (dtOpenSingle.Columns.Contains("SeriesPrice1") && dtRow.Length > 0)
- {
- newRow["儿童单数"] = dtRow[0]["Quantity1"].ToString().Trim();
- newRow["儿童业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtRow[0]["SeriesPrice1"]);
- newRow["儿童均价"] = dtRow[0]["AveragePrice1"].ToString().Trim();
- }
- }
- if (NewTable.Columns.Contains("写真单数"))
- {
- newRow["写真单数"] = "0";
- newRow["写真业绩"] = "0";
- newRow["写真均价"] = "0";
- if (dtOpenSingle.Columns.Contains("SeriesPrice2") && dtRow.Length > 0)
- {
- newRow["写真单数"] = dtRow[0]["Quantity2"].ToString().Trim();
- newRow["写真业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtRow[0]["SeriesPrice2"]);
- newRow["写真均价"] = dtRow[0]["AveragePrice2"].ToString().Trim();
- }
- }
- if (NewTable.Columns.Contains("服务单数"))
- {
- newRow["服务单数"] = "0";
- newRow["服务业绩"] = "0";
- newRow["服务均价"] = "0";
- if (dtOpenSingle.Columns.Contains("SeriesPrice3") && dtRow.Length > 0)
- {
- newRow["服务单数"] = dtRow[0]["Quantity3"].ToString().Trim();
- newRow["服务业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtRow[0]["SeriesPrice3"]);
- newRow["服务均价"] = dtRow[0]["AveragePrice3"].ToString().Trim();
- }
- }
- if (NewTable.Columns.Contains("婚庆单数"))
- {
- newRow["婚庆单数"] = "0";
- newRow["婚庆业绩"] = "0";
- newRow["婚庆均价"] = "0";
- if (dtOpenSingle.Columns.Contains("SeriesPrice4") && dtRow.Length > 0)
- {
- newRow["婚庆单数"] = dtRow[0]["Quantity4"].ToString().Trim();
- newRow["婚庆业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtRow[0]["SeriesPrice4"]);
- newRow["婚庆均价"] = dtRow[0]["AveragePrice4"].ToString().Trim();
- }
- }
- NewTable.Rows.Add(newRow);
- }
- return NewTable;
- }
- /// <summary>
- /// 获取大队的完成任务数据
- /// </summary>
- /// <param name="dtTeamMax"></param>
- /// <param name="dtTeamPerson"></param>
- /// <returns></returns>
- DataTable GetTeamMaxGroupBy(DataTable dtTeamMax, DataTable dtTeamPerson)
- {
- DataTable NewTable = new DataTable();
- NewTable.Columns.Add("活动编号", typeof(string));
- NewTable.Columns.Add("大队编号", typeof(string));
- NewTable.Columns.Add("大队名称", typeof(string));
- NewTable.Columns.Add("小组名称", typeof(string));
- NewTable.Columns.Add("员工姓名", typeof(string));
- NewTable.Columns.Add("完成任务", typeof(decimal));
- NewTable.Columns.Add("保底任务", typeof(string));
- NewTable.Columns.Add("保底完成情况", typeof(string));
- NewTable.Columns.Add("目标任务", typeof(string));
- NewTable.Columns.Add("目标完成情况", typeof(string));
- NewTable.Columns.Add("冲刺任务", typeof(string));
- NewTable.Columns.Add("冲刺完成情况", typeof(string));
- if (dtTeamPerson.Columns.Contains("婚纱单数"))
- {
- NewTable.Columns.Add("婚纱单数", typeof(string));
- NewTable.Columns.Add("婚纱业绩", typeof(string));
- NewTable.Columns.Add("婚纱均价", typeof(string));
- }
- if (dtTeamPerson.Columns.Contains("儿童单数"))
- {
- NewTable.Columns.Add("儿童单数", typeof(string));
- NewTable.Columns.Add("儿童业绩", typeof(string));
- NewTable.Columns.Add("儿童均价", typeof(string));
- }
- if (dtTeamPerson.Columns.Contains("写真单数"))
- {
- NewTable.Columns.Add("写真单数", typeof(string));
- NewTable.Columns.Add("写真业绩", typeof(string));
- NewTable.Columns.Add("写真均价", typeof(string));
- }
- if (dtTeamPerson.Columns.Contains("服务单数"))
- {
- NewTable.Columns.Add("服务单数", typeof(string));
- NewTable.Columns.Add("服务业绩", typeof(string));
- NewTable.Columns.Add("服务均价", typeof(string));
- }
- if (dtTeamPerson.Columns.Contains("婚庆单数"))
- {
- NewTable.Columns.Add("婚庆单数", typeof(string));
- NewTable.Columns.Add("婚庆业绩", typeof(string));
- NewTable.Columns.Add("婚庆均价", typeof(string));
- }
- for (int i = 0; i < dtTeamMax.Rows.Count; i++)
- {
- decimal decCompletedTask = 0;
- int decCompleteWeddingQuantity = 0;
- decimal decCompleteWeddingAmount = 0;
- int CompleteChildrenQuantity = 0;
- decimal CompleteChildrenAmount = 0;
- int CompletePortraitQuantity = 0;
- decimal CompletePortraitAmount = 0;
- int CompleteServiceQuantity = 0;
- decimal CompleteServiceAmount = 0;
- int CompleteWeddingCelebrationQuantity = 0;
- decimal CompleteWeddingCelebrationAmount = 0;
- DataRow[] dtRowTeamPerson = dtTeamPerson.Select("大队编号 = '" + dtTeamMax.Rows[i]["Tmxt_Number"].ToString().Trim() + "'");
- for (int j = 0; j < dtRowTeamPerson.Length; j++)
- {
- decCompletedTask += Convert.ToDecimal(dtRowTeamPerson[j]["完成任务"]);
- if (NewTable.Columns.Contains("婚纱单数"))
- {
- decCompleteWeddingQuantity += Convert.ToInt32(dtRowTeamPerson[j]["婚纱单数"]);
- decCompleteWeddingAmount += Convert.ToDecimal(dtRowTeamPerson[j]["婚纱业绩"]);
- }
- if (NewTable.Columns.Contains("儿童单数"))
- {
- CompleteChildrenQuantity += Convert.ToInt32(dtRowTeamPerson[j]["儿童单数"]);
- CompleteChildrenAmount += Convert.ToDecimal(dtRowTeamPerson[j]["儿童业绩"]);
- }
- if (NewTable.Columns.Contains("写真单数"))
- {
- CompletePortraitQuantity += Convert.ToInt32(dtRowTeamPerson[j]["写真单数"]);
- CompletePortraitAmount += Convert.ToDecimal(dtRowTeamPerson[j]["写真业绩"]);
- }
- if (NewTable.Columns.Contains("服务单数"))
- {
- CompleteServiceQuantity += Convert.ToInt32(dtRowTeamPerson[j]["服务单数"]);
- CompleteServiceAmount += Convert.ToDecimal(dtRowTeamPerson[j]["服务业绩"]);
- }
- if (NewTable.Columns.Contains("婚庆单数"))
- {
- CompleteWeddingCelebrationQuantity += Convert.ToInt32(dtRowTeamPerson[j]["婚庆单数"]);
- CompleteWeddingCelebrationAmount += Convert.ToDecimal(dtRowTeamPerson[j]["婚庆业绩"]);
- }
- }
- DataRow newRow = NewTable.NewRow();
- newRow["活动编号"] = dtTeamMax.Rows[i]["Tmxt_TasNumber"].ToString().Trim();
- newRow["大队编号"] = dtTeamMax.Rows[i]["Tmxt_Number"].ToString().Trim();
- newRow["大队名称"] = dtTeamMax.Rows[i]["Tmxn_Name"].ToString().Trim();
- newRow["小组名称"] = "";
- newRow["员工姓名"] = "";
- newRow["完成任务"] = decCompletedTask;
- newRow["保底任务"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtTeamMax.Rows[i]["Tmxt_BaodiTask"].ToString().Trim());
- newRow["保底完成情况"] = 0;
- if (Convert.ToDecimal(dtTeamMax.Rows[i]["Tmxt_BaodiTask"]) > 0)
- { newRow["保底完成情况"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompletedTask / Convert.ToDecimal(dtTeamMax.Rows[i]["Tmxt_BaodiTask"]) * 100).ToString("0.00")); }
- newRow["目标任务"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtTeamMax.Rows[i]["Tmxt_TargetTask"].ToString().Trim());
- newRow["目标完成情况"] = 0;
- if (Convert.ToDecimal(dtTeamMax.Rows[i]["Tmxt_TargetTask"]) > 0)
- { newRow["目标完成情况"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompletedTask / Convert.ToDecimal(dtTeamMax.Rows[i]["Tmxt_TargetTask"]) * 100).ToString("0.00")); }
- newRow["冲刺任务"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtTeamMax.Rows[i]["Tmxt_SprintTask"].ToString().Trim());
- newRow["冲刺完成情况"] = 0;
- if (Convert.ToDecimal(dtTeamMax.Rows[i]["Tmxt_SprintTask"]) > 0)
- { newRow["冲刺完成情况"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompletedTask / Convert.ToDecimal(dtTeamMax.Rows[i]["Tmxt_SprintTask"]) * 100).ToString("0.00")); }
- if (NewTable.Columns.Contains("婚纱单数"))
- {
- newRow["婚纱单数"] = decCompleteWeddingQuantity;
- newRow["婚纱业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(decCompleteWeddingAmount);
- newRow["婚纱均价"] = 0;
- if (decCompleteWeddingQuantity > 0)
- { newRow["婚纱均价"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompleteWeddingAmount / decCompleteWeddingQuantity).ToString("0.00")); }
- }
- if (NewTable.Columns.Contains("儿童单数"))
- {
- newRow["儿童单数"] = CompleteChildrenQuantity;
- newRow["儿童业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(CompleteChildrenAmount);
- newRow["儿童均价"] = 0;
- if (CompleteChildrenQuantity > 0)
- { newRow["儿童均价"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((CompleteChildrenAmount / CompleteChildrenQuantity).ToString("0.00")); }
- }
- if (NewTable.Columns.Contains("写真单数"))
- {
- newRow["写真单数"] = CompletePortraitQuantity;
- newRow["写真业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(CompletePortraitAmount);
- newRow["写真均价"] = 0;
- if (CompletePortraitQuantity > 0)
- { newRow["写真均价"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((CompletePortraitAmount / CompletePortraitQuantity).ToString("0.00")); }
- }
- if (NewTable.Columns.Contains("服务单数"))
- {
- newRow["服务单数"] = CompleteServiceQuantity;
- newRow["服务业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(CompleteServiceAmount);
- newRow["服务均价"] = 0;
- if (CompleteServiceQuantity > 0)
- { newRow["服务均价"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((CompleteServiceAmount / CompleteServiceQuantity).ToString("0.00")); }
- }
- if (NewTable.Columns.Contains("婚庆单数"))
- {
- newRow["婚庆单数"] = CompleteWeddingCelebrationQuantity;
- newRow["婚庆业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(CompleteWeddingCelebrationAmount);
- newRow["婚庆均价"] = 0;
- if (CompleteWeddingCelebrationQuantity > 0)
- { newRow["婚庆均价"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((CompleteWeddingCelebrationAmount / CompleteWeddingCelebrationQuantity).ToString("0.00")); }
- }
- NewTable.Rows.Add(newRow);
- }
- return NewTable;
- }
- /// <summary>
- /// 获取小组队的完成任务数据
- /// </summary>
- /// <param name="dtTeamMin"></param>
- /// <param name="dtTeamPerson"></param>
- DataTable GetTeamMinGroupBy(DataTable dtTeamMin, DataTable dtTeamPerson)
- {
- DataTable NewTable = new DataTable();
- NewTable.Columns.Add("大队编号", typeof(string));
- NewTable.Columns.Add("小组编号", typeof(string));
- NewTable.Columns.Add("大队名称", typeof(string));
- NewTable.Columns.Add("小组名称", typeof(string));
- NewTable.Columns.Add("员工姓名", typeof(string));
- NewTable.Columns.Add("完成任务", typeof(decimal));
- NewTable.Columns.Add("保底任务", typeof(string));
- NewTable.Columns.Add("保底完成情况", typeof(string));
- NewTable.Columns.Add("目标任务", typeof(string));
- NewTable.Columns.Add("目标完成情况", typeof(string));
- NewTable.Columns.Add("冲刺任务", typeof(string));
- NewTable.Columns.Add("冲刺完成情况", typeof(string));
- if (dtTeamPerson.Columns.Contains("婚纱单数"))
- {
- NewTable.Columns.Add("婚纱单数", typeof(string));
- NewTable.Columns.Add("婚纱业绩", typeof(string));
- NewTable.Columns.Add("婚纱均价", typeof(string));
- }
- if (dtTeamPerson.Columns.Contains("儿童单数"))
- {
- NewTable.Columns.Add("儿童单数", typeof(string));
- NewTable.Columns.Add("儿童业绩", typeof(string));
- NewTable.Columns.Add("儿童均价", typeof(string));
- }
- if (dtTeamPerson.Columns.Contains("写真单数"))
- {
- NewTable.Columns.Add("写真单数", typeof(string));
- NewTable.Columns.Add("写真业绩", typeof(string));
- NewTable.Columns.Add("写真均价", typeof(string));
- }
- if (dtTeamPerson.Columns.Contains("服务单数"))
- {
- NewTable.Columns.Add("服务单数", typeof(string));
- NewTable.Columns.Add("服务业绩", typeof(string));
- NewTable.Columns.Add("服务均价", typeof(string));
- }
- if (dtTeamPerson.Columns.Contains("婚庆单数"))
- {
- NewTable.Columns.Add("婚庆单数", typeof(string));
- NewTable.Columns.Add("婚庆业绩", typeof(string));
- NewTable.Columns.Add("婚庆均价", typeof(string));
- }
- for (int i = 0; i < dtTeamMin.Rows.Count; i++)
- {
- decimal decCompletedTask = 0;
- int decCompleteWeddingQuantity = 0;
- decimal decCompleteWeddingAmount = 0;
- int CompleteChildrenQuantity = 0;
- decimal CompleteChildrenAmount = 0;
- int CompletePortraitQuantity = 0;
- decimal CompletePortraitAmount = 0;
- int CompleteServiceQuantity = 0;
- decimal CompleteServiceAmount = 0;
- int CompleteWeddingCelebrationQuantity = 0;
- decimal CompleteWeddingCelebrationAmount = 0;
- DataRow[] dtRowTeamPerson = dtTeamPerson.Select("小组编号 = '" + dtTeamMin.Rows[i]["Tmit_Number"].ToString().Trim() + "'");
- for (int j = 0; j < dtRowTeamPerson.Length; j++)
- {
- decCompletedTask += Convert.ToDecimal(dtRowTeamPerson[j]["完成任务"]);
- if (NewTable.Columns.Contains("婚纱单数"))
- {
- decCompleteWeddingQuantity += Convert.ToInt32(dtRowTeamPerson[j]["婚纱单数"]);
- decCompleteWeddingAmount += Convert.ToDecimal(dtRowTeamPerson[j]["婚纱业绩"]);
- }
- if (NewTable.Columns.Contains("儿童单数"))
- {
- CompleteChildrenQuantity += Convert.ToInt32(dtRowTeamPerson[j]["儿童单数"]);
- CompleteChildrenAmount += Convert.ToDecimal(dtRowTeamPerson[j]["儿童业绩"]);
- }
- if (NewTable.Columns.Contains("写真单数"))
- {
- CompletePortraitQuantity += Convert.ToInt32(dtRowTeamPerson[j]["写真单数"]);
- CompletePortraitAmount += Convert.ToDecimal(dtRowTeamPerson[j]["写真业绩"]);
- }
- if (NewTable.Columns.Contains("服务单数"))
- {
- CompleteServiceQuantity += Convert.ToInt32(dtRowTeamPerson[j]["服务单数"]);
- CompleteServiceAmount += Convert.ToDecimal(dtRowTeamPerson[j]["服务业绩"]);
- }
- if (NewTable.Columns.Contains("婚庆单数"))
- {
- CompleteWeddingCelebrationQuantity += Convert.ToInt32(dtRowTeamPerson[j]["婚庆单数"]);
- CompleteWeddingCelebrationAmount += Convert.ToDecimal(dtRowTeamPerson[j]["婚庆业绩"]);
- }
- }
- DataRow newRow = NewTable.NewRow();
- newRow["大队编号"] = dtTeamMin.Rows[i]["Tmit_TmxtNumber"].ToString().Trim();
- newRow["小组编号"] = dtTeamMin.Rows[i]["Tmit_Number"].ToString().Trim();
- newRow["大队名称"] = "";
- newRow["小组名称"] = dtTeamMin.Rows[i]["Tmin_Name"].ToString().Trim();
- newRow["员工姓名"] = "";
- newRow["完成任务"] = decCompletedTask;
- newRow["保底任务"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtTeamMin.Rows[i]["Tmit_BaodiTask"].ToString().Trim());
- newRow["保底完成情况"] = 0;
- if (Convert.ToDecimal(dtTeamMin.Rows[i]["Tmit_BaodiTask"]) > 0)
- { newRow["保底完成情况"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompletedTask / Convert.ToDecimal(dtTeamMin.Rows[i]["Tmit_BaodiTask"]) * 100).ToString("0.00")); }
- newRow["目标任务"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtTeamMin.Rows[i]["Tmit_TargetTask"].ToString().Trim());
- newRow["目标完成情况"] = 0;
- if (Convert.ToDecimal(dtTeamMin.Rows[i]["Tmit_TargetTask"]) > 0)
- { newRow["目标完成情况"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompletedTask / Convert.ToDecimal(dtTeamMin.Rows[i]["Tmit_TargetTask"]) * 100).ToString("0.00")); }
- newRow["冲刺任务"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(dtTeamMin.Rows[i]["Tmit_SprintTask"].ToString().Trim());
- newRow["冲刺完成情况"] = 0;
- if (Convert.ToDecimal(dtTeamMin.Rows[i]["Tmit_SprintTask"]) > 0)
- { newRow["冲刺完成情况"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompletedTask / Convert.ToDecimal(dtTeamMin.Rows[i]["Tmit_SprintTask"]) * 100).ToString("0.00")); }
- if (NewTable.Columns.Contains("婚纱单数"))
- {
- newRow["婚纱单数"] = decCompleteWeddingQuantity;
- newRow["婚纱业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(decCompleteWeddingAmount);
- newRow["婚纱均价"] = 0;
- if (decCompleteWeddingQuantity > 0)
- { newRow["婚纱均价"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((decCompleteWeddingAmount / decCompleteWeddingQuantity).ToString("0.00")); }
- }
- if (NewTable.Columns.Contains("儿童单数"))
- {
- newRow["儿童单数"] = CompleteChildrenQuantity;
- newRow["儿童业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(CompleteChildrenAmount);
- newRow["儿童均价"] = 0;
- if (CompleteChildrenQuantity > 0)
- { newRow["儿童均价"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((CompleteChildrenAmount / CompleteChildrenQuantity).ToString("0.00")); }
- }
- if (NewTable.Columns.Contains("写真单数"))
- {
- newRow["写真单数"] = CompletePortraitQuantity;
- newRow["写真业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(CompletePortraitAmount);
- newRow["写真均价"] = 0;
- if (CompletePortraitQuantity > 0)
- { newRow["写真均价"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((CompletePortraitAmount / CompletePortraitQuantity).ToString("0.00")); }
- }
- if (NewTable.Columns.Contains("服务单数"))
- {
- newRow["服务单数"] = CompleteServiceQuantity;
- newRow["服务业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(CompleteServiceAmount);
- newRow["服务均价"] = 0;
- if (CompleteServiceQuantity > 0)
- { newRow["服务均价"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((CompleteServiceAmount / CompleteServiceQuantity).ToString("0.00")); }
- }
- if (NewTable.Columns.Contains("婚庆单数"))
- {
- newRow["婚庆单数"] = CompleteWeddingCelebrationQuantity;
- newRow["婚庆业绩"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero(CompleteWeddingCelebrationAmount);
- newRow["婚庆均价"] = 0;
- if (CompleteWeddingCelebrationQuantity > 0)
- { newRow["婚庆均价"] = LYFZ.BLL.OtherCommonModel.RemoveLastExcessZero((CompleteWeddingCelebrationAmount / CompleteWeddingCelebrationQuantity).ToString("0.00")); }
- }
- NewTable.Rows.Add(newRow);
- }
- return NewTable;
- }
- }
- }
|