123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- using System;
- 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 frmPerturbedController : LYFZ.Software.UI.CameraControlBook.frmPerturbedController
- {
- BLL.BLL_ErpOrderDigital orderDigitalBll = new BLL.BLL_ErpOrderDigital();
- public frmPerturbedController()
- {
-
- this.Load += FrmPerturbedController_Load;
- this.btnSearch.Click += BtnSearch_Click;
- }
- private void FrmPerturbedController_Load(object sender, EventArgs e)
- {
- //PublicDataRows();
- // 部门人员绑定
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_DepartmentAndEmployee(this.cmbEmployeeName, IsFirstNodeNull: true, IsFirstNodeName: "全部", IsShowResign: false, IsShowAdmin: true, tb_User: LYFZ.DAL.DAL_ErpUser.SimpleUserDataTable);
- this.cmbEmployeeName.TagFindText(LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID);
- }
- void PublicDataRows()
- {
- dgvUnarranged.Rows.Clear();
- dgvArranged.Rows.Clear();
- string dataValue = this.cmbEmployeeName.Tag.ToString();
- DataTable arrangeTable = orderDigitalBll.GetErpOrderDigitalNotArrange(tbSearchText.Text,dtpStartDate.Text, dtpEndDate.Text, dataValue);
- BindNotArrangeData(arrangeTable);
- BindArrangeData(arrangeTable);
- }
- void BindArrangeData(DataTable arrangeTable)
- {
- foreach (DataRow dr in arrangeTable.Rows)
- {
-
- string funcName = "";
- if (string.IsNullOrEmpty(dr["Ordpg_PhotographyTime"].ToString_s()) && !string.IsNullOrEmpty(dr["Ordpg_ReservationPhotographyTime"].ToString_s()))
- {
- if (rdoPhotographed.Checked||rdoAll.Checked)
- {
- string StrRowValue = dr["Ordpg_Dispatcher"].ToString_s().Trim();
- if (!string.IsNullOrEmpty(StrRowValue))
- {
- DataRow dtRows = LYFZ.DAL.DAL_ErpUser.SimpleUserDataTable.Rows.Find(StrRowValue);
- if (dtRows != null)
- {
- StrRowValue = dtRows["User_Name"].ToString().Trim();
- }
- else
- {
- StrRowValue = "";
- }
- }
- BindArrangeDataRowData(dr, "拍照已安排未完成", dr["Ordpg_ReservationPhotographyTime"].ToString_s(), StrRowValue, dr["Ordpg_DispatchTime"].ToString_s());
- }
- }
- if (!string.IsNullOrEmpty(dr["Ordv_ReservationFilmSelectionTime"].ToString_s()) && string.IsNullOrEmpty(dr["Ordv_FilmSelectionTime"].ToString_s()))
- {
- if (rdoFilmSelection.Checked || rdoAll.Checked)
- {
- string StrRowValue = dr["Ordv_FilmSelectionDispatcher"].ToString_s().Trim();
- if (!string.IsNullOrEmpty(StrRowValue))
- {
- DataRow dtRows = LYFZ.DAL.DAL_ErpUser.SimpleUserDataTable.Rows.Find(StrRowValue);
- if (dtRows != null)
- {
- StrRowValue = dtRows["User_Name"].ToString().Trim();
- }
- else
- {
- StrRowValue = "";
- }
- }
- BindArrangeDataRowData(dr, "选片已安排未完成", dr["Ordv_ReservationFilmSelectionTime"].ToString_s(), StrRowValue, dr["Ordv_FilmSelectionDispatchTime"].ToString_s());
- }
- }
- if (!string.IsNullOrEmpty(dr["Ordv_ReservationLookDesignTime"].ToString_s()) && string.IsNullOrEmpty(dr["Ordv_LookDesignTime"].ToString_s()))
- {
- if (rdoLookDesign.Checked || rdoAll.Checked)
- {
- string StrRowValue = dr["Ordv_LookDesignDispatcher"].ToString_s().Trim();
- if (!string.IsNullOrEmpty(StrRowValue))
- {
- DataRow dtRows = LYFZ.DAL.DAL_ErpUser.SimpleUserDataTable.Rows.Find(StrRowValue);
- if (dtRows != null)
- {
- StrRowValue = dtRows["User_Name"].ToString().Trim();
- }
- else
- {
- StrRowValue = "";
- }
- }
- BindArrangeDataRowData(dr, "看版已安排未完成", dr["Ordv_ReservationLookDesignTime"].ToString_s(), StrRowValue, dr["Ordv_LookDesignDispatchTime"].ToString_s());
- }
- }
- if (!string.IsNullOrEmpty(dr["Ordv_ReservationSendPhotoTime"].ToString_s()) && string.IsNullOrEmpty(dr["Ordv_SendPhotoTime"].ToString_s()))
- {
- if (rdoTotakePiece.Checked|| rdoAll.Checked)
- {
- string StrRowValue = dr["Ordv_SendPhotoDispatcher"].ToString_s().Trim();
- if (!string.IsNullOrEmpty(StrRowValue))
- {
- DataRow dtRows = LYFZ.DAL.DAL_ErpUser.SimpleUserDataTable.Rows.Find(StrRowValue);
- if (dtRows != null)
- {
- StrRowValue = dtRows["User_Name"].ToString().Trim();
- }
- else
- {
- StrRowValue = "";
- }
- }
- BindArrangeDataRowData(dr, "取件已安排未完成", dr["Ordv_ReservationSendPhotoTime"].ToString_s(), StrRowValue, dr["Ordv_SendPhotoDispatchTime"].ToString_s());
- }
- }
- if (!string.IsNullOrEmpty(dr["Ordv_ReservationClothingTime"].ToString_s()) && string.IsNullOrEmpty(dr["Ordv_ClothingTime"].ToString_s()))
- {
- if (rdoSelectDress.Checked || rdoAll.Checked)
- {
- string StrRowValue = dr["Ordv_ClothingDispatcher"].ToString_s().Trim();
- if (!string.IsNullOrEmpty(StrRowValue))
- {
- DataRow dtRows = LYFZ.DAL.DAL_ErpUser.SimpleUserDataTable.Rows.Find(StrRowValue);
- if (dtRows != null)
- {
- StrRowValue = dtRows["User_Name"].ToString().Trim();
- }
- else
- {
- StrRowValue = "";
- }
- }
- BindArrangeDataRowData(dr, "送礼服已安排未完成", dr["Ordv_ReservationClothingTime"].ToString_s(), StrRowValue, dr["Ordv_ClothingDispatchTime"].ToString_s());
- }
- }
-
-
- }
- }
- void BindArrangeDataRowData(DataRow dr ,string msg, string time,string dname, string dtime)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewTextBoxCell cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dr["Ordpg_Number"];
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dr["cus_Name"];
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dr["Cus_Telephone"];
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dr["Ordpg_Sign"]+"("+ msg + ")";
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = time;
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dname;
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dtime;
- dgvArranged.Rows.Add(dgvr);
- }
- void BindNotArrangeData(DataTable arrangeTable)
- {
- foreach (DataRow dr in arrangeTable.Rows)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewTextBoxCell cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dr["Ordpg_Number"];
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dr["cus_Name"];
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dr["Cus_Telephone"];
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dr["Ordpg_Sign"];
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = dr["Ord_CreateDateTime"];
- string funcName = "";
- if (string.IsNullOrEmpty(dr["Ordpg_PhotographyTime"].ToString_s()) && string.IsNullOrEmpty(dr["Ordpg_ReservationPhotographyTime"].ToString_s()))
- {
- if (!string.IsNullOrEmpty(funcName))
- {
- funcName += ",";
- }
- funcName += "未安排拍照";
- }
- if (string.IsNullOrEmpty(dr["Ordv_ReservationFilmSelectionTime"].ToString_s()) && string.IsNullOrEmpty(dr["Ordv_FilmSelectionTime"].ToString_s()))
- {
- if (!string.IsNullOrEmpty(funcName))
- {
- funcName += ",";
- }
- funcName += "未安排选片";
- }
- if (string.IsNullOrEmpty(dr["Ordv_ReservationLookDesignTime"].ToString_s()) && string.IsNullOrEmpty(dr["Ordv_LookDesignTime"].ToString_s()))
- {
- if (!string.IsNullOrEmpty(funcName))
- {
- funcName += ",";
- }
- funcName += "未安排看版";
- }
- if (string.IsNullOrEmpty(dr["Ordv_ReservationSendPhotoTime"].ToString_s()) && string.IsNullOrEmpty(dr["Ordv_SendPhotoTime"].ToString_s()))
- {
- if (!string.IsNullOrEmpty(funcName))
- {
- funcName += ",";
- }
- funcName += "未安排取件";
- }
- if (string.IsNullOrEmpty(dr["Ordv_ReservationClothingTime"].ToString_s()) && string.IsNullOrEmpty(dr["Ordv_ClothingTime"].ToString_s()))
- {
- if (!string.IsNullOrEmpty(funcName))
- {
- funcName += ",";
- }
- funcName += "未安排送礼服";
- }
- if (Convert.ToInt32(dr["serviceCount"].ToString_s()) > 0)
- {
- if (!string.IsNullOrEmpty(funcName))
- {
- funcName += ",";
- }
- funcName += "未安排服务(" + dr["serviceCount"].ToString_s() + ")";
- }
- if(rdoPhotographed.Checked && !funcName.Contains("拍照"))
- {
- continue;
- }
- else if (rdoFilmSelection.Checked && !funcName.Contains("选片"))
- {
- continue;
- }
- else if (rdoLookDesign.Checked && !funcName.Contains("看版"))
- {
- continue;
- }
- else if (rdoTotakePiece.Checked && !funcName.Contains("取件"))
- {
- continue;
- }
- else if (rdoSelectDress.Checked && !funcName.Contains("送礼服"))
- {
- continue;
- }
- if (string.IsNullOrEmpty(funcName))
- {
- continue;
- }
- cell = new DataGridViewTextBoxCell();
- dgvr.Cells.Add(cell);
- cell.Value = funcName;
- dgvUnarranged.Rows.Add(dgvr);
- }
- }
- private void BtnSearch_Click(object sender, EventArgs e)
- {
- PublicDataRows();
- }
- }
- }
|