123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902 |
- 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;
- using System.Web.UI.WebControls;
- namespace LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction
- {
- public partial class FrmSatisfactionInvestigation : LYFZ.Software.UI.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation
- {
- public string StrID;
- public string Ord_Number;
- public string Ord_Number_Deputy;
- public string CustomerName;
- public string Type;
- public string fw1;
- public string fw2;
- public bool bl;
- LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
- LYFZ.BLL.BLL_ErpUser userbll = new BLL.BLL_ErpUser();
- LYFZ.BLL.BLL_AllViewSet vsbll = new BLL.BLL_AllViewSet();
- LYFZ.BLL.BLL_ErpSatisfactionSurvey sfsbll = new BLL.BLL_ErpSatisfactionSurvey();
- LYFZ.BLL.BLL_ErpSatisfactionRatingSet sfrsbll = new BLL.BLL_ErpSatisfactionRatingSet();
- LYFZ.BLL.BLL_ErpSatisfactionSurveySet sfssbll = new BLL.BLL_ErpSatisfactionSurveySet();
- LYFZ.BLL.BLL_ErpSatisfactionReturningMattersSet srmsbll = new BLL.BLL_ErpSatisfactionReturningMattersSet();
- public FrmSatisfactionInvestigation()
- { this.FormClosed += FrmSatisfactionInvestigation_FormClosed; }
- void FrmSatisfactionInvestigation_FormClosed(object sender, FormClosedEventArgs e)
- {
- if (bl)
- { this.DialogResult = DialogResult.OK; }
- }
-
-
-
-
-
- protected override void FrmSatisfactionInvestigation_Shown(object sender, EventArgs e)
- {
- if (!string.IsNullOrEmpty(this.Ord_Number))
- { this.label4.Text = "当前客户:(" + this.Ord_Number + "," + this.CustomerName + ")"; }
- DataTable dt = new DataTable();
- if (this.Type == "0")
- {
- dt = sfssbll.GetList("Sfss_Type=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- this.cmbObject.DataSource = dt;
- this.cmbObject.ValueMember = "ID";
- this.cmbObject.DisplayMember = "Sfss_Name";
- }
- }
- else if (this.Type == "1")
- {
- dt = sfssbll.GetList("Sfss_Type=1").Tables[0];
- if (dt.Rows.Count > 0)
- {
- this.cmbObject.DataSource = dt;
- this.cmbObject.ValueMember = "ID";
- this.cmbObject.DisplayMember = "Sfss_Name";
- }
- }
- else if (this.Type == "2")
- {
- dt = sfssbll.GetList("Sfss_Type=2", "id asc").Tables[0];
- if (dt.Rows.Count > 0)
- {
- this.cmbObject.DataSource = dt;
- this.cmbObject.ValueMember = "ID";
- this.cmbObject.DisplayMember = "Sfss_Name";
- }
- }
- else if (this.Type == "3")
- {
- dt = sfssbll.GetList("Sfss_Type=3", "id asc").Tables[0];
- if (dt.Rows.Count > 0)
- {
- this.cmbObject.DataSource = dt;
- this.cmbObject.ValueMember = "ID";
- this.cmbObject.DisplayMember = "Sfss_Name";
- }
- }
- else if (this.Type == "4")
- {
- dt = sfssbll.GetList("Sfss_Type=4", "id asc").Tables[0];
- if (dt.Rows.Count > 0)
- {
- this.cmbObject.DataSource = dt;
- this.cmbObject.ValueMember = "ID";
- this.cmbObject.DisplayMember = "Sfss_Name";
- }
- }
- else if (this.Type == "5")
- {
- this.cmbObject.Items.Add("近期取件");
- this.cmbObject.SelectedIndex = 0;
- }
- else if (this.Type == "6")
- {
- this.cmbObject.Items.Add("近期服务");
- this.cmbObject.SelectedIndex = 0;
- }
- else if (this.Type == "7")
- {
- this.cmbObject.Items.Add("其它调查");
- this.cmbObject.SelectedIndex = 0;
- }
- }
-
-
-
-
-
- protected override void cmbObject_SelectedIndexChanged(object sender, EventArgs e)
- {
- this.dgv2.Rows.Clear();
- if (!string.IsNullOrEmpty(this.cmbObject.Text))
- { this.BindReturningItems(); }
- }
-
-
-
- public void BindReturningItems()
- {
- this.dgv2.ClearSelection();
- this.dgv1.Rows.Clear();
- DataTable dt = new DataTable();
- #region 订单
- if (this.cmbObject.Text.ToString() == "接单门市")
- {
- dt = orbll.GetView_Custom("tb_ErpOrder", StrWhere: "Ord_Number = '" + this.Ord_Number + "'", ShowColumnName: "Ord_OrderPersonNumber").Tables[0];
- if (dt.Rows.Count > 0)
- {
- string[] Ord_OrdersPersonID = dt.Rows[0]["Ord_OrderPersonNumber"].ToString().TrimStart(',').Split(',');
- if (Ord_OrdersPersonID.Length > 0)
- {
- if (!string.IsNullOrEmpty(Ord_OrdersPersonID[0]))
- {
- for (int i = 0; i < Ord_OrdersPersonID.Length; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_Type=0 and Sfs_EmployeeID='" + Ord_OrdersPersonID[i] + "'").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = Ord_OrdersPersonID[i];
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = userbll.GetUserName(Ord_OrdersPersonID[i]);
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- }
- this.dgv1.ClearSelection();
- }
- }
- }
- }
- #endregion
- #region 选衣
- if (this.cmbObject.Text.ToString() == "礼服师")
- {
- dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 礼服师ID!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=1 and Sfs_EmployeeID='" + dt.Rows[0]["礼服师ID"].ToString() + "'").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["礼服师ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["礼服师"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- }
- #endregion
- #region 拍照
- #region 拍照摄影师
- if (this.cmbObject.Text.ToString() == "摄影师")
- {
- dt = vsbll.Vw_OrdersWagePhotography(" and Ordpg_ViceNumber='" + this.Ord_Number_Deputy + "' and 摄影师id!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + dt.Rows[0]["摄影师ID"].ToString() + "' and Sfs_SurveySetID=3").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["摄影师ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["摄影师名称"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- }
- #endregion
- #region 拍照摄影助理
- if (this.cmbObject.Text.ToString() == "摄影助理")
- {
- dt = vsbll.Vw_OrdersWagePhotography(" and Ordpg_ViceNumber='" + this.Ord_Number_Deputy + "' and 摄影助理ID!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + dt.Rows[0]["摄影助理ID"].ToString() + "' and Sfs_SurveySetID=4").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["摄影助理ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["摄影助理名称"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- else
- { this.dgv1.Rows.Clear(); }
- }
- #endregion
- #region 拍照化妆师
- if (this.cmbObject.Text.ToString() == "化妆师")
- {
- dt = vsbll.Vw_OrdersWagePhotography(" and Ordpg_ViceNumber='" + this.Ord_Number_Deputy + "' and 化妆师ID!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + dt.Rows[0]["化妆师ID"].ToString() + "' and Sfs_SurveySetID=5").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["化妆师ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["化妆师名称"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- else
- { this.dgv1.Rows.Clear(); }
- }
- #endregion
- #region 拍照化妆助理
- if (this.cmbObject.Text.ToString() == "化妆助理")
- {
- dt = vsbll.Vw_OrdersWagePhotography(" and Ordpg_ViceNumber='" + this.Ord_Number_Deputy + "' and 化妆助理ID!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + dt.Rows[0]["化妆助理ID"].ToString() + "' and Sfs_SurveySetID=6").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["化妆助理ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["化妆助理名称"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- else
- { this.dgv1.Rows.Clear(); }
- }
- #endregion
- #region 拍照引导师
- if (this.cmbObject.Text.ToString() == "引导师")
- {
- dt = vsbll.Vw_OrdersWagePhotography(" and Ordpg_ViceNumber='" + this.Ord_Number_Deputy + "' and 引导师ID!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + dt.Rows[0]["引导师ID"].ToString() + "' and Sfs_SurveySetID=7").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["引导师ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["引导师名称"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- else
- { this.dgv1.Rows.Clear(); }
- }
- #endregion
- #endregion
- #region 选片
- #region 选片师
- if (this.cmbObject.Text.ToString() == "选片师")
- {
- dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 选片师ID!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=3 and Sfs_EmployeeID='" + dt.Rows[0]["选片师ID"].ToString() + "' and Sfs_SurveySetID=8").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["选片师ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["选片师"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- }
- #endregion
- #region 初修师
- if (this.cmbObject.Text.ToString() == "初修师")
- {
- dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 初修师ID!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=3 and Sfs_EmployeeID='" + dt.Rows[0]["初修师ID"].ToString() + "' and Sfs_SurveySetID=9").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["初修师ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["初修师"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- }
- #endregion
- #region 精修师
- if (this.cmbObject.Text.ToString() == "精修师")
- {
- dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 精修师ID!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=3 and Sfs_EmployeeID='" + dt.Rows[0]["精修师ID"].ToString() + "' and Sfs_SurveySetID=10").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["精修师ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["精修师"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- }
- #endregion
- #endregion
- #region 看样
- #region 看设计师
- if (this.cmbObject.Text.ToString() == "看设计师")
- {
- dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 看设计师ID!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=4 and Sfs_EmployeeID='" + dt.Rows[0]["看设计师ID"].ToString() + "' and Sfs_SurveySetID=11").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["看设计师ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["看设计师"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- }
- #endregion
- #region 设计师
- if (this.cmbObject.Text.ToString() == "设计师")
- {
- dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 设计师ID!=''").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=4 and Sfs_EmployeeID='" + dt.Rows[0]["设计师ID"].ToString() + "' and Sfs_SurveySetID=12").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[0]["设计师ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[0]["设计师"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- }
- #endregion
- #endregion
- #region 取件
- if (this.cmbObject.Text == "近期取件")
- {
- dt = sfssbll.GetList("Sfss_Type=5").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=5 and Sfs_SurveySetID=" + dt.Rows[i]["ID"].ToString() + "").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfss_Name"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- }
- }
- #endregion
- #region 服务
- if (this.cmbObject.Text == "近期服务")
- {
- dt = sfssbll.GetList("Sfss_Type=6", "Id asc").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_Type=6 and Sfs_SurveySetID=" + dt.Rows[i]["ID"].ToString() + "").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfss_Name"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- }
- }
- #endregion
- #region 其它调查
- if (this.cmbObject.Text == "其它调查")
- {
- dt = sfssbll.GetList("Sfss_Type=7").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_Type=7 and Sfs_SurveySetID=" + dt.Rows[i]["ID"].ToString() + "").Tables[0];
- if (dtColour.Rows.Count > 0)
- { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
- else
- { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfss_Name"].ToString();
- dgvr.Cells.Add(cell);
- this.dgv1.Rows.Add(dgvr);
- this.dgv1.ClearSelection();
- }
- }
- }
- #endregion
- }
-
-
-
-
-
- protected override void dgv1_Click(object sender, EventArgs e)
- {
- try
- {
- if (this.dgv1.SelectedRows.Count > 0)
- {
- DataTable dt1 = sfrsbll.GetAllList("id asc").Tables[0];
- if (dt1.Rows.Count > 0)
- {
- this.cmSfrs_Scores.DataSource = dt1;
- this.cmSfrs_Scores.ValueMember = "Id";
- this.cmSfrs_Scores.DisplayMember = "Sfrs_Name";
- this.cmSfrs_Scores.SelectedIndex = -1;
- }
- this.dgv2.Rows.Clear();
- DataTable dt = new DataTable();
- #region 订单
- if (this.cmbObject.Text == "接单门市")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=1 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_Type=0 and Sfs_ReturningMattersSetID = '" + dt.Rows[i]["ID"].ToString() + "' and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "'").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[0]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[0]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[0]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[0]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[0]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #region 礼服师
- if (this.cmbObject.Text == "礼服师")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=2 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=1 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "'").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this. dgv2.ClearSelection();
- }
- }
- #endregion
- #region 拍照
- #region 摄影师
- if (this.cmbObject.Text == "摄影师")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=3 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=3").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #region 摄影助理
- if (this.cmbObject.Text == "摄影助理")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=4 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=4").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #region 化妆师
- if (this.cmbObject.Text == "化妆师")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=5 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=5").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #region 化妆助理
- if (this.cmbObject.Text == "化妆助理")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=6 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=6").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #region 引导师
- if (this.cmbObject.Text == "引导师")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=7 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=7").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #endregion
- #region 选片
- #region 选片师
- if (this.cmbObject.Text == "选片师")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=8 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=3 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=8").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #region 初修师
- if (this.cmbObject.Text == "初修师")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=9 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=3 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=9").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #region 精修师
- if (this.cmbObject.Text == "精修师")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=10 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=3 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=10").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #endregion
- #region 看样
- #region 看设计师
- if (this.cmbObject.Text == "看设计师")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=11 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=4 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=11").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #region 设计师
- if (this.cmbObject.Text == "设计师")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=12 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=4 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=12").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #endregion
- #region 取件
- if (this.cmbObject.Text == "近期取件")
- {
- #region 产品满意度
- if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "13")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=13 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=5 and Sfs_SurveySetID=13").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #region 进度满意度
- if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "14")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=14 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=5 and Sfs_SurveySetID=14").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- }
- #endregion
- #region 服务
- if (this.cmbObject.Text == "近期服务")
- {
- #region 服务人员1
- if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "15")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=15 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_EmployeeID='" + this.fw1 + "' and Sfs_Type=6 and Sfs_SurveySetID=15").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- #region 服务人员2
- if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "16")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=16 and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_EmployeeID='" + this.fw2 + "' and Sfs_Type=6 and Sfs_SurveySetID=16").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- }
- #endregion
- #region 其它调查
- if (this.cmbObject.Text == "其它调查")
- {
- dt = srmsbll.GetList("Sfrms_SurveySetID=" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + " and Sfrms_EnableStatus=0").Tables[0];
- if (dt.Rows.Count > 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- DataGridViewRow dgvr = new DataGridViewRow();
- DataGridViewCell cell = null;
- DataTable dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_Type=7 and Sfs_SurveySetID=" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "").Tables[0];
- if (dtOk.Rows.Count > 0)
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
- dgvr.Cells.Add(cell);
- }
- else
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = "";
- dgvr.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = dt.Rows[i]["ID"].ToString();
- dgvr.Cells.Add(cell);
- }
- this.dgv2.Rows.Add(dgvr);
- }
- this.dgv2.ClearSelection();
- }
- }
- #endregion
- }
- }
- catch (Exception ex)
- { MessageBoxCustom.Show(ex.Message); }
- }
-
-
-
-
-
- protected override void btnSave_Click(object sender, EventArgs e)
- {
- try
- {
-
- if (string.IsNullOrEmpty(this.cmbObject.Text))
- { MessageBoxCustom.Show("请选择回访对象!"); return; }
- if (this.dgv1.SelectedRows.Count == 0)
- { MessageBoxCustom.Show("请选择调查对象!"); return; }
- if (this.dgv2.Rows.Count <= 0)
- { MessageBoxCustom.Show("请设置回访对象或者满意度!"); return; }
- if (this.dgv2.Rows.Count > 0)
- {
- for (int i = 0; i < this.dgv2.Rows.Count; i++)
- {
- if (string.IsNullOrEmpty(this.dgv2.Rows[i].Cells["Sfrs_Scores"].Value.ToString()))
- { MessageBoxCustom.Show("满意度不能为空,请选择满意度!"); return; }
- }
- }
- #region 判断是否已经调查过
- DataTable dtOk = new DataTable();
-
- if (this.Type == "0")
- {
- dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_Type=0 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "'").Tables[0];
- if (dtOk.Rows.Count > 0)
- { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
- }
-
- if (this.Type == "1")
- {
- dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=1 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "'").Tables[0];
- if (dtOk.Rows.Count > 0)
- { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
- }
-
- if (this.Type == "2")
- {
- if (this.cmbObject.Text == "摄影师")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=3").Tables[0]; }
- if (this.cmbObject.Text == "摄影助理")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=4").Tables[0]; }
- if (this.cmbObject.Text == "化妆师")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=5").Tables[0]; }
- if (this.cmbObject.Text == "化妆助理")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=6").Tables[0]; }
- if (this.cmbObject.Text == "引导师")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=2 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=7").Tables[0]; }
- if (dtOk.Rows.Count > 0)
- { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
- }
-
- if (this.Type == "3")
- {
- if (this.cmbObject.Text == "选片师")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=3 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=8").Tables[0]; }
- if (this.cmbObject.Text == "初修师")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=3 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=9").Tables[0]; }
- if (this.cmbObject.Text == "精修师")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=3 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=10").Tables[0]; }
- if (dtOk.Rows.Count > 0)
- { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
- }
-
- if (this.Type == "4")
- {
- if (this.cmbObject.Text == "看设计师")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=4 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=11").Tables[0]; }
- if (this.cmbObject.Text == "设计师")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=4 and Sfs_EmployeeID='" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "' and Sfs_SurveySetID=12").Tables[0]; }
- if (dtOk.Rows.Count > 0)
- { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
- }
-
- if (this.Type == "5")
- {
- if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "13")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=5 and Sfs_SurveySetID=13").Tables[0]; }
- if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "14")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_OrderNumberDeputy='" + this.Ord_Number_Deputy + "' and Sfs_Type=5 and Sfs_SurveySetID=14").Tables[0]; }
- if (dtOk.Rows.Count > 0)
- { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
- }
-
- if (this.Type == "6")
- {
- if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "15")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_EmployeeID='" + fw1 + "' and Sfs_Type=6 and Sfs_SurveySetID=15").Tables[0]; }
- if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "16")
- { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_EmployeeID='" + fw2 + "' and Sfs_Type=6 and Sfs_SurveySetID=16").Tables[0]; }
- if (dtOk.Rows.Count > 0)
- { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
- }
-
- if (this.Type == "7")
- {
- dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_Type=7 and Sfs_SurveySetID=" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + "").Tables[0];
- if (dtOk.Rows.Count > 0)
- { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
- }
- #endregion
- #region 保存
- if (this.dgv2.Rows.Count > 0)
- {
- DateTime StrTime = SDateTime.Now;
- string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- List<Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- LYFZ.Model.Model_ErpSatisfactionSurvey model = null;
- for (int i = 0; i < this.dgv2.Rows.Count; i++)
- {
- model = new Model.Model_ErpSatisfactionSurvey();
- model.Sfs_OrderNumber = this.Ord_Number;
-
- if (this.Type == "0")
- {
- model.Sfs_OrderNumberDeputy = "";
- model.Sfs_EmployeeID = this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString();
- model.Sfs_Type = 0;
- model.Sfs_SurveySetID = Convert.ToInt32(this.cmbObject.SelectedValue);
- }
-
- if (this.Type == "1")
- {
- model.Sfs_OrderNumberDeputy = this.Ord_Number_Deputy;
- model.Sfs_EmployeeID = this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString();
- model.Sfs_Type = 1;
- model.Sfs_SurveySetID = Convert.ToInt32(this.cmbObject.SelectedValue);
- }
-
- if (this.Type == "2")
- {
- model.Sfs_OrderNumberDeputy = this.Ord_Number_Deputy;
- model.Sfs_EmployeeID = this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString();
- model.Sfs_Type = 2;
- model.Sfs_SurveySetID = Convert.ToInt32(this.cmbObject.SelectedValue);
- }
-
- if (this.Type == "3")
- {
- model.Sfs_OrderNumberDeputy = this.Ord_Number_Deputy;
- model.Sfs_EmployeeID = this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString();
- model.Sfs_Type = 3;
- model.Sfs_SurveySetID = Convert.ToInt32(this.cmbObject.SelectedValue);
- }
-
- if (this.Type == "4")
- {
- model.Sfs_OrderNumberDeputy = this.Ord_Number_Deputy;
- model.Sfs_EmployeeID = this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString();
- model.Sfs_Type = 4;
- model.Sfs_SurveySetID = Convert.ToInt32(this.cmbObject.SelectedValue);
- }
-
- if (this.Type == "5")
- {
- model.Sfs_OrderNumberDeputy = this.Ord_Number_Deputy;
- model.Sfs_EmployeeID = "";
- model.Sfs_Type = 5;
- model.Sfs_SurveySetID = Convert.ToInt32(this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString());
- }
-
- if (this.Type == "6")
- {
- model.Sfs_OrderNumberDeputy = "";
- if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "15")
- { model.Sfs_EmployeeID = this.fw1; }
- if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "16")
- { model.Sfs_EmployeeID = this.fw2; }
- model.Sfs_Type = 6;
- model.Sfs_SurveySetID = Convert.ToInt32(this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString());
- }
-
- if (this.Type == "7")
- {
- model.Sfs_OrderNumberDeputy = "";
- model.Sfs_EmployeeID = "";
- model.Sfs_Type = 7;
- model.Sfs_SurveySetID = Convert.ToInt32(this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString());
- }
- model.Sfs_ReturningMattersSetID = Convert.ToInt32(this.dgv2.Rows[i].Cells["Sfs_ReturningMattersSetID"].Value);
- model.Sfs_RatingSetID = sfrsbll.GetID(this.dgv2.Rows[i].Cells["Sfrs_Scores"].Value.ToString());
- model.Sfs_Remark = this.dgv2.Rows[i].Cells["Remark"].Value.ToString();
- model.Sfs_CreateTime = StrTime;
- model.Sfs_CreateName = StrUserID;
- clist.Add(sfsbll.GetAddCommandInfo(model));
- }
- if (clist.Count > 0)
- {
- if (LYFZ.BLL.BaseBllOperate.ExecuteSqlTran(clist) <= 0)
- { MessageBoxCustom.Show("保存失败!"); return; }
- MessageBoxCustom.Show("保存成功!");
- this.bl = true;
- this.BindReturningItems();
- }
- }
- #endregion
- }
- catch (Exception ex)
- { MessageBoxCustom.Show(ex.Message); }
- }
-
-
-
-
-
- protected override void cmSfrs_Scores_SelectedIndexChanged(object sender, EventArgs e)
- {
- try
- {
- DataTable dt = new DataTable();
- for (int i = 0; i < dgv2.SelectedRows.Count; i++)
- {
- dgv2.SelectedRows[i].Cells["Sfrs_Scores"].Value = cmSfrs_Scores.Text;
- dt = sfrsbll.GetList("Sfrs_Name='" + dgv2.SelectedRows[i].Cells["Sfrs_Scores"].Value + "'").Tables[0];
- if (dt.Rows.Count > 0)
- { dgv2.SelectedRows[i].Cells["满意分值"].Value = dt.Rows[0]["Sfrs_Scores"].ToString(); }
- }
- }
- catch (Exception ex)
- { MessageBoxCustom.Show(ex.Message); }
- }
-
-
-
-
-
- protected override void dgv2_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
- {
- if (this.dgv2.Rows.Count > 0)
- {
- if (this.dgv2.CurrentCell.ColumnIndex == this.dgv2.Columns["Sfrs_Scores"].Index)
- {
- DataGridViewCell cell = this.dgv2.Rows[e.RowIndex].Cells[e.ColumnIndex];
- Rectangle rect = this.dgv2.GetCellDisplayRectangle(cell.ColumnIndex, cell.RowIndex, true);
- this.cmSfrs_Scores.Location = new Point(rect.Location.X + this.dgv2.Location.X, rect.Location.Y + this.dgv2.Location.Y + 1);
- this.cmSfrs_Scores.Size = rect.Size;
- if (cell.Value != null)
- { this.cmSfrs_Scores.Text = (string)cell.Value; }
- this.cmSfrs_Scores.Visible = true;
- this.cmSfrs_Scores.Focus();
- }
- }
- }
-
-
-
-
-
- protected override void cmSfrs_Scores_Leave(object sender, EventArgs e)
- {
- this.dgv2.CurrentRow.Cells["Sfrs_Scores"].Value = this.cmSfrs_Scores.Text.Trim();
- this.cmSfrs_Scores.Visible = false;
- }
-
-
-
-
-
- protected override void btnClose_Click(object sender, EventArgs e)
- { this.Close(); }
- }
- }
|