1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963 |
- 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.CameraControlBook
- {
- public partial class MyWorkRemindFormMain : LYFZ.Software.UI.CameraControlBook.MyWorkRemindFormMain
- {
- LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
- string dataType = "";
- public MyWorkRemindFormMain()
- {
- this.Shown += MyWorkRemindFormMain_Shown;
- this.Load += MyWorkRemindFormMain_Load;
- this.numYear.KeyDown += numYear_KeyDown;
- this.numMonth.KeyDown += numMonth_KeyDown;
- this.numDay.KeyDown += numDay_KeyDown;
- this.numYear.ValueChanged += numYear_ValueChanged;
- this.numMonth.ValueChanged += numMonth_ValueChanged;
- this.numDay.ValueChanged += numDay_ValueChanged;
- this.chkCompletedOK.Click += chkCompletedOK_Click;
- this.chkCompletedNot.Click += chkCompletedNot_Click;
- this.chkCompletedTimeOut.Click += chkCompletedTimeOut_Click;
- this.panelDay.Click += panelDay_Click;
- this.lbl_Clothing.Click += lbl_Clothing_Click;
- this.lbl_Photography.Click += lbl_Photograph_Click;
- this.lbl_PhotographyAssistant.Click += lbl_Photograph_Click;
- this.lbl_Makeup.Click += lbl_Photograph_Click;
- this.lbl_MakeupAssistant.Click += lbl_Photograph_Click;
- this.lbl_BootDivision.Click += lbl_Photograph_Click;
- this.lbl_BootDivisionAssistant.Click += lbl_Photograph_Click;
- this.lbl_EarlyRepair.Click += lbl_EarlyRepair_Click;
- this.lbl_FilmSelection.Click += lbl_FilmSelection_Click;
- this.lbl_RefinedRepair.Click += lbl_RefinedRepair_Click;
- this.lbl_Design.Click += lbl_Design_Click;
- this.lbl_LookDesign.Click += lbl_BootDivision_Click;
- this.lbl_SendPhoto.Click += lbl_BootDivision_Click;//lbl_SendPhoto_Click ;
- this.lbl_Pickup.Click += lbl_BootDivision_Click;
- this.lbl_Service.Click += lbl_BootDivision_Click;
- this.lbl_ClientServiceTask.Click += lbl_ClientServiceTask_Click;
- this.lbl_TodayTrack.Click += lbl_TodayTrack_Click;
- this.lbl_MemorialDay.Click += lbl_Birthday_Click;
- this.lbl_Marriage.Click += lbl_Birthday_Click;
- this.lbl_HundredDay.Click += lbl_Birthday_Click;
- this.lbl_FullMoon.Click += lbl_Birthday_Click;
- this.lbl_Birthday.Click += lbl_Birthday_Click;
- this.dgvData.CellDoubleClick += dgvData_CellDoubleClick;
- //this.dgvData2.CellDoubleClick += dgvData2_CellDoubleClick;
- this.dgvData3.CellMouseDoubleClick += dgvData3_CellMouseDoubleClick;
- this.chkAllUserWork.Click += chkAllUserWork_Click;
- this.FormClosed += MyWorkRemindFormMain_FormClosed;
- this.tabControlEx1.SelectedIndexChanged += tabControlEx1_SelectedIndexChanged;
- this.lblMyTaskCount.Click += lblMyTaskCount_Click;
- this.dgvData.BindFilterColumnDataEvent += dgvData_DataBindingComplete;
- }
- private void lbl_SendPhoto_Click(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.frmDigitalArrangement digitalForm = new DoorCityProcess.frmDigitalArrangement();
- digitalForm.labSendData.Checked = true;
- digitalForm.cbxMyJob.Checked = true;
- digitalForm.BindPostionSize();
- digitalForm.Show();
- this.Close();
- }
- void dgvData_DataBindingComplete()
- {
- //throw new NotImplementedException();
- if (dataType == "设计" || dataType == "精修" || dataType == "选片" || dataType == "选衣" || dataType == "初修")
- {
- string keyNumber = "";
- foreach (DataGridViewRow tempDgvr in dgvData.Rows)
- {
- if (keyNumber != tempDgvr.Cells["订单编号"].Value.ToString())
- {
- keyNumber = tempDgvr.Cells["订单编号"].Value.ToString();
- }
- else
- {
- tempDgvr.Cells["订单编号"].Value = "";
- tempDgvr.Cells["客户名称"].Value = "";
- tempDgvr.Cells["客户电话"].Value = "";
- tempDgvr.Cells["套系名称"].Value = "";
- tempDgvr.Cells["套系价格"].Value = "";
- }
- }
- }
- }
- private void lbl_Design_Click(object sender, EventArgs e)
- {
- //LYFZ.Software.MainBusiness.DoorCityProcess.frmDigitalArrangement digitalForm = new DoorCityProcess.frmDigitalArrangement();
- //digitalForm.labDesign.Checked = true;
- //digitalForm.cbxMyJob.Checked = true;
- //digitalForm.BindPostionSize();
- //digitalForm.Show();
- //this.Close();
- if (this.panelDay.Tag != null)
- {
- this.dgvData.Tag = null;
- this.dgvData.Rows.Clear();
- this.dgvData.Columns.Clear();
- //BindDataTableColumData();
- //this.dgvData2.Rows.Clear();
- LYFZ.ComponentLibrary.LabelEx lbl = (LYFZ.ComponentLibrary.LabelEx)sender;
- string[] StrArray = lbl.Name.Trim().Split('_');
- Dictionary<string, DataTable> dictData = (Dictionary<string, DataTable>)this.panelDay.Tag;
- //DataTable dtData = (DataTable)dictData["dtOrder"];
- string StrDataTime = Convert.ToDateTime(this.numYear.Value + "-" + this.numMonth.Value + "-" + this.numDay.Value).ToYYYY_MM_dd();
- DataTable dtData;
- if (dictData.ContainsKey("dtDesignOrder"))
- {
- dtData = (DataTable)dictData["dtDesignOrder"];
- }
- else
- {
- string StrWhere = "";
- StrWhere = " Ordv_DesignerStatus in ('0', '1') And Ordv_ReservationDesignerTime is not null ";
- dtData = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_DayDesignWorkData(StrWhere);
- dictData["dtDesignOrder"] = dtData;
- }
- string strWhere = "";
- if (!chkAllUserWork.Checked)
- {
- //GetPhotographyByWhereData(StrArray[1], ref strKey, ref strContent);
- strWhere = " 设计师编号 = '" + StrUserID + "' and 完成期限 >='" + StrDataTime + " 00:00:00' and 完成期限 <='" + StrDataTime + " 23:59:59' ";
- }
- ///字段数据
- foreach (DataColumn dtColum in dtData.Columns)
- {
- DataGridViewTextBoxColumn textBoxColum = new DataGridViewTextBoxColumn();
- textBoxColum.DataPropertyName = dtColum.ColumnName;
- textBoxColum.Name = dtColum.ColumnName;
- textBoxColum.HeaderText = dtColum.ColumnName;
- if (dtColum.ColumnName.Equals("设计师编号"))
- {
- textBoxColum.Visible = false;
- }
- if (dtColum.ColumnName.Equals("订单号"))
- {
- textBoxColum.Visible = false;
- }
- dgvData.Columns.Add(textBoxColum);
- }
- ///工作内容
- DataGridViewTextBoxColumn tempTextBoxColum = new DataGridViewTextBoxColumn();
- tempTextBoxColum.Name = "工作内容";
- tempTextBoxColum.DataPropertyName = "工作内容";
- tempTextBoxColum.HeaderText = "工作内容";
- tempTextBoxColum.Visible = false;
- dgvData.Columns.Add(tempTextBoxColum);
- DataRow[] dtRows = dtData.Select(strWhere);
- string keyNumber = "";
- foreach (DataRow dtRow in dtRows)
- {
- DataGridViewRow tempDgvr = this.BindClothDataListByRow(dtRow, "设计");
- if (keyNumber != dtRow["订单编号"].ToString())
- {
- keyNumber = dtRow["订单编号"].ToString();
- }
- else
- {
- tempDgvr.Cells["订单编号"].Value = "";
- tempDgvr.Cells["客户名称"].Value = "";
- tempDgvr.Cells["客户电话"].Value = "";
- tempDgvr.Cells["套系名称"].Value = "";
- tempDgvr.Cells["套系价格"].Value = "";
- }
-
- }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- this.tabControlSelectedIndex();
- }
- }
- private void lbl_RefinedRepair_Click(object sender, EventArgs e)
- {
- //LYFZ.Software.MainBusiness.DoorCityProcess.frmDigitalArrangement digitalForm = new DoorCityProcess.frmDigitalArrangement();
- //digitalForm.labRefineRepair.Checked = true;
- //digitalForm.cbxMyJob.Checked = true;
- //digitalForm.BindPostionSize();
- //digitalForm.Show();
- //this.Close();
- if (this.panelDay.Tag != null)
- {
- this.dgvData.Tag = null;
- this.dgvData.Rows.Clear();
- this.dgvData.Columns.Clear();
- //BindDataTableColumData();
- //this.dgvData2.Rows.Clear();
- LYFZ.ComponentLibrary.LabelEx lbl = (LYFZ.ComponentLibrary.LabelEx)sender;
- string[] StrArray = lbl.Name.Trim().Split('_');
- Dictionary<string, DataTable> dictData = (Dictionary<string, DataTable>)this.panelDay.Tag;
- //DataTable dtData = (DataTable)dictData["dtOrder"];
- string StrDataTime = Convert.ToDateTime(this.numYear.Value + "-" + this.numMonth.Value + "-" + this.numDay.Value).ToYYYY_MM_dd();
- DataTable dtData;
- if (dictData.ContainsKey("dtRefinedRepairOrder"))
- {
- dtData = (DataTable)dictData["dtRefinedRepairOrder"];
- }
- else
- {
- string StrWhere = "";
- StrWhere = " Ordv_RefinementStatus in ('0', '1') And Ordv_ReservationRefinementTime is not null ";
- dtData = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_DayRefinedRepairWorkData(StrWhere);
- dictData["dtRefinedRepairOrder"] = dtData;
- }
- string strWhere = "";
- if (!chkAllUserWork.Checked)
- {
- //GetPhotographyByWhereData(StrArray[1], ref strKey, ref strContent);
- strWhere = " 精修师编号 = '" + StrUserID + "' and 完成期限 >='" + StrDataTime + " 00:00:00' and 完成期限 <='" + StrDataTime + " 23:59:59' ";
- }
- ///字段数据
- foreach (DataColumn dtColum in dtData.Columns)
- {
- DataGridViewTextBoxColumn textBoxColum = new DataGridViewTextBoxColumn();
- textBoxColum.DataPropertyName = dtColum.ColumnName;
- textBoxColum.Name = dtColum.ColumnName;
- textBoxColum.HeaderText = dtColum.ColumnName;
- if (dtColum.ColumnName.Equals("精修师编号"))
- {
- textBoxColum.Visible = false;
- }
- if (dtColum.ColumnName.Equals("订单号"))
- {
- textBoxColum.Visible = false;
- }
- dgvData.Columns.Add(textBoxColum);
- }
- ///工作内容
- DataGridViewTextBoxColumn tempTextBoxColum = new DataGridViewTextBoxColumn();
- tempTextBoxColum.DataPropertyName = "工作内容";// dtColum.ColumnName;
- tempTextBoxColum.Name = "工作内容";
- tempTextBoxColum.HeaderText = "工作内容";
- tempTextBoxColum.Visible = false;
- dgvData.Columns.Add(tempTextBoxColum);
- DataRow[] dtRows = dtData.Select(strWhere);
- string keyNumber = "";
- foreach (DataRow dtRow in dtRows)
- {
- DataGridViewRow tempDgvr = this.BindClothDataListByRow(dtRow, "精修");
- if (keyNumber != dtRow["订单编号"].ToString())
- {
- keyNumber = dtRow["订单编号"].ToString();
- }
- else
- {
- tempDgvr.Cells["订单编号"].Value = "";
- tempDgvr.Cells["客户名称"].Value = "";
- tempDgvr.Cells["客户电话"].Value = "";
- tempDgvr.Cells["套系名称"].Value = "";
- tempDgvr.Cells["套系价格"].Value = "";
- }
-
- }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- this.tabControlSelectedIndex();
- }
- }
- private void lbl_FilmSelection_Click(object sender, EventArgs e)
- {
- if (this.panelDay.Tag != null)
- {
- this.dgvData.Tag = null;
- this.dgvData.Rows.Clear();
- this.dgvData.Columns.Clear();
- //BindDataTableColumData();
- //this.dgvData2.Rows.Clear();
- LYFZ.ComponentLibrary.LabelEx lbl = (LYFZ.ComponentLibrary.LabelEx)sender;
- string[] StrArray = lbl.Name.Trim().Split('_');
- Dictionary<string, DataTable> dictData = (Dictionary<string, DataTable>)this.panelDay.Tag;
- //DataTable dtData = (DataTable)dictData["dtOrder"];
- string StrDataTime = Convert.ToDateTime(this.numYear.Value + "-" + this.numMonth.Value + "-" + this.numDay.Value).ToYYYY_MM_dd();
- DataTable dtData;
- if (dictData.ContainsKey("dtFilmSelectionOrder"))
- {
- dtData = (DataTable)dictData["dtFilmSelectionOrder"];
- }
- else
- {
- string StrWhere = "";
- if (chkCompletedOK.Checked)
- {
- StrWhere = " Ordv_FilmSelectionStatus in ('1') And Ordv_ReservationFilmSelectionTime is not null ";
- }
- else if (chkCompletedNot.Checked||chkCompletedTimeOut.Checked)
- {
- StrWhere = " Ordv_FilmSelectionStatus in ('0') And Ordv_ReservationFilmSelectionTime is not null ";
- }
-
- dtData = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_DayFilmSelectionWorkData(StrWhere);
- dictData["dtFilmSelectionOrder"] = dtData;
- }
- string strWhere = "";
- if (!chkAllUserWork.Checked)
- {
- //GetPhotographyByWhereData(StrArray[1], ref strKey, ref strContent);
- strWhere = " 选片师编号 = '" + StrUserID + "' ";
- }
- if(!string.IsNullOrEmpty(strWhere))
- {
- strWhere +=" and ";
- }
- if (chkCompletedOK.Checked || chkCompletedNot.Checked)
- {
- strWhere += " 选片时间 ='" + StrDataTime + "' ";
- }
- else
- {
- strWhere += " 选片时间 <'" + StrDataTime + "' ";
- }
- ///字段数据
- foreach (DataColumn dtColum in dtData.Columns)
- {
- DataGridViewTextBoxColumn textBoxColum = new DataGridViewTextBoxColumn();
- textBoxColum.DataPropertyName = dtColum.ColumnName;
- textBoxColum.Name = dtColum.ColumnName;
- textBoxColum.HeaderText = dtColum.ColumnName;
- if (dtColum.ColumnName.Equals("选片师编号"))
- {
- textBoxColum.Visible = false;
- }
- if (dtColum.ColumnName.Equals("订单号"))
- {
- textBoxColum.Visible = false;
- }
- dgvData.Columns.Add(textBoxColum);
- }
- ///工作内容
- DataGridViewTextBoxColumn tempTextBoxColum = new DataGridViewTextBoxColumn();
- tempTextBoxColum.DataPropertyName = "工作内容";
- tempTextBoxColum.Name = "工作内容";
- tempTextBoxColum.HeaderText = "工作内容";
- tempTextBoxColum.Visible = false;
- dgvData.Columns.Add(tempTextBoxColum);
- DataRow[] dtRows = dtData.Select(strWhere);
- string keyNumber = "";
- foreach (DataRow dtRow in dtRows)
- {
- DataGridViewRow tempDgvr = this.BindClothDataListByRow(dtRow, "选片");
- if (keyNumber != dtRow["订单编号"].ToString())
- {
- keyNumber = dtRow["订单编号"].ToString();
- }
- else
- {
- tempDgvr.Cells["订单编号"].Value = "";
- tempDgvr.Cells["客户名称"].Value = "";
- tempDgvr.Cells["客户电话"].Value = "";
- tempDgvr.Cells["套系名称"].Value = "";
- tempDgvr.Cells["套系价格"].Value = "";
- }
- }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- this.tabControlSelectedIndex();
- }
- }
- void chkAllUserWork_Click(object sender, EventArgs e)
- {
- PublicFunctionRows();
- }
- bool IsFrist = true;
- /// <summary>
- /// 影楼编号
- /// </summary>
- string StrCompanyID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID();
- /// <summary>
- /// 员工编号
- /// </summary>
- string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- /// <summary>
- /// 员工姓名
- /// </summary>
- string StrUserName = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_Name;
- /// <summary>
- /// 获取类型
- /// </summary>
- /// <param name="StrTypeCode"></param>
- /// <returns></returns>
- string GetWorkContent(string StrTypeCode)
- {
- switch (StrTypeCode)
- {
- case "Clothing":
- return "选衣";
- case "Makeup":
- return "化妆";
- case "MakeupAssistant":
- return "化妆助理";
- case "Photography":
- return "拍摄";
- case "PhotographyAssistant":
- return "拍摄助理";
- case "BootDivision":
- return "引导";
- case "BootDivisionAssistant":
- return "引导助理";
- case "EarlyRepair":
- return "初修";
- case "FilmSelection":
- return "选片";
- case "RefinedRepair":
- return "精修";
- case "Design":
- return "设计";
- case "LookDesign":
- return "看设计";
- case "SendPhoto":
- return "发片";
- case "Pickup":
- return "取件";
- case "Service":
- return "服务人员";
- case "Marriage":
- return "婚期";
- case "MemorialDay":
- return "纪念日";
- case "Birthday":
- return "生日";
- case "FullMoon":
- return "满月";
- case "HundredDay":
- return "百天";
- }
- return "";
- }
- /// <summary>
- /// 获取类型编码
- /// </summary>
- /// <param name="StrTypeCode"></param>
- /// <returns></returns>
- string GetWorkContentCode(string StrTypeName)
- {
- switch (StrTypeName)
- {
- case "选衣":
- return "Clothing";
- case "化妆":
- return "Makeup";
- case "化妆助理":
- return "MakeupAssistant";
- case "拍摄":
- return "Photography";
- case "拍摄助理":
- return "PhotographyAssistant";
- case "引导":
- return "BootDivision";
- case "引导助理":
- return "BootDivisionAssistant";
- case "初修":
- return "EarlyRepair";
- case "选片":
- return "FilmSelection";
- case "精修":
- return "RefinedRepair";
- case "设计":
- return "Design";
- case "看设计":
- return "LookDesign";
- case "发片":
- return "SendPhoto";
- case "取件":
- return "Pickup";
- case "服务人员":
- return "Service";
- case "婚期":
- return "Marriage";
- case "纪念日":
- return "MemorialDay";
- case "生日":
- return "Birthday";
- case "满月":
- return "FullMoon";
- case "百天":
- return "HundredDay";
- }
- return "";
- }
- /// <summary>
- /// 窗体首次加载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void MyWorkRemindFormMain_Load(object sender, EventArgs e)
- {
- this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- this.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- this.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- string strColumn = "数码编号,订单号,订单类型,客户姓名,客户电话,工作内容,员工姓名,工作时间";
- this.dgvData.DataColumns(strColumn, "数码编号");
- //this.dgvData2.DataColumns(strColumn, "数码编号");
- this.dgvData3.DataColumns("ID,状态,级别,发布人,发布时间,任务内容,办理人,完成期限", strHideField: "ID");
- this.dgvData3.Columns["状态"].Width = 40;
- this.dgvData3.Columns["级别"].Width = 40;
- this.dgvData3.Columns["发布人"].Width = 70;
- this.dgvData3.Columns["办理人"].Width = 70;
- this.dgvData3.Columns["发布时间"].Width = 105;
- this.dgvData3.Columns["完成期限"].Width = 105;
- this.dgvData3.Columns["任务内容"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
- this.dgvData3.Columns["状态"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
- this.dgvData3.Columns["级别"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
- this.paneltitle.BackColor = UIBlueThemeResources.SightsSelectTableBorderColor;
- }
- /// <summary>
- /// 窗体首次加载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void MyWorkRemindFormMain_Shown(object sender, EventArgs e)
- {
- this.numDay.Maximum = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(Convert.ToInt32(this.numYear.Value), Convert.ToInt32(this.numMonth.Value));
- this.numYear.Value = SDateTime.Now.Year;
- this.numMonth.Value = SDateTime.Now.Month;
- this.numDay.Value = SDateTime.Now.Day;
- this.numYear.Refresh();
- this.numMonth.Refresh();
- this.numDay.Refresh();
- this.IsFrist = false;
- this.ControlsLoad(true);
- //获取我的任务
- DataTable dtMyTask = LYFZ.BLL.BLL_ErpOrderView.GetData_MyTask(" And Agt_ManageName = '" + this.StrUserID + "'");
- this.dgvData3.Rows.Clear();
- if (dtMyTask.Rows.Count > 0)
- {
- #region
- DataGridViewRow dgvr = null;
- DataGridViewCell cell = null;
- foreach (DataRow dtRow in dtMyTask.Rows)
- {
- dgvr = new DataGridViewRow();
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["ID"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "新";
- cell.Style.ForeColor = Color.Red;
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- switch (dtRow["级别"].ToString().Trim())
- {
- case "0":
- cell.Value = "高";
- break;
- case "1":
- cell.Value = "中";
- break;
- case "2":
- cell.Value = "低";
- break;
- }
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = LYFZ.BLL.BLL_ErpOrderView.GetUserName(dtRow["发布人"]);
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["发布时间"]);
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["任务内容"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = LYFZ.BLL.BLL_ErpOrderView.GetUserName(dtRow["办理人"]);
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["完成期限"]);
- dgvr.Cells.Add(cell);
- this.dgvData3.Rows.Add(dgvr);
- //dgvr.Tag = BindDataTableRowColumn1(dgvr);
- }
- dgvData3.Tag = null;
- this.dgvData3.ClearSelection();
- this.lblMyTaskCount.Text = "( " + dtMyTask.Rows.Count + " )";
- this.lblMyTaskCount.Visible = true;
- #endregion
- }
-
- }
- /// <summary>
- /// 加载
- /// </summary>
- /// <param name="IsLoad"></param>
- void ControlsLoad(bool IsLoad = false)
- {
- foreach (Control control in this.panelDay.Controls)
- {
- if (control is LYFZ.ComponentLibrary.LabelEx)
- {
- string[] lblArray = control.Text.Split(':');
- control.Text = lblArray[0].Trim() + ": 0";
- }
- }
- string StrCompleteStatus = "Not";
- if (this.chkCompletedTimeOut.Checked)
- { StrCompleteStatus = "OuntNot"; }
- else if (this.chkCompletedOK.Checked)
- { StrCompleteStatus = "OK"; }
- this.Refresh();
- string StrDataTime = Convert.ToDateTime(this.numYear.Value + "-" + this.numMonth.Value + "-" + this.numDay.Value).ToYYYY_MM_dd();
- if (IsLoad)
- {
- System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(delegate()
- {
- this.GetDayData(StrCompleteStatus, StrDataTime);
- }));
- t.Start();
- }
- else
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- this.GetDayData(StrCompleteStatus, StrDataTime);
- });
- }
- }
- /// <summary>
- /// 获取每日数据
- /// </summary>
- void GetDayData(string StrCompleteStatus, string StrDataTime)
- {
- string strWhereOrder = "";
- string strWhereCLientServiceTask = "";
- DataTable dtOrder = new DataTable();
- if (StrCompleteStatus == "OuntNot" || StrCompleteStatus == "Not")
- {
- if (StrCompleteStatus == "Not")
- {
- strWhereOrder = LYFZ.BLL.OtherCommonModel.GetDateTime("工作时间", StrDataTime, StrDataTime);
- strWhereCLientServiceTask = " And Cst_CompletionIntStatus = 0" + LYFZ.BLL.OtherCommonModel.GetDateTime("Cst_TaskTermTime", StrDataTime, StrDataTime);
- //获取未完成
- dtOrder = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_DayWorkNot(strWhereOrder);
- }
- else
- {
- strWhereOrder = " And 工作时间 < '" + Convert.ToDateTime(StrDataTime).ToString("yyyy-MM-dd HH:mm:ss") + "'";
- strWhereCLientServiceTask = " And Cst_CompletionIntStatus = 0 And Cst_TaskTermTime < '" + Convert.ToDateTime(StrDataTime).ToString("yyyy-MM-dd HH:mm:ss") + "'";
- //获取超时未完成
- dtOrder = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_DayWorkNot(strWhereOrder);
- }
- }
- else if (StrCompleteStatus == "OK")
- {
- strWhereOrder = LYFZ.BLL.OtherCommonModel.GetDateTime("工作时间", StrDataTime, StrDataTime);
- strWhereCLientServiceTask = " And Cst_CompletionIntStatus = 1" + LYFZ.BLL.OtherCommonModel.GetDateTime("Cst_TaskTermTime", StrDataTime, StrDataTime);
- //获取已完成
- dtOrder = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_DayWorkOK(strWhereOrder);
- }
- //获取客服任务
- DataTable dtTaskData = LYFZ.BLL.BLL_ErpOrderView.GetData_ClientServiceTask(strWhereCLientServiceTask, IsShowCompletionRemark: false, IsReturnNewTable: false);
- //获取客户节日
- DataTable dtClient = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_ClientFestivals(StrDataTime);
- //获取客户节日
- DataTable dtTodayTrack = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_TodayTrack(StrDataTime);
- //今日跟踪(医院客户提醒)
- DataTable dtTodayHospital = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_TodayTrackHospital(StrDataTime);
- //今日跟踪(客户今日提醒)
- DataTable dtTodayClient = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_TodayTrackClient(StrDataTime);
- try
- {
- this.Invoke(new LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.UpdateControl(delegate()
- {
- Dictionary<string, DataTable> dictData = new Dictionary<string, DataTable>();
- dictData.Add("dtOrder", dtOrder);
- dictData.Add("dtTaskData", dtTaskData);
- dictData.Add("dtClient", dtClient);
- dictData.Add("dtTodayTrack", dtTodayTrack);
- dictData.Add("dtTodayHospital", dtTodayHospital);
- dictData.Add("dtTodayClient", dtTodayClient);
- this.panelDay.Tag = dictData;
- this.PublicFunctionRows();
- }));
- }
- catch { }
- }
- /// <summary>
- /// 全绑定
- /// </summary>
- void PublicFunctionRows()
- {
- this.dgvData.Rows.Clear();
- BindDataTableColumData();
- BindDayWorkData();
- //this.dgvData2.Rows.Clear();
- if (this.panelDay.Tag != null)
- {
- string[] tagList = new string[] {
- "Clothing", "Makeup","MakeupAssistant","Photography","PhotographyAssistant","BootDivision",
- "BootDivisionAssistant","EarlyRepair","FilmSelection","RefinedRepair","Design","LookDesign","SendPhoto","Pickup",
- "Service","Marriage","MemorialDay","Birthday","FullMoon","HundredDay"
- };
- foreach (var item in tagList)
- {
- string strCode = item;
- LYFZ.ComponentLibrary.LabelEx lbl = this.GetGroupBoxData(strCode);
- string[] StrArray = lbl.Text.Trim().Split(':');
- lbl.Text = StrArray[0] + ":0" ;
- }
- string strWhere = "";
- if(!chkAllUserWork.Checked)
- {
- strWhere = " 员工编号 = '" + StrUserID + "' ";
- }
- //订单流程
- Dictionary<string, DataTable> dictDataTable = (Dictionary<string, DataTable>)this.panelDay.Tag;
- DataRow[] dtRowsOrder = ((DataTable)dictDataTable["dtOrder"]).Select(strWhere);
- if (dtRowsOrder.Length > 0)
- {
- Dictionary<string, int> dictData = new Dictionary<string, int>();
- foreach (DataRow dtRow in dtRowsOrder)
- {
- if (dictData.ContainsKey(dtRow["工作内容"].ToString().Trim()))
- { dictData[dtRow["工作内容"].ToString().Trim()] = (Convert.ToInt32(dictData[dtRow["工作内容"].ToString().Trim()]) + 1); }
- else
- { dictData.Add(dtRow["工作内容"].ToString().Trim(), 1); }
- this.PublicOrderRows(dtRow);
- }
- foreach (var item in dictData)
- {
- string strCode = this.GetWorkContentCode(item.Key.Trim());
- LYFZ.ComponentLibrary.LabelEx lbl = this.GetGroupBoxData(strCode);
- string[] StrArray = lbl.Text.Trim().Split(':');
- lbl.Text = StrArray[0] + ": " + item.Value;
- }
- }
-
- if (!chkAllUserWork.Checked)
- {
- strWhere = " 员工姓名 = '" + this.StrUserName + "' ";
- }
- //客户节日
- DataRow[] dtRowsClient = ((DataTable)dictDataTable["dtClient"]).Select(strWhere);
- if (dtRowsClient.Length > 0)
- {
- Dictionary<string, int> dictData = new Dictionary<string, int>();
- foreach (DataRow dtRow in dtRowsClient)
- {
- if (dictData.ContainsKey(dtRow["工作内容"].ToString().Trim()))
- { dictData[dtRow["工作内容"].ToString().Trim()] = (Convert.ToInt32(dictData[dtRow["工作内容"].ToString().Trim()]) + 1); }
- else
- { dictData.Add(dtRow["工作内容"].ToString().Trim(), 1); }
- this.PublicClientRows(dtRow);
- }
- foreach (var item in dictData)
- {
- string strCode = this.GetWorkContentCode(item.Key.Trim());
- LYFZ.ComponentLibrary.LabelEx lbl = this.GetGroupBoxData(strCode);
- string[] StrArray = lbl.Text.Trim().Split(':');
- lbl.Text = StrArray[0] + ": " + item.Value;
- }
- }
- if (!chkAllUserWork.Checked)
- {
- strWhere = " Cst_ServicePerson = '" + this.StrUserID + "' ";
- }
- //客服任务
- DataRow[] dtRowsTask = ((DataTable)dictDataTable["dtTaskData"]).Select(strWhere);
- if (dtRowsTask.Length > 0)
- {
- foreach (DataRow dtRow in dtRowsTask)
- { this.PublicTaskRows(dtRow); }
- string[] StrArray = this.lbl_ClientServiceTask.Text.Trim().Split(':');
- this.lbl_ClientServiceTask.Text = StrArray[0] + ": " + dtRowsTask.Length;
- }
- if (!chkAllUserWork.Checked)
- {
- strWhere = " 员工编号 = '" + this.StrUserID + "' ";
- }
- int TodayTrackCount = 0;
- //今日跟踪
- DataRow[] dtTodayTrack = ((DataTable)dictDataTable["dtTodayTrack"]).Select(strWhere);
- if (dtTodayTrack.Length > 0)
- {
- foreach (DataRow dtRow in dtTodayTrack)
- { this.PublicOrderRows(dtRow); }
- TodayTrackCount += dtTodayTrack.Length;
- }
- if (!chkAllUserWork.Checked)
- {
- strWhere = " 员工姓名 = '" + this.StrUserName + "' ";
- }
- //今日跟踪(医院今日提醒)
- DataRow[] dtTodayHospital = ((DataTable)dictDataTable["dtTodayHospital"]).Select(strWhere);
- if (dtTodayHospital.Length > 0)
- {
- foreach (DataRow dtRow in dtTodayHospital)
- { this.PublicClientRows(dtRow); }
- TodayTrackCount += dtTodayHospital.Length;
- }
- if (!chkAllUserWork.Checked)
- {
- strWhere = " 员工姓名 = '" + this.StrUserName + "' ";
- }
- //今日跟踪(客户今日提醒)
- DataRow[] dtTodayClient = ((DataTable)dictDataTable["dtTodayClient"]).Select(strWhere);
- if (dtTodayClient.Length > 0)
- {
- foreach (DataRow dtRow in dtTodayClient)
- { this.PublicClientRows(dtRow); }
- TodayTrackCount += dtTodayClient.Length;
- }
- if (TodayTrackCount > 0)
- {
- string[] StrArray = this.lbl_TodayTrack.Text.Trim().Split(':');
- this.lbl_TodayTrack.Text = StrArray[0] + ": " + TodayTrackCount;
- }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- }
- }
- LYFZ.ComponentLibrary.LabelEx GetGroupBoxData( string strCode)
- {
- LYFZ.ComponentLibrary.LabelEx lbl = (LYFZ.ComponentLibrary.LabelEx)this.groupBoxEx1.Controls["lbl_" + strCode];
- if(lbl==null)
- {
- lbl = (LYFZ.ComponentLibrary.LabelEx)this.groupBoxEx2.Controls["lbl_" + strCode];
- }
- if (lbl == null)
- {
- lbl = (LYFZ.ComponentLibrary.LabelEx)this.groupBoxEx3.Controls["lbl_" + strCode];
- }
- if (lbl == null)
- {
- lbl = (LYFZ.ComponentLibrary.LabelEx)this.groupBoxEx4.Controls["lbl_" + strCode];
- }
- return lbl;
- }
- void BindDataTableColumData(string strColumn = "数码编号,订单号,订单类型,客户姓名,客户电话,工作内容,员工姓名,工作时间", string hidColum = "数码编号")
- {
- this.dgvData.Columns.Clear();
- //string strColumn = "数码编号,订单号,订单类型,客户姓名,工作内容,员工姓名,工作时间";
- string[] columLists = strColumn.Split(',');
- foreach (string colum in columLists)
- {
- DataGridViewTextBoxColumn dataColum = new DataGridViewTextBoxColumn();
- //dataColum.Name = colum;
- //dataColum.HeaderText = colum;
- dataColum.Name = colum;
- dataColum.DataPropertyName = colum;
- dataColum.HeaderText = colum;
- dataColum.Resizable = DataGridViewTriState.True;
- if (hidColum.Equals(colum))
- {
- dataColum.Visible = false;
- }
- this.dgvData.Columns.Add(dataColum);
- }
-
- //this.dgvData.DataColumns(strColumn, "数码编号");
- }
- void BindDayWorkData()
- {
- foreach (Control control in this.panelDay.Controls)
- {
- if (control is LYFZ.ComponentLibrary.LabelEx)
- {
- string[] lblArray = control.Text.Split(':');
- control.Text = lblArray[0].Trim() + ": 0";
- }
- }
- }
- /// <summary>
- /// 绑定订单工作
- /// </summary>
- /// <param name="dtRow"></param>
- void PublicOrderRows(DataRow dtRow)
- {
- DataGridViewCell cell = null;
- DataGridViewRow dgvr = null;
-
- if (!chkAllUserWork.Checked)
- {
- if (dtRow["员工编号"].ToString() == this.StrUserID)
- {
- dgvr = new DataGridViewRow();
-
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["数码编号"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["订单号"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["订单类型"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["客户姓名"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["客户电话"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["工作内容"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["员工姓名"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["工作时间"]);
- dgvr.Cells.Add(cell);
- this.dgvData.Rows.Add(dgvr);
- dgvr.Tag = BindDataTableRowColumn(dgvr);
- }
- }
- else
- {
- dgvr = new DataGridViewRow();
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["数码编号"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["订单号"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["订单类型"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["客户姓名"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["客户电话"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["工作内容"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["员工姓名"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["工作时间"]);
- dgvr.Cells.Add(cell);
- this.dgvData.Rows.Add(dgvr);
- dgvr.Tag = BindDataTableRowColumn(dgvr);
- }
- dgvData.Tag = null;
- }
- DataRow BindDataTableRowColumn(DataGridViewRow dgvr)
- {
- DataTable dtTable = new DataTable();
- foreach (DataGridViewColumn culumn in this.dgvData.Columns)
- {
- dtTable.Columns.Add(new DataColumn(culumn.HeaderText));
- }
- DataRow dtRow = dtTable.NewRow();
- foreach (DataGridViewColumn culumn in this.dgvData.Columns)
- {
- if (this.dgvData.Columns.Contains(culumn.HeaderText))
- {
-
- dtRow[culumn.HeaderText] = dgvr.Cells[culumn.HeaderText].Value;
- }
- }
- return dtRow;
- }
- DataRow BindDataTableRowColumn1(DataGridViewRow dgvr)
- {
- DataTable dtTable = new DataTable();
- foreach (DataGridViewColumn culumn in this.dgvData.Columns)
- {
- dtTable.Columns.Add(new DataColumn(culumn.HeaderText));
- }
- DataRow dtRow = dtTable.NewRow();
- dtRow["工作内容"] = dgvr.Cells["任务内容"];
- dtRow["员工姓名"] = dgvr.Cells["办理人"];
- dtRow["工作时间"] = dgvr.Cells["发布时间"];
- return dtRow;
- }
- /// <summary>
- /// 绑定订单工作
- /// </summary>
- /// <param name="dtRow"></param>
- void PublicClientRows(DataRow dtRow)
- {
- DataGridViewCell cell = null;
- DataGridViewRow dgvr = null;
- if (!chkAllUserWork.Checked)
- {
- if (dtRow["员工姓名"].ToString() == this.StrUserName)
- {
- dgvr = new DataGridViewRow();
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["数码编号"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["订单号"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["订单类型"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["客户姓名"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["客户电话"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["工作内容"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["员工姓名"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["工作时间"]);
- dgvr.Cells.Add(cell);
- this.dgvData.Rows.Add(dgvr);
- dgvr.Tag = BindDataTableRowColumn(dgvr);
- }
- }
- else
- {
- dgvr = new DataGridViewRow();
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["数码编号"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["订单号"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["订单类型"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["客户姓名"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["客户电话"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["工作内容"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["员工姓名"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["工作时间"]);
- dgvr.Cells.Add(cell);
- this.dgvData.Rows.Add(dgvr);
- dgvr.Tag = BindDataTableRowColumn(dgvr);
- }
- dgvData.Tag = null;
- }
- /// <summary>
- /// 绑定客户安排
- /// </summary>
- /// <param name="dtRow"></param>
- void PublicTaskRows(DataRow dtRow)
- {
- DataGridViewCell cell = null;
- DataGridViewRow dgvr = null;
- if (!chkAllUserWork.Checked)
- {
- if (dtRow["Cst_ServicePerson"].ToString().Trim() == this.StrUserID)
- {
- dgvr = new DataGridViewRow();
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["Cst_ViceNumber"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["Cst_ShowOrderNumber"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "客户任务";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["Cus_Name"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["Cus_Telephone"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["Cst_TaskItem"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = LYFZ.BLL.BLL_ErpOrderView.GetUserName(dtRow["Cst_ServicePerson"]);
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = Convert.ToDateTime(dtRow["Cst_TaskTermTime"]).ToString("yyyy-MM-dd");
- dgvr.Cells.Add(cell);
- this.dgvData.Rows.Add(dgvr);
- dgvr.Tag = BindDataTableRowColumn(dgvr);
- }
- }
- else
- {
- dgvr = new DataGridViewRow();
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["Cst_ViceNumber"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["Cst_ShowOrderNumber"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "客户任务";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["Cus_Name"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["Cus_Telephone"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow["Cst_TaskItem"].ToString().Trim();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = LYFZ.BLL.BLL_ErpOrderView.GetUserName(dtRow["Cst_ServicePerson"]);
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = Convert.ToDateTime(dtRow["Cst_TaskTermTime"]).ToString("yyyy-MM-dd");
- dgvr.Cells.Add(cell);
- this.dgvData.Rows.Add(dgvr);
- dgvr.Tag = BindDataTableRowColumn(dgvr);
- }
- dgvData.Tag = null;
- }
- /// <summary>
- /// 年回车
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void numYear_KeyDown(object sender, KeyEventArgs e)
- {
- this.numDay_KeyDown(this, e);
- }
- /// <summary>
- /// 月回车
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void numMonth_KeyDown(object sender, KeyEventArgs e)
- {
- this.numDay_KeyDown(this, e);
- }
- /// <summary>
- /// 日回车
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void numDay_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.Enter)
- { this.numDay_ValueChanged(this, null); }
- }
- /// <summary>
- /// 年值变更
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void numYear_ValueChanged(object sender, EventArgs e)
- {
- this.numDay_ValueChanged(this, null);
- }
- /// <summary>
- /// 月值变更
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void numMonth_ValueChanged(object sender, EventArgs e)
- {
- this.numDay.Maximum = System.Threading.Thread.CurrentThread.CurrentUICulture.Calendar.GetDaysInMonth(Convert.ToInt32(this.numYear.Value), Convert.ToInt32(this.numMonth.Value));
- this.numDay_ValueChanged(this, null);
- }
- /// <summary>
- /// 日值变更
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void numDay_ValueChanged(object sender, EventArgs e)
- {
- this.lblLunarCalendar.Text = LYFZ.Command.Command_CalendarTurnLunar.GetLunarNewYearMonthDay(Convert.ToDateTime(numYear.Value + "-" + numMonth.Value + "-" + this.numDay.Value).ToString(), false);
- this.lblWeek.Text = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.CaculateWeekDay(Convert.ToDateTime(Convert.ToDateTime(numYear.Value + "-" + numMonth.Value + "-" + this.numDay.Value)).DayOfWeek.ToString());
- if (!this.IsFrist)
- { this.ControlsLoad(); }
- }
- /// <summary>
- /// 已完成
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkCompletedOK_Click(object sender, EventArgs e)
- {
- this.chkCompletedOK.Checked = true;
- this.chkCompletedNot.Checked = false;
- this.chkCompletedTimeOut.Checked = false;
- this.ControlsLoad();
- }
- /// <summary>
- /// 未完成
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkCompletedNot_Click(object sender, EventArgs e)
- {
- this.chkCompletedNot.Checked = true;
- this.chkCompletedOK.Checked = false;
- this.chkCompletedTimeOut.Checked = false;
- this.ControlsLoad();
- }
- /// <summary>
- /// 超时未完成
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkCompletedTimeOut_Click(object sender, EventArgs e)
- {
- this.chkCompletedTimeOut.Checked = true;
- this.chkCompletedOK.Checked = false;
- this.chkCompletedNot.Checked = false;
- this.ControlsLoad();
- }
- /// <summary>
- /// 点击查看全部
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void panelDay_Click(object sender, EventArgs e)
- {
- dataType = "";
- if (this.panelDay.Tag != null)
- {
- this.PublicFunctionRows();
- }
- }
- /// <summary>
- /// 选衣服数据
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_Clothing_Click(object sender, EventArgs e)
- {
- if (this.panelDay.Tag != null)
- {
- this.dgvData.Tag = null;
- this.dgvData.Rows.Clear();
- this.dgvData.Columns.Clear();
- //this.dgvData2.Rows.Clear();
- LYFZ.ComponentLibrary.LabelEx lbl = (LYFZ.ComponentLibrary.LabelEx)sender;
- string[] StrArray = lbl.Name.Trim().Split('_');
- Dictionary<string, DataTable> dictData = (Dictionary<string, DataTable>)this.panelDay.Tag;
- DataTable dtData;
- //(DataTable)dictData["dtClothOrder"];
- if(dictData.ContainsKey("dtClothOrder"))
- {
- dtData = (DataTable)dictData["dtClothOrder"];
- }
- else
- {
- string StrDataTime = Convert.ToDateTime(this.numYear.Value + "-" + this.numMonth.Value + "-" + this.numDay.Value).ToYYYY_MM_dd();
- string StrWhere = LYFZ.BLL.OtherCommonModel.GetDateTime("Ordv_ReservationClothingTime", StrDataTime, StrDataTime);
- if(chkCompletedTimeOut.Checked)
- {
- StrWhere = " and Ordv_ReservationClothingTime <='" + StrDataTime + "' ";
- }
- if (chkCompletedOK.Checked)
- {
- dtData = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_DayClothWorkData(LYFZ.BLL.OtherCommonModel.GetDateTime("Ordv_ClothingTime", StrDataTime, StrDataTime), "1");
- }
- else
- {
- dtData = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_DayClothWorkData(StrWhere);
- }
- dictData["dtClothOrder"] = dtData;
- }
- ///字段数据
- foreach(DataColumn dtColum in dtData.Columns)
- {
- DataGridViewTextBoxColumn textBoxColum = new DataGridViewTextBoxColumn();
- textBoxColum.DataPropertyName = dtColum.ColumnName;//"工作内容";
- textBoxColum.Name = dtColum.ColumnName;
- textBoxColum.HeaderText = dtColum.ColumnName;
- dgvData.Columns.Add(textBoxColum);
- }
- ///工作内容
- DataGridViewTextBoxColumn tempTextBoxColum = new DataGridViewTextBoxColumn();
- tempTextBoxColum.DataPropertyName = "工作内容";
- tempTextBoxColum.Name = "工作内容";
- tempTextBoxColum.HeaderText = "工作内容";
- tempTextBoxColum.Visible = false;
- dgvData.Columns.Add(tempTextBoxColum);
- string strKey = "";
- if (!chkAllUserWork.Checked)
- {
- strKey = "安排人='" + this.StrUserName + "'";
- }
- DataRow[] dtRows = dtData.Select(strKey);
- foreach (DataRow dtRow in dtRows)
- { this.BindClothDataListByRow(dtRow, "选衣"); }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- this.tabControlSelectedIndex();
- }
- }
- /// <summary>
- /// 选衣服数据
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_Photograph_Click(object sender, EventArgs e)
- {
- if (this.panelDay.Tag != null)
- {
- this.dgvData.Tag = null;
- this.dgvData.Rows.Clear();
- this.dgvData.Columns.Clear();
- //this.dgvData2.Rows.Clear();
- LYFZ.ComponentLibrary.LabelEx lbl = (LYFZ.ComponentLibrary.LabelEx)sender;
- string[] StrArray = lbl.Name.Trim().Split('_');
- Dictionary<string, DataTable> dictData = (Dictionary<string, DataTable>)this.panelDay.Tag;
- DataTable dtData;
- string strKey = "";
- string strContent = "";
- //(DataTable)dictData["dtClothOrder"];
- if (dictData.ContainsKey("dtPhotographOrder"))
- {
- dtData = (DataTable)dictData["dtPhotographOrder"];
- }
- else
- {
- string StrDataTime = Convert.ToDateTime(this.numYear.Value + "-" + this.numMonth.Value + "-" + this.numDay.Value).ToYYYY_MM_dd();
-
- string StrWhere = "";
- if (chkCompletedNot.Checked)
- {
- StrWhere = " Ordpg_PhotographyStatus = '0' " + LYFZ.BLL.OtherCommonModel.GetDateTime("Ordpg_ReservationPhotographyTime", StrDataTime, StrDataTime);
- }
- if (chkCompletedOK.Checked)
- {
- StrWhere = " Ordpg_PhotographyStatus = '1' " + LYFZ.BLL.OtherCommonModel.GetDateTime("Ordpg_PhotographyTime", StrDataTime, StrDataTime);
- }
- if(chkCompletedTimeOut.Checked)
- {
- StrWhere = " Ordpg_PhotographyStatus = '0' and Ordpg_ReservationPhotographyTime < '" + StrDataTime + "' ";
- }
-
- dtData = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_DayPhotographyWorkData(StrWhere);
- dictData["dtPhotographOrder"] = dtData;
- }
- if (!chkAllUserWork.Checked)
- {
- GetPhotographyByWhereData(StrArray[1], ref strKey, ref strContent);
- }
- ///字段数据
- foreach (DataColumn dtColum in dtData.Columns)
- {
- DataGridViewTextBoxColumn textBoxColum = new DataGridViewTextBoxColumn();
- textBoxColum.DataPropertyName = dtColum.ColumnName;// "工作内容";
- textBoxColum.Name = dtColum.ColumnName;
- textBoxColum.HeaderText = dtColum.ColumnName;
- dgvData.Columns.Add(textBoxColum);
- }
- ///工作内容
- DataGridViewTextBoxColumn tempTextBoxColum = new DataGridViewTextBoxColumn();
- tempTextBoxColum.DataPropertyName = "工作内容";
- tempTextBoxColum.Name = "工作内容";
- tempTextBoxColum.HeaderText = "工作内容";
- tempTextBoxColum.Visible = false;
- dgvData.Columns.Add(tempTextBoxColum);
- DataRow[] dtRows = { };
- dtRows = dtData.Select(strKey);
- foreach (DataRow dtRow in dtRows)
- { this.BindClothDataListByRow(dtRow, strContent); }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- this.tabControlSelectedIndex();
- }
- }
- void GetPhotographyByWhereData(string type,ref string strKey,ref string strContent)
- {
- //strKey+"='" + this.StrUserName + "'"
- switch(type)
- {
- case "Photography":
- strContent = "拍摄";
- strKey = "摄影师" + "='" + this.StrUserName + "'";
- break;
- case "PhotographyAssistant":
- strContent = "拍摄助理";
- strKey = "摄影助理" + "='" + this.StrUserName + "'";
- break;
- case "Makeup":
- strContent = "化妆";
- strKey = "化妆师" + "='" + this.StrUserName + "'";
- break;
- case "MakeupAssistant":
- strContent = "化妆助理";
- strKey = "化妆助理" + "='" + this.StrUserName + "'";
- break;
- case "BootDivision":
- strContent = "引导";
- strKey = "引导师" + "='" + this.StrUserName + "'";
- break;
- case "BootDivisionAssistant":
- strContent = "引导助理";
- strKey = "引导助理" + "='" + this.StrUserName + "'";
- break;
- }
- }
- DataGridViewRow BindClothDataListByRow(DataRow dtRow, string workContent)
- {
- dataType = workContent;
- DataGridViewCell cell = null;
- DataGridViewRow dgvr = null;
- dgvr = new DataGridViewRow();
- foreach (DataColumn colum in dtRow.Table.Columns)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtRow[colum.ColumnName].ToString();
- dgvr.Cells.Add(cell);
- }
- cell = new DataGridViewTextBoxCell();
- cell.Value = workContent;
- dgvr.Cells.Add(cell);
- this.dgvData.Rows.Add(dgvr);
- dgvr.Tag = BindDataTableRowColumn(dgvr);
- return dgvr;
- }
- /// <summary>
- /// 订单流程点击
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_BootDivision_Click(object sender, EventArgs e)
- {
- dataType = "";
- if (this.panelDay.Tag != null)
- {
- this.dgvData.Tag = null;
- this.dgvData.Rows.Clear();
- BindDataTableColumData();
- //this.dgvData2.Rows.Clear();
- LYFZ.ComponentLibrary.LabelEx lbl = (LYFZ.ComponentLibrary.LabelEx)sender;
- string[] StrArray = lbl.Name.Trim().Split('_');
- Dictionary<string, DataTable> dictData = (Dictionary<string, DataTable>)this.panelDay.Tag;
- DataTable dtData = (DataTable)dictData["dtOrder"];
- DataRow[] dtRows = dtData.Select("工作内容='" + this.GetWorkContent(StrArray[1]) + "'");
- foreach (DataRow dtRow in dtRows)
- { this.PublicOrderRows(dtRow); }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- this.tabControlSelectedIndex();
- }
- }
- /// <summary>
- /// 订单流程点击
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_EarlyRepair_Click(object sender, EventArgs e)
- {
- //LYFZ.Software.MainBusiness.DoorCityProcess.frmDigitalArrangement digitalForm = new DoorCityProcess.frmDigitalArrangement();
- //digitalForm.labEarlyRepair.Checked = true;
- //digitalForm.cbxMyJob.Checked = true;
- //digitalForm.BindPostionSize();
- //digitalForm.Show();
- //this.Close();
- if (this.panelDay.Tag != null)
- {
- this.dgvData.Tag = null;
- this.dgvData.Rows.Clear();
- this.dgvData.Columns.Clear();
- //BindDataTableColumData();
- //this.dgvData2.Rows.Clear();
- LYFZ.ComponentLibrary.LabelEx lbl = (LYFZ.ComponentLibrary.LabelEx)sender;
- string[] StrArray = lbl.Name.Trim().Split('_');
- Dictionary<string, DataTable> dictData = (Dictionary<string, DataTable>)this.panelDay.Tag;
- //DataTable dtData = (DataTable)dictData["dtOrder"];
- string StrDataTime = Convert.ToDateTime(this.numYear.Value + "-" + this.numMonth.Value + "-" + this.numDay.Value).ToYYYY_MM_dd();
- DataTable dtData;
- if (dictData.ContainsKey("dtEarlyRepairOrder"))
- {
- dtData = (DataTable)dictData["dtEarlyRepairOrder"];
- }
- else
- {
-
- string StrWhere = "";
- StrWhere = " Ordv_EarlyRepairStatus in ('0', '1') And Ordv_ReservationEarlyRepairTime is not null ";
- dtData = LYFZ.BLL.BLL_ErpOrderView.GetData_DailyWork_DayEarlyRepairWorkData(StrWhere);
- dictData["dtEarlyRepairOrder"] = dtData;
- }
- string strWhere = "";
- if (!chkAllUserWork.Checked)
- {
- //GetPhotographyByWhereData(StrArray[1], ref strKey, ref strContent);
- strWhere = " 初修师编号 = '" + StrUserID + "' and 完成期限 >='" + StrDataTime + " 00:00:00' and 完成期限 <='" + StrDataTime + " 23:59:59' ";
- }
- ///字段数据
- foreach (DataColumn dtColum in dtData.Columns)
- {
- DataGridViewTextBoxColumn textBoxColum = new DataGridViewTextBoxColumn();
- textBoxColum.DataPropertyName = dtColum.ColumnName;//"工作内容";
- textBoxColum.Name = dtColum.ColumnName;
- textBoxColum.HeaderText = dtColum.ColumnName;
-
- if (dtColum.ColumnName.Equals("初修师编号"))
- {
- textBoxColum.Visible = false;
- }
- if (dtColum.ColumnName.Equals("订单号"))
- {
- textBoxColum.Visible = false;
- }
- dgvData.Columns.Add(textBoxColum);
- }
- ///工作内容
- DataGridViewTextBoxColumn tempTextBoxColum = new DataGridViewTextBoxColumn();
- tempTextBoxColum.DataPropertyName = "工作内容";
- tempTextBoxColum.Name = "工作内容";
- tempTextBoxColum.HeaderText = "工作内容";
- tempTextBoxColum.Visible = false;
- dgvData.Columns.Add(tempTextBoxColum);
- DataRow[] dtRows = dtData.Select(strWhere);
- string keyNumber = "";
- foreach (DataRow dtRow in dtRows)
- {
- DataGridViewRow tempDgvr = this.BindClothDataListByRow(dtRow, "初修");
- if (keyNumber != dtRow["订单编号"].ToString())
- {
- keyNumber = dtRow["订单编号"].ToString();
- }
- else
- {
- tempDgvr.Cells["订单编号"].Value = "";
- tempDgvr.Cells["客户名称"].Value = "";
- tempDgvr.Cells["客户电话"].Value = "";
- tempDgvr.Cells["套系名称"].Value = "";
- tempDgvr.Cells["套系价格"].Value = "";
- }
-
- }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- this.tabControlSelectedIndex();
- }
- }
- /// <summary>
- /// 客户任务
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_ClientServiceTask_Click(object sender, EventArgs e)
- {
- if (this.panelDay.Tag != null)
- {
- this.dgvData.Rows.Clear();
- //this.dgvData2.Rows.Clear();
- Dictionary<string, DataTable> dictData = (Dictionary<string, DataTable>)this.panelDay.Tag;
- DataTable dtData = (DataTable)dictData["dtTaskData"];
- DataRow[] dtRows = dtData.Select("");
- foreach (DataRow dtRow in dtRows)
- { this.PublicTaskRows(dtRow); }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- this.tabControlSelectedIndex();
- }
- }
- /// <summary>
- /// 今日跟踪点击
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_TodayTrack_Click(object sender, EventArgs e)
- {
- if (this.panelDay.Tag != null)
- {
- this.dgvData.Rows.Clear();
- this.dgvData.Columns.Clear();
- string strColumn = "数码编号,订单号,订单类型,客户姓名,客户电话,工作内容,员工姓名,工作时间";
- this.dgvData.DataColumns(strColumn, "数码编号");
- //this.dgvData2.Rows.Clear();
- Dictionary<string, DataTable> dictData = (Dictionary<string, DataTable>)this.panelDay.Tag;
- DataTable dtDataTodayTrack = (DataTable)dictData["dtTodayTrack"];
- DataRow[] dtTodayTrack = dtDataTodayTrack.Select("");
- foreach (DataRow dtRow in dtTodayTrack)
- { this.PublicOrderRows(dtRow); }
- DataTable dtDataTodayHospital = (DataTable)dictData["dtTodayHospital"];
- DataRow[] dtTodayHospital = dtDataTodayHospital.Select("");
- foreach (DataRow dtRow in dtTodayHospital)
- { this.PublicClientRows(dtRow); }
- DataTable dtDataTodayClient = (DataTable)dictData["dtTodayClient"];
- DataRow[] dtTodayClient = dtDataTodayClient.Select("");
- foreach (DataRow dtRow in dtTodayClient)
- { this.PublicClientRows(dtRow); }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- this.tabControlSelectedIndex();
- }
- }
- /// <summary>
- /// 客户节日点击
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_Birthday_Click(object sender, EventArgs e)
- {
- if (this.panelDay.Tag != null)
- {
- this.dgvData.Rows.Clear();
- this.dgvData.Columns.Clear();
- string strColumn = "数码编号,订单号,订单类型,客户姓名,客户电话,工作内容,员工姓名,工作时间";
- this.dgvData.DataColumns(strColumn, "数码编号");
- //this.dgvData2.Rows.Clear();
- LYFZ.ComponentLibrary.LabelEx lbl = (LYFZ.ComponentLibrary.LabelEx)sender;
- string[] StrArray = lbl.Name.Trim().Split('_');
- Dictionary<string, DataTable> dictData = (Dictionary<string, DataTable>)this.panelDay.Tag;
- DataTable dtData = (DataTable)dictData["dtClient"];
- DataRow[] dtTodayTrack = dtData.Select("工作内容='" + this.GetWorkContent(StrArray[1]) + "'");
- foreach (DataRow dtRow in dtTodayTrack)
- { this.PublicClientRows(dtRow); }
- this.dgvData.ClearSelection();
- //this.dgvData2.ClearSelection();
- this.tabControlSelectedIndex();
- }
- }
- void tabControlSelectedIndex()
- {
- if (this.dgvData.Rows.Count > 0)
- { this.tabControlEx1.SelectedIndex = 0; }
- //else if (this.dgvData2.Rows.Count > 0)
- //{ this.tabControlEx1.SelectedIndex = 1; }
- else
- { this.tabControlEx1.SelectedIndex = 0; }
- }
- bool IsGoPages = false;
- Form frmGoPages = null;
- /// <summary>
- /// 选择后去完成任务
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
- { this.dgvCellDoubleClick(this.dgvData, e); }
- /// <summary>
- /// 选择后去完成任务
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData2_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
- {
- //this.dgvCellDoubleClick(this.dgvData2, e);
- }
- /// <summary>
- /// 我的任务双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData3_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
- {
- if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
- {
- LYFZ.Software.MainBusiness.OAShopManagement.frmTeskView frm1 = new OAShopManagement.frmTeskView();
- frm1.TeskRow = this.dgvData3.Rows[e.RowIndex];
- frm1.Owner = this;
- frm1.ShowDialog();
- if (frm1.IsSaveed)
- { }
- }
- }
- /// <summary>
- /// 选择后去完成任务
- /// </summary>
- /// <param name="dgv"></param>
- void dgvCellDoubleClick(DataGridViewEc dgv, DataGridViewCellEventArgs e)
- {
- if (e.ColumnIndex >= 0 && e.RowIndex >= 0)
- {
- if (dgv.Rows.Count > 0)
- {
- if (dgv.CurrentCell.ColumnIndex >= 0 && dgv.CurrentRow.Index >= 0)
- {
- if (!this.chkCompletedOK.Checked)
- {
- switch (dgv.CurrentRow.Cells["工作内容"].Value.ToString().Trim())
- {
- case "选礼服":
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.SelectDressConfirmSmallForm frm1 = new SmallForm.SelectDressConfirmSmallForm();
- frm1.strViceNumber = dgv.CurrentRow.Cells["数码编号"].Value.ToString().Trim();
- frm1.StartPosition = FormStartPosition.CenterScreen;
- frm1.IsAnPai = true;
- this.frmGoPages = frm1;
- break;
- case "化妆":
- case "化妆助理":
- case "拍摄":
- case "拍摄助理":
- case "引导师":
- case "引导助理":
- LYFZ.Software.MainBusiness.DoorCityProcess.PhotographedFormMain frm2 = new DoorCityProcess.PhotographedFormMain();
- frm2.StrOrdNumber = dgv.CurrentRow.Cells["订单号"].Value.ToString().Trim();
- frm2.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm2.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm2.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- this.frmGoPages = frm2;
- break;
- case "初修":
- LYFZ.Software.MainBusiness.DoorCityProcess.RepairPieceFormMain frm3 = new DoorCityProcess.RepairPieceFormMain();
- frm3.StrOrdNumber = dgv.CurrentRow.Cells["订单号"].Value.ToString().Trim();
- frm3.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm3.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm3.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- this.frmGoPages = frm3;
- break;
- case "选片":
- LYFZ.Software.MainBusiness.DoorCityProcess.FilmSelectionFormMain frm4 = new DoorCityProcess.FilmSelectionFormMain();
- frm4.StrOrdNumber = dgv.CurrentRow.Cells["订单号"].Value.ToString().Trim();
- frm4.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm4.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm4.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- this.frmGoPages = frm4;
- break;
- case "精修":
- LYFZ.Software.MainBusiness.DoorCityProcess.RefinedRepairFormMain frm5 = new DoorCityProcess.RefinedRepairFormMain();
- frm5.StrOrdNumber = dgv.CurrentRow.Cells["订单号"].Value.ToString().Trim();
- frm5.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm5.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm5.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- this.frmGoPages = frm5;
- break;
- case "设计":
- case "看设计":
- LYFZ.Software.MainBusiness.DoorCityProcess.DesignFormMain frm6 = new DoorCityProcess.DesignFormMain();
- frm6.StrOrdNumber = dgv.CurrentRow.Cells["订单号"].Value.ToString().Trim();
- frm6.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm6.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm6.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- this.frmGoPages = frm6;
- break;
- case "发片师":
- case "取件":
- LYFZ.Software.MainBusiness.DoorCityProcess.TotakePieceFormMain frm7 = new DoorCityProcess.TotakePieceFormMain();
- frm7.StrOrdNumber = dgv.CurrentRow.Cells["订单号"].Value.ToString().Trim();
- frm7.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm7.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm7.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- this.frmGoPages = frm7;
- break;
- case "服务人员":
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.WeddingReservationSmallForm frm8 = new SmallForm.WeddingReservationSmallForm();
- frm8.OrdNumber = dgv.CurrentRow.Cells["订单号"].Value.ToString().Trim();
- this.frmGoPages = frm8;
- break;
- }
- if (this.frmGoPages != null)
- {
- this.IsGoPages = true;
- this.Close();
- }
- }
- }
- }
- }
- }
- /// <summary>
- /// 选项卡选择事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void tabControlEx1_SelectedIndexChanged(object sender, EventArgs e)
- {
- switch (this.tabControlEx1.SelectedTab.Name.Trim())
- {
- case "tabPage1":
- case "tabPage2":
- this.chkAllUserWork.Visible = true;
- this.chkCompletedTimeOut.Visible = true;
- this.chkCompletedOK.Visible = true;
- this.chkCompletedNot.Visible = true;
- this.lblMyTaskCount.BackColor = System.Drawing.Color.FromArgb(220, 224, 253);
- this.lblMyTaskCount.Location = new Point(this.lblMyTaskCount.Location.X, 51);
- break;
- case "tabPage3":
- this.chkAllUserWork.Visible = false;
- this.chkCompletedTimeOut.Visible = false;
- this.chkCompletedOK.Visible = false;
- this.chkCompletedNot.Visible = false;
- this.lblMyTaskCount.BackColor = System.Drawing.Color.FromArgb(255, 255, 255);
- this.lblMyTaskCount.Location = new Point(this.lblMyTaskCount.Location.X, 52);
- break;
- }
- }
- /// <summary>
- /// 窗体关闭生事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void MyWorkRemindFormMain_FormClosed(object sender, FormClosedEventArgs e)
- {
- if (this.IsGoPages)
- { frmGoPages.Show(); }
- }
- /// <summary>
- /// 点击我的任务数量
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lblMyTaskCount_Click(object sender, EventArgs e)
- {
- // this.tabControlEx1.SelectedIndex = 2;
- }
-
- }
- }
|