FrmSatisfactionInvestigation.cs 99 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Web.UI.WebControls;
  10. namespace LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction
  11. {
  12. public partial class FrmSatisfactionInvestigation : LYFZ.Software.UI.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation
  13. {
  14. public string StrID;
  15. public string Ord_Number;
  16. public string Ord_Number_Deputy;
  17. public string CustomerName;
  18. public string Type;
  19. public string fw1;
  20. public string fw2;
  21. public bool bl;
  22. LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
  23. LYFZ.BLL.BLL_ErpUser userbll = new BLL.BLL_ErpUser();
  24. LYFZ.BLL.BLL_AllViewSet vsbll = new BLL.BLL_AllViewSet();
  25. LYFZ.BLL.BLL_ErpSatisfactionSurvey sfsbll = new BLL.BLL_ErpSatisfactionSurvey();
  26. LYFZ.BLL.BLL_ErpSatisfactionRatingSet sfrsbll = new BLL.BLL_ErpSatisfactionRatingSet();
  27. LYFZ.BLL.BLL_ErpSatisfactionSurveySet sfssbll = new BLL.BLL_ErpSatisfactionSurveySet();
  28. LYFZ.BLL.BLL_ErpSatisfactionReturningMattersSet srmsbll = new BLL.BLL_ErpSatisfactionReturningMattersSet();
  29. public FrmSatisfactionInvestigation()
  30. { this.FormClosed += FrmSatisfactionInvestigation_FormClosed; }
  31. void FrmSatisfactionInvestigation_FormClosed(object sender, FormClosedEventArgs e)
  32. {
  33. if (bl)
  34. { this.DialogResult = DialogResult.OK; }
  35. }
  36. /// <summary>
  37. /// 加载
  38. /// </summary>
  39. /// <param name="sender"></param>
  40. /// <param name="e"></param>
  41. protected override void FrmSatisfactionInvestigation_Shown(object sender, EventArgs e)
  42. {
  43. if (!string.IsNullOrEmpty(this.Ord_Number))
  44. { this.label4.Text = "当前客户:(" + this.Ord_Number + "," + this.CustomerName + ")"; }
  45. DataTable dt = new DataTable();
  46. if (this.Type == "0")
  47. {
  48. dt = sfssbll.GetList("Sfss_Type=0").Tables[0];
  49. if (dt.Rows.Count > 0)
  50. {
  51. this.cmbObject.DataSource = dt;
  52. this.cmbObject.ValueMember = "ID";
  53. this.cmbObject.DisplayMember = "Sfss_Name";
  54. }
  55. }
  56. else if (this.Type == "1")
  57. {
  58. dt = sfssbll.GetList("Sfss_Type=1").Tables[0];
  59. if (dt.Rows.Count > 0)
  60. {
  61. this.cmbObject.DataSource = dt;
  62. this.cmbObject.ValueMember = "ID";
  63. this.cmbObject.DisplayMember = "Sfss_Name";
  64. }
  65. }
  66. else if (this.Type == "2")
  67. {
  68. dt = sfssbll.GetList("Sfss_Type=2", "id asc").Tables[0];
  69. if (dt.Rows.Count > 0)
  70. {
  71. this.cmbObject.DataSource = dt;
  72. this.cmbObject.ValueMember = "ID";
  73. this.cmbObject.DisplayMember = "Sfss_Name";
  74. }
  75. }
  76. else if (this.Type == "3")
  77. {
  78. dt = sfssbll.GetList("Sfss_Type=3", "id asc").Tables[0];
  79. if (dt.Rows.Count > 0)
  80. {
  81. this.cmbObject.DataSource = dt;
  82. this.cmbObject.ValueMember = "ID";
  83. this.cmbObject.DisplayMember = "Sfss_Name";
  84. }
  85. }
  86. else if (this.Type == "4")
  87. {
  88. dt = sfssbll.GetList("Sfss_Type=4", "id asc").Tables[0];
  89. if (dt.Rows.Count > 0)
  90. {
  91. this.cmbObject.DataSource = dt;
  92. this.cmbObject.ValueMember = "ID";
  93. this.cmbObject.DisplayMember = "Sfss_Name";
  94. }
  95. }
  96. else if (this.Type == "5")
  97. {
  98. this.cmbObject.Items.Add("近期取件");
  99. this.cmbObject.SelectedIndex = 0;
  100. }
  101. else if (this.Type == "6")
  102. {
  103. this.cmbObject.Items.Add("近期服务");
  104. this.cmbObject.SelectedIndex = 0;
  105. }
  106. else if (this.Type == "7")
  107. {
  108. this.cmbObject.Items.Add("其它调查");
  109. this.cmbObject.SelectedIndex = 0;
  110. }
  111. }
  112. /// <summary>
  113. /// 回访对象事件
  114. /// </summary>
  115. /// <param name="sender"></param>
  116. /// <param name="e"></param>
  117. protected override void cmbObject_SelectedIndexChanged(object sender, EventArgs e)
  118. {
  119. this.dgv2.Rows.Clear();
  120. if (!string.IsNullOrEmpty(this.cmbObject.Text))
  121. { this.BindReturningItems(); }
  122. }
  123. /// <summary>
  124. /// 回访事项
  125. /// </summary>
  126. public void BindReturningItems()
  127. {
  128. this.dgv2.ClearSelection();
  129. this.dgv1.Rows.Clear();
  130. DataTable dt = new DataTable();
  131. #region 订单
  132. if (this.cmbObject.Text.ToString() == "接单门市")
  133. {
  134. dt = orbll.GetView_Custom("tb_ErpOrder", StrWhere: "Ord_Number = '" + this.Ord_Number + "'", ShowColumnName: "Ord_OrderPersonNumber").Tables[0];
  135. if (dt.Rows.Count > 0)
  136. {
  137. string[] Ord_OrdersPersonID = dt.Rows[0]["Ord_OrderPersonNumber"].ToString().TrimStart(',').Split(',');
  138. if (Ord_OrdersPersonID.Length > 0)
  139. {
  140. if (!string.IsNullOrEmpty(Ord_OrdersPersonID[0]))
  141. {
  142. for (int i = 0; i < Ord_OrdersPersonID.Length; i++)
  143. {
  144. DataGridViewRow dgvr = new DataGridViewRow();
  145. DataGridViewCell cell = null;
  146. cell = new DataGridViewTextBoxCell();
  147. DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_Type=0 and Sfs_EmployeeID='" + Ord_OrdersPersonID[i] + "'").Tables[0];
  148. if (dtColour.Rows.Count > 0)
  149. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  150. else
  151. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  152. cell.Value = Ord_OrdersPersonID[i];
  153. dgvr.Cells.Add(cell);
  154. cell = new DataGridViewTextBoxCell();
  155. cell.Value = userbll.GetUserName(Ord_OrdersPersonID[i]);
  156. dgvr.Cells.Add(cell);
  157. this.dgv1.Rows.Add(dgvr);
  158. }
  159. this.dgv1.ClearSelection();
  160. }
  161. }
  162. }
  163. }
  164. #endregion
  165. #region 选衣
  166. if (this.cmbObject.Text.ToString() == "礼服师")
  167. {
  168. dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 礼服师ID!=''").Tables[0];
  169. if (dt.Rows.Count > 0)
  170. {
  171. DataGridViewRow dgvr = new DataGridViewRow();
  172. DataGridViewCell cell = null;
  173. cell = new DataGridViewTextBoxCell();
  174. 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];
  175. if (dtColour.Rows.Count > 0)
  176. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  177. else
  178. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  179. cell.Value = dt.Rows[0]["礼服师ID"].ToString();
  180. dgvr.Cells.Add(cell);
  181. cell = new DataGridViewTextBoxCell();
  182. cell.Value = dt.Rows[0]["礼服师"].ToString();
  183. dgvr.Cells.Add(cell);
  184. this.dgv1.Rows.Add(dgvr);
  185. this.dgv1.ClearSelection();
  186. }
  187. }
  188. #endregion
  189. #region 拍照
  190. #region 拍照摄影师
  191. if (this.cmbObject.Text.ToString() == "摄影师")
  192. {
  193. dt = vsbll.Vw_OrdersWagePhotography(" and Ordpg_ViceNumber='" + this.Ord_Number_Deputy + "' and 摄影师id!=''").Tables[0];
  194. if (dt.Rows.Count > 0)
  195. {
  196. DataGridViewRow dgvr = new DataGridViewRow();
  197. DataGridViewCell cell = null;
  198. cell = new DataGridViewTextBoxCell();
  199. 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];
  200. if (dtColour.Rows.Count > 0)
  201. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  202. else
  203. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  204. cell.Value = dt.Rows[0]["摄影师ID"].ToString();
  205. dgvr.Cells.Add(cell);
  206. cell = new DataGridViewTextBoxCell();
  207. cell.Value = dt.Rows[0]["摄影师名称"].ToString();
  208. dgvr.Cells.Add(cell);
  209. this.dgv1.Rows.Add(dgvr);
  210. this.dgv1.ClearSelection();
  211. }
  212. }
  213. #endregion
  214. #region 拍照摄影助理
  215. if (this.cmbObject.Text.ToString() == "摄影助理")
  216. {
  217. dt = vsbll.Vw_OrdersWagePhotography(" and Ordpg_ViceNumber='" + this.Ord_Number_Deputy + "' and 摄影助理ID!=''").Tables[0];
  218. if (dt.Rows.Count > 0)
  219. {
  220. DataGridViewRow dgvr = new DataGridViewRow();
  221. DataGridViewCell cell = null;
  222. cell = new DataGridViewTextBoxCell();
  223. 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];
  224. if (dtColour.Rows.Count > 0)
  225. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  226. else
  227. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  228. cell.Value = dt.Rows[0]["摄影助理ID"].ToString();
  229. dgvr.Cells.Add(cell);
  230. cell = new DataGridViewTextBoxCell();
  231. cell.Value = dt.Rows[0]["摄影助理名称"].ToString();
  232. dgvr.Cells.Add(cell);
  233. this.dgv1.Rows.Add(dgvr);
  234. this.dgv1.ClearSelection();
  235. }
  236. else
  237. { this.dgv1.Rows.Clear(); }
  238. }
  239. #endregion
  240. #region 拍照化妆师
  241. if (this.cmbObject.Text.ToString() == "化妆师")
  242. {
  243. dt = vsbll.Vw_OrdersWagePhotography(" and Ordpg_ViceNumber='" + this.Ord_Number_Deputy + "' and 化妆师ID!=''").Tables[0];
  244. if (dt.Rows.Count > 0)
  245. {
  246. DataGridViewRow dgvr = new DataGridViewRow();
  247. DataGridViewCell cell = null;
  248. cell = new DataGridViewTextBoxCell();
  249. 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];
  250. if (dtColour.Rows.Count > 0)
  251. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  252. else
  253. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  254. cell.Value = dt.Rows[0]["化妆师ID"].ToString();
  255. dgvr.Cells.Add(cell);
  256. cell = new DataGridViewTextBoxCell();
  257. cell.Value = dt.Rows[0]["化妆师名称"].ToString();
  258. dgvr.Cells.Add(cell);
  259. this.dgv1.Rows.Add(dgvr);
  260. this.dgv1.ClearSelection();
  261. }
  262. else
  263. { this.dgv1.Rows.Clear(); }
  264. }
  265. #endregion
  266. #region 拍照化妆助理
  267. if (this.cmbObject.Text.ToString() == "化妆助理")
  268. {
  269. dt = vsbll.Vw_OrdersWagePhotography(" and Ordpg_ViceNumber='" + this.Ord_Number_Deputy + "' and 化妆助理ID!=''").Tables[0];
  270. if (dt.Rows.Count > 0)
  271. {
  272. DataGridViewRow dgvr = new DataGridViewRow();
  273. DataGridViewCell cell = null;
  274. cell = new DataGridViewTextBoxCell();
  275. 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];
  276. if (dtColour.Rows.Count > 0)
  277. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  278. else
  279. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  280. cell.Value = dt.Rows[0]["化妆助理ID"].ToString();
  281. dgvr.Cells.Add(cell);
  282. cell = new DataGridViewTextBoxCell();
  283. cell.Value = dt.Rows[0]["化妆助理名称"].ToString();
  284. dgvr.Cells.Add(cell);
  285. this.dgv1.Rows.Add(dgvr);
  286. this.dgv1.ClearSelection();
  287. }
  288. else
  289. { this.dgv1.Rows.Clear(); }
  290. }
  291. #endregion
  292. #region 拍照引导师
  293. if (this.cmbObject.Text.ToString() == "引导师")
  294. {
  295. dt = vsbll.Vw_OrdersWagePhotography(" and Ordpg_ViceNumber='" + this.Ord_Number_Deputy + "' and 引导师ID!=''").Tables[0];
  296. if (dt.Rows.Count > 0)
  297. {
  298. DataGridViewRow dgvr = new DataGridViewRow();
  299. DataGridViewCell cell = null;
  300. cell = new DataGridViewTextBoxCell();
  301. 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];
  302. if (dtColour.Rows.Count > 0)
  303. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  304. else
  305. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  306. cell.Value = dt.Rows[0]["引导师ID"].ToString();
  307. dgvr.Cells.Add(cell);
  308. cell = new DataGridViewTextBoxCell();
  309. cell.Value = dt.Rows[0]["引导师名称"].ToString();
  310. dgvr.Cells.Add(cell);
  311. this.dgv1.Rows.Add(dgvr);
  312. this.dgv1.ClearSelection();
  313. }
  314. else
  315. { this.dgv1.Rows.Clear(); }
  316. }
  317. #endregion
  318. #endregion
  319. #region 选片
  320. #region 选片师
  321. if (this.cmbObject.Text.ToString() == "选片师")
  322. {
  323. dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 选片师ID!=''").Tables[0];
  324. if (dt.Rows.Count > 0)
  325. {
  326. DataGridViewRow dgvr = new DataGridViewRow();
  327. DataGridViewCell cell = null;
  328. cell = new DataGridViewTextBoxCell();
  329. 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];
  330. if (dtColour.Rows.Count > 0)
  331. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  332. else
  333. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  334. cell.Value = dt.Rows[0]["选片师ID"].ToString();
  335. dgvr.Cells.Add(cell);
  336. cell = new DataGridViewTextBoxCell();
  337. cell.Value = dt.Rows[0]["选片师"].ToString();
  338. dgvr.Cells.Add(cell);
  339. this.dgv1.Rows.Add(dgvr);
  340. this.dgv1.ClearSelection();
  341. }
  342. }
  343. #endregion
  344. #region 初修师
  345. if (this.cmbObject.Text.ToString() == "初修师")
  346. {
  347. dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 初修师ID!=''").Tables[0];
  348. if (dt.Rows.Count > 0)
  349. {
  350. DataGridViewRow dgvr = new DataGridViewRow();
  351. DataGridViewCell cell = null;
  352. cell = new DataGridViewTextBoxCell();
  353. 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];
  354. if (dtColour.Rows.Count > 0)
  355. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  356. else
  357. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  358. cell.Value = dt.Rows[0]["初修师ID"].ToString();
  359. dgvr.Cells.Add(cell);
  360. cell = new DataGridViewTextBoxCell();
  361. cell.Value = dt.Rows[0]["初修师"].ToString();
  362. dgvr.Cells.Add(cell);
  363. this.dgv1.Rows.Add(dgvr);
  364. this.dgv1.ClearSelection();
  365. }
  366. }
  367. #endregion
  368. #region 精修师
  369. if (this.cmbObject.Text.ToString() == "精修师")
  370. {
  371. dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 精修师ID!=''").Tables[0];
  372. if (dt.Rows.Count > 0)
  373. {
  374. DataGridViewRow dgvr = new DataGridViewRow();
  375. DataGridViewCell cell = null;
  376. cell = new DataGridViewTextBoxCell();
  377. 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];
  378. if (dtColour.Rows.Count > 0)
  379. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  380. else
  381. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  382. cell.Value = dt.Rows[0]["精修师ID"].ToString();
  383. dgvr.Cells.Add(cell);
  384. cell = new DataGridViewTextBoxCell();
  385. cell.Value = dt.Rows[0]["精修师"].ToString();
  386. dgvr.Cells.Add(cell);
  387. this.dgv1.Rows.Add(dgvr);
  388. this.dgv1.ClearSelection();
  389. }
  390. }
  391. #endregion
  392. #endregion
  393. #region 看样
  394. #region 看设计师
  395. if (this.cmbObject.Text.ToString() == "看设计师")
  396. {
  397. dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 看设计师ID!=''").Tables[0];
  398. if (dt.Rows.Count > 0)
  399. {
  400. DataGridViewRow dgvr = new DataGridViewRow();
  401. DataGridViewCell cell = null;
  402. cell = new DataGridViewTextBoxCell();
  403. 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];
  404. if (dtColour.Rows.Count > 0)
  405. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  406. else
  407. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  408. cell.Value = dt.Rows[0]["看设计师ID"].ToString();
  409. dgvr.Cells.Add(cell);
  410. cell = new DataGridViewTextBoxCell();
  411. cell.Value = dt.Rows[0]["看设计师"].ToString();
  412. dgvr.Cells.Add(cell);
  413. this.dgv1.Rows.Add(dgvr);
  414. this.dgv1.ClearSelection();
  415. }
  416. }
  417. #endregion
  418. #region 设计师
  419. if (this.cmbObject.Text.ToString() == "设计师")
  420. {
  421. dt = vsbll.Vw_OrdersWageDigital(" and Ordv_ViceNumber='" + this.Ord_Number_Deputy + "' and 设计师ID!=''").Tables[0];
  422. if (dt.Rows.Count > 0)
  423. {
  424. DataGridViewRow dgvr = new DataGridViewRow();
  425. DataGridViewCell cell = null;
  426. cell = new DataGridViewTextBoxCell();
  427. 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];
  428. if (dtColour.Rows.Count > 0)
  429. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  430. else
  431. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  432. cell.Value = dt.Rows[0]["设计师ID"].ToString();
  433. dgvr.Cells.Add(cell);
  434. cell = new DataGridViewTextBoxCell();
  435. cell.Value = dt.Rows[0]["设计师"].ToString();
  436. dgvr.Cells.Add(cell);
  437. this.dgv1.Rows.Add(dgvr);
  438. this.dgv1.ClearSelection();
  439. }
  440. }
  441. #endregion
  442. #endregion
  443. #region 取件
  444. if (this.cmbObject.Text == "近期取件")
  445. {
  446. dt = sfssbll.GetList("Sfss_Type=5").Tables[0];
  447. if (dt.Rows.Count > 0)
  448. {
  449. for (int i = 0; i < dt.Rows.Count; i++)
  450. {
  451. DataGridViewRow dgvr = new DataGridViewRow();
  452. DataGridViewCell cell = null;
  453. cell = new DataGridViewTextBoxCell();
  454. 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];
  455. if (dtColour.Rows.Count > 0)
  456. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  457. else
  458. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  459. cell.Value = dt.Rows[i]["ID"].ToString();
  460. dgvr.Cells.Add(cell);
  461. cell = new DataGridViewTextBoxCell();
  462. cell.Value = dt.Rows[i]["Sfss_Name"].ToString();
  463. dgvr.Cells.Add(cell);
  464. this.dgv1.Rows.Add(dgvr);
  465. this.dgv1.ClearSelection();
  466. }
  467. }
  468. }
  469. #endregion
  470. #region 服务
  471. if (this.cmbObject.Text == "近期服务")
  472. {
  473. dt = sfssbll.GetList("Sfss_Type=6", "Id asc").Tables[0];
  474. if (dt.Rows.Count > 0)
  475. {
  476. for (int i = 0; i < dt.Rows.Count; i++)
  477. {
  478. DataGridViewRow dgvr = new DataGridViewRow();
  479. DataGridViewCell cell = null;
  480. cell = new DataGridViewTextBoxCell();
  481. DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_Type=6 and Sfs_SurveySetID=" + dt.Rows[i]["ID"].ToString() + "").Tables[0];
  482. if (dtColour.Rows.Count > 0)
  483. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  484. else
  485. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  486. cell.Value = dt.Rows[i]["ID"].ToString();
  487. dgvr.Cells.Add(cell);
  488. cell = new DataGridViewTextBoxCell();
  489. cell.Value = dt.Rows[i]["Sfss_Name"].ToString();
  490. dgvr.Cells.Add(cell);
  491. this.dgv1.Rows.Add(dgvr);
  492. this.dgv1.ClearSelection();
  493. }
  494. }
  495. }
  496. #endregion
  497. #region 其它调查
  498. if (this.cmbObject.Text == "其它调查")
  499. {
  500. dt = sfssbll.GetList("Sfss_Type=7").Tables[0];
  501. if (dt.Rows.Count > 0)
  502. {
  503. for (int i = 0; i < dt.Rows.Count; i++)
  504. {
  505. DataGridViewRow dgvr = new DataGridViewRow();
  506. DataGridViewCell cell = null;
  507. cell = new DataGridViewTextBoxCell();
  508. DataTable dtColour = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_Type=7 and Sfs_SurveySetID=" + dt.Rows[i]["ID"].ToString() + "").Tables[0];
  509. if (dtColour.Rows.Count > 0)
  510. { dgvr.DefaultCellStyle.ForeColor = Color.Blue; }
  511. else
  512. { dgvr.DefaultCellStyle.ForeColor = Color.Red; }
  513. cell.Value = dt.Rows[i]["ID"].ToString();
  514. dgvr.Cells.Add(cell);
  515. cell = new DataGridViewTextBoxCell();
  516. cell.Value = dt.Rows[i]["Sfss_Name"].ToString();
  517. dgvr.Cells.Add(cell);
  518. this.dgv1.Rows.Add(dgvr);
  519. this.dgv1.ClearSelection();
  520. }
  521. }
  522. }
  523. #endregion
  524. }
  525. /// <summary>
  526. /// dgv单机事件 获取回访事项/满意度
  527. /// </summary>
  528. /// <param name="sender"></param>
  529. /// <param name="e"></param>
  530. protected override void dgv1_Click(object sender, EventArgs e)
  531. {
  532. try
  533. {
  534. if (this.dgv1.SelectedRows.Count > 0)
  535. {
  536. DataTable dt1 = sfrsbll.GetAllList("id asc").Tables[0];
  537. if (dt1.Rows.Count > 0)
  538. {
  539. this.cmSfrs_Scores.DataSource = dt1;
  540. this.cmSfrs_Scores.ValueMember = "Id";
  541. this.cmSfrs_Scores.DisplayMember = "Sfrs_Name";
  542. this.cmSfrs_Scores.SelectedIndex = -1;
  543. }
  544. this.dgv2.Rows.Clear();
  545. DataTable dt = new DataTable();
  546. #region 订单
  547. if (this.cmbObject.Text == "接单门市")
  548. {
  549. dt = srmsbll.GetList("Sfrms_SurveySetID=1 and Sfrms_EnableStatus=0").Tables[0];
  550. if (dt.Rows.Count > 0)
  551. {
  552. for (int i = 0; i < dt.Rows.Count; i++)
  553. {
  554. DataGridViewRow dgvr = new DataGridViewRow();
  555. DataGridViewCell cell = null;
  556. 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];
  557. if (dtOk.Rows.Count > 0)
  558. {
  559. cell = new DataGridViewTextBoxCell();
  560. cell.Value = dtOk.Rows[0]["Sfrms_Contents"].ToString();
  561. dgvr.Cells.Add(cell);
  562. cell = new DataGridViewTextBoxCell();
  563. cell.Value = dtOk.Rows[0]["Sfs_RatingSetName"].ToString();
  564. dgvr.Cells.Add(cell);
  565. cell = new DataGridViewTextBoxCell();
  566. cell.Value = dtOk.Rows[0]["Sfs_Remark"].ToString();
  567. dgvr.Cells.Add(cell);
  568. cell = new DataGridViewTextBoxCell();
  569. cell.Value = dtOk.Rows[0]["Sfs_ReturningMattersSetID"].ToString();
  570. dgvr.Cells.Add(cell);
  571. cell = new DataGridViewTextBoxCell();
  572. cell.Value = dtOk.Rows[0]["Sfrs_Scores"].ToString();
  573. dgvr.Cells.Add(cell);
  574. }
  575. else
  576. {
  577. cell = new DataGridViewTextBoxCell();
  578. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  579. dgvr.Cells.Add(cell);
  580. cell = new DataGridViewTextBoxCell();
  581. cell.Value = "";
  582. dgvr.Cells.Add(cell);
  583. cell = new DataGridViewTextBoxCell();
  584. cell.Value = "";
  585. dgvr.Cells.Add(cell);
  586. cell = new DataGridViewTextBoxCell();
  587. cell.Value = dt.Rows[i]["ID"].ToString();
  588. dgvr.Cells.Add(cell);
  589. }
  590. this.dgv2.Rows.Add(dgvr);
  591. }
  592. this.dgv2.ClearSelection();
  593. }
  594. }
  595. #endregion
  596. #region 礼服师
  597. if (this.cmbObject.Text == "礼服师")
  598. {
  599. dt = srmsbll.GetList("Sfrms_SurveySetID=2 and Sfrms_EnableStatus=0").Tables[0];
  600. if (dt.Rows.Count > 0)
  601. {
  602. for (int i = 0; i < dt.Rows.Count; i++)
  603. {
  604. DataGridViewRow dgvr = new DataGridViewRow();
  605. DataGridViewCell cell = null;
  606. 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];
  607. if (dtOk.Rows.Count > 0)
  608. {
  609. cell = new DataGridViewTextBoxCell();
  610. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  611. dgvr.Cells.Add(cell);
  612. cell = new DataGridViewTextBoxCell();
  613. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  614. dgvr.Cells.Add(cell);
  615. cell = new DataGridViewTextBoxCell();
  616. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  617. dgvr.Cells.Add(cell);
  618. cell = new DataGridViewTextBoxCell();
  619. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  620. dgvr.Cells.Add(cell);
  621. cell = new DataGridViewTextBoxCell();
  622. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  623. dgvr.Cells.Add(cell);
  624. }
  625. else
  626. {
  627. cell = new DataGridViewTextBoxCell();
  628. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  629. dgvr.Cells.Add(cell);
  630. cell = new DataGridViewTextBoxCell();
  631. cell.Value = "";
  632. dgvr.Cells.Add(cell);
  633. cell = new DataGridViewTextBoxCell();
  634. cell.Value = "";
  635. dgvr.Cells.Add(cell);
  636. cell = new DataGridViewTextBoxCell();
  637. cell.Value = dt.Rows[i]["ID"].ToString();
  638. dgvr.Cells.Add(cell);
  639. }
  640. this.dgv2.Rows.Add(dgvr);
  641. }
  642. this. dgv2.ClearSelection();
  643. }
  644. }
  645. #endregion
  646. #region 拍照
  647. #region 摄影师
  648. if (this.cmbObject.Text == "摄影师")
  649. {
  650. dt = srmsbll.GetList("Sfrms_SurveySetID=3 and Sfrms_EnableStatus=0").Tables[0];
  651. if (dt.Rows.Count > 0)
  652. {
  653. for (int i = 0; i < dt.Rows.Count; i++)
  654. {
  655. DataGridViewRow dgvr = new DataGridViewRow();
  656. DataGridViewCell cell = null;
  657. 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];
  658. if (dtOk.Rows.Count > 0)
  659. {
  660. cell = new DataGridViewTextBoxCell();
  661. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  662. dgvr.Cells.Add(cell);
  663. cell = new DataGridViewTextBoxCell();
  664. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  665. dgvr.Cells.Add(cell);
  666. cell = new DataGridViewTextBoxCell();
  667. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  668. dgvr.Cells.Add(cell);
  669. cell = new DataGridViewTextBoxCell();
  670. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  671. dgvr.Cells.Add(cell);
  672. cell = new DataGridViewTextBoxCell();
  673. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  674. dgvr.Cells.Add(cell);
  675. }
  676. else
  677. {
  678. cell = new DataGridViewTextBoxCell();
  679. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  680. dgvr.Cells.Add(cell);
  681. cell = new DataGridViewTextBoxCell();
  682. cell.Value = "";
  683. dgvr.Cells.Add(cell);
  684. cell = new DataGridViewTextBoxCell();
  685. cell.Value = "";
  686. dgvr.Cells.Add(cell);
  687. cell = new DataGridViewTextBoxCell();
  688. cell.Value = dt.Rows[i]["ID"].ToString();
  689. dgvr.Cells.Add(cell);
  690. }
  691. this.dgv2.Rows.Add(dgvr);
  692. }
  693. this.dgv2.ClearSelection();
  694. }
  695. }
  696. #endregion
  697. #region 摄影助理
  698. if (this.cmbObject.Text == "摄影助理")
  699. {
  700. dt = srmsbll.GetList("Sfrms_SurveySetID=4 and Sfrms_EnableStatus=0").Tables[0];
  701. if (dt.Rows.Count > 0)
  702. {
  703. for (int i = 0; i < dt.Rows.Count; i++)
  704. {
  705. DataGridViewRow dgvr = new DataGridViewRow();
  706. DataGridViewCell cell = null;
  707. 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];
  708. if (dtOk.Rows.Count > 0)
  709. {
  710. cell = new DataGridViewTextBoxCell();
  711. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  712. dgvr.Cells.Add(cell);
  713. cell = new DataGridViewTextBoxCell();
  714. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  715. dgvr.Cells.Add(cell);
  716. cell = new DataGridViewTextBoxCell();
  717. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  718. dgvr.Cells.Add(cell);
  719. cell = new DataGridViewTextBoxCell();
  720. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  721. dgvr.Cells.Add(cell);
  722. cell = new DataGridViewTextBoxCell();
  723. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  724. dgvr.Cells.Add(cell);
  725. }
  726. else
  727. {
  728. cell = new DataGridViewTextBoxCell();
  729. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  730. dgvr.Cells.Add(cell);
  731. cell = new DataGridViewTextBoxCell();
  732. cell.Value = "";
  733. dgvr.Cells.Add(cell);
  734. cell = new DataGridViewTextBoxCell();
  735. cell.Value = "";
  736. dgvr.Cells.Add(cell);
  737. cell = new DataGridViewTextBoxCell();
  738. cell.Value = dt.Rows[i]["ID"].ToString();
  739. dgvr.Cells.Add(cell);
  740. }
  741. this.dgv2.Rows.Add(dgvr);
  742. }
  743. this.dgv2.ClearSelection();
  744. }
  745. }
  746. #endregion
  747. #region 化妆师
  748. if (this.cmbObject.Text == "化妆师")
  749. {
  750. dt = srmsbll.GetList("Sfrms_SurveySetID=5 and Sfrms_EnableStatus=0").Tables[0];
  751. if (dt.Rows.Count > 0)
  752. {
  753. for (int i = 0; i < dt.Rows.Count; i++)
  754. {
  755. DataGridViewRow dgvr = new DataGridViewRow();
  756. DataGridViewCell cell = null;
  757. 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];
  758. if (dtOk.Rows.Count > 0)
  759. {
  760. cell = new DataGridViewTextBoxCell();
  761. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  762. dgvr.Cells.Add(cell);
  763. cell = new DataGridViewTextBoxCell();
  764. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  765. dgvr.Cells.Add(cell);
  766. cell = new DataGridViewTextBoxCell();
  767. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  768. dgvr.Cells.Add(cell);
  769. cell = new DataGridViewTextBoxCell();
  770. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  771. dgvr.Cells.Add(cell);
  772. cell = new DataGridViewTextBoxCell();
  773. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  774. dgvr.Cells.Add(cell);
  775. }
  776. else
  777. {
  778. cell = new DataGridViewTextBoxCell();
  779. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  780. dgvr.Cells.Add(cell);
  781. cell = new DataGridViewTextBoxCell();
  782. cell.Value = "";
  783. dgvr.Cells.Add(cell);
  784. cell = new DataGridViewTextBoxCell();
  785. cell.Value = "";
  786. dgvr.Cells.Add(cell);
  787. cell = new DataGridViewTextBoxCell();
  788. cell.Value = dt.Rows[i]["ID"].ToString();
  789. dgvr.Cells.Add(cell);
  790. }
  791. this.dgv2.Rows.Add(dgvr);
  792. }
  793. this.dgv2.ClearSelection();
  794. }
  795. }
  796. #endregion
  797. #region 化妆助理
  798. if (this.cmbObject.Text == "化妆助理")
  799. {
  800. dt = srmsbll.GetList("Sfrms_SurveySetID=6 and Sfrms_EnableStatus=0").Tables[0];
  801. if (dt.Rows.Count > 0)
  802. {
  803. for (int i = 0; i < dt.Rows.Count; i++)
  804. {
  805. DataGridViewRow dgvr = new DataGridViewRow();
  806. DataGridViewCell cell = null;
  807. 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];
  808. if (dtOk.Rows.Count > 0)
  809. {
  810. cell = new DataGridViewTextBoxCell();
  811. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  812. dgvr.Cells.Add(cell);
  813. cell = new DataGridViewTextBoxCell();
  814. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  815. dgvr.Cells.Add(cell);
  816. cell = new DataGridViewTextBoxCell();
  817. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  818. dgvr.Cells.Add(cell);
  819. cell = new DataGridViewTextBoxCell();
  820. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  821. dgvr.Cells.Add(cell);
  822. cell = new DataGridViewTextBoxCell();
  823. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  824. dgvr.Cells.Add(cell);
  825. }
  826. else
  827. {
  828. cell = new DataGridViewTextBoxCell();
  829. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  830. dgvr.Cells.Add(cell);
  831. cell = new DataGridViewTextBoxCell();
  832. cell.Value = "";
  833. dgvr.Cells.Add(cell);
  834. cell = new DataGridViewTextBoxCell();
  835. cell.Value = "";
  836. dgvr.Cells.Add(cell);
  837. cell = new DataGridViewTextBoxCell();
  838. cell.Value = dt.Rows[i]["ID"].ToString();
  839. dgvr.Cells.Add(cell);
  840. }
  841. this.dgv2.Rows.Add(dgvr);
  842. }
  843. this.dgv2.ClearSelection();
  844. }
  845. }
  846. #endregion
  847. #region 引导师
  848. if (this.cmbObject.Text == "引导师")
  849. {
  850. dt = srmsbll.GetList("Sfrms_SurveySetID=7 and Sfrms_EnableStatus=0").Tables[0];
  851. if (dt.Rows.Count > 0)
  852. {
  853. for (int i = 0; i < dt.Rows.Count; i++)
  854. {
  855. DataGridViewRow dgvr = new DataGridViewRow();
  856. DataGridViewCell cell = null;
  857. 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];
  858. if (dtOk.Rows.Count > 0)
  859. {
  860. cell = new DataGridViewTextBoxCell();
  861. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  862. dgvr.Cells.Add(cell);
  863. cell = new DataGridViewTextBoxCell();
  864. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  865. dgvr.Cells.Add(cell);
  866. cell = new DataGridViewTextBoxCell();
  867. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  868. dgvr.Cells.Add(cell);
  869. cell = new DataGridViewTextBoxCell();
  870. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  871. dgvr.Cells.Add(cell);
  872. cell = new DataGridViewTextBoxCell();
  873. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  874. dgvr.Cells.Add(cell);
  875. }
  876. else
  877. {
  878. cell = new DataGridViewTextBoxCell();
  879. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  880. dgvr.Cells.Add(cell);
  881. cell = new DataGridViewTextBoxCell();
  882. cell.Value = "";
  883. dgvr.Cells.Add(cell);
  884. cell = new DataGridViewTextBoxCell();
  885. cell.Value = "";
  886. dgvr.Cells.Add(cell);
  887. cell = new DataGridViewTextBoxCell();
  888. cell.Value = dt.Rows[i]["ID"].ToString();
  889. dgvr.Cells.Add(cell);
  890. }
  891. this.dgv2.Rows.Add(dgvr);
  892. }
  893. this.dgv2.ClearSelection();
  894. }
  895. }
  896. #endregion
  897. #endregion
  898. #region 选片
  899. #region 选片师
  900. if (this.cmbObject.Text == "选片师")
  901. {
  902. dt = srmsbll.GetList("Sfrms_SurveySetID=8 and Sfrms_EnableStatus=0").Tables[0];
  903. if (dt.Rows.Count > 0)
  904. {
  905. for (int i = 0; i < dt.Rows.Count; i++)
  906. {
  907. DataGridViewRow dgvr = new DataGridViewRow();
  908. DataGridViewCell cell = null;
  909. 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];
  910. if (dtOk.Rows.Count > 0)
  911. {
  912. cell = new DataGridViewTextBoxCell();
  913. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  914. dgvr.Cells.Add(cell);
  915. cell = new DataGridViewTextBoxCell();
  916. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  917. dgvr.Cells.Add(cell);
  918. cell = new DataGridViewTextBoxCell();
  919. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  920. dgvr.Cells.Add(cell);
  921. cell = new DataGridViewTextBoxCell();
  922. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  923. dgvr.Cells.Add(cell);
  924. cell = new DataGridViewTextBoxCell();
  925. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  926. dgvr.Cells.Add(cell);
  927. }
  928. else
  929. {
  930. cell = new DataGridViewTextBoxCell();
  931. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  932. dgvr.Cells.Add(cell);
  933. cell = new DataGridViewTextBoxCell();
  934. cell.Value = "";
  935. dgvr.Cells.Add(cell);
  936. cell = new DataGridViewTextBoxCell();
  937. cell.Value = "";
  938. dgvr.Cells.Add(cell);
  939. cell = new DataGridViewTextBoxCell();
  940. cell.Value = dt.Rows[i]["ID"].ToString();
  941. dgvr.Cells.Add(cell);
  942. }
  943. this.dgv2.Rows.Add(dgvr);
  944. }
  945. this.dgv2.ClearSelection();
  946. }
  947. }
  948. #endregion
  949. #region 初修师
  950. if (this.cmbObject.Text == "初修师")
  951. {
  952. dt = srmsbll.GetList("Sfrms_SurveySetID=9 and Sfrms_EnableStatus=0").Tables[0];
  953. if (dt.Rows.Count > 0)
  954. {
  955. for (int i = 0; i < dt.Rows.Count; i++)
  956. {
  957. DataGridViewRow dgvr = new DataGridViewRow();
  958. DataGridViewCell cell = null;
  959. 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];
  960. if (dtOk.Rows.Count > 0)
  961. {
  962. cell = new DataGridViewTextBoxCell();
  963. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  964. dgvr.Cells.Add(cell);
  965. cell = new DataGridViewTextBoxCell();
  966. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  967. dgvr.Cells.Add(cell);
  968. cell = new DataGridViewTextBoxCell();
  969. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  970. dgvr.Cells.Add(cell);
  971. cell = new DataGridViewTextBoxCell();
  972. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  973. dgvr.Cells.Add(cell);
  974. cell = new DataGridViewTextBoxCell();
  975. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  976. dgvr.Cells.Add(cell);
  977. }
  978. else
  979. {
  980. cell = new DataGridViewTextBoxCell();
  981. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  982. dgvr.Cells.Add(cell);
  983. cell = new DataGridViewTextBoxCell();
  984. cell.Value = "";
  985. dgvr.Cells.Add(cell);
  986. cell = new DataGridViewTextBoxCell();
  987. cell.Value = "";
  988. dgvr.Cells.Add(cell);
  989. cell = new DataGridViewTextBoxCell();
  990. cell.Value = dt.Rows[i]["ID"].ToString();
  991. dgvr.Cells.Add(cell);
  992. }
  993. this.dgv2.Rows.Add(dgvr);
  994. }
  995. this.dgv2.ClearSelection();
  996. }
  997. }
  998. #endregion
  999. #region 精修师
  1000. if (this.cmbObject.Text == "精修师")
  1001. {
  1002. dt = srmsbll.GetList("Sfrms_SurveySetID=10 and Sfrms_EnableStatus=0").Tables[0];
  1003. if (dt.Rows.Count > 0)
  1004. {
  1005. for (int i = 0; i < dt.Rows.Count; i++)
  1006. {
  1007. DataGridViewRow dgvr = new DataGridViewRow();
  1008. DataGridViewCell cell = null;
  1009. 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];
  1010. if (dtOk.Rows.Count > 0)
  1011. {
  1012. cell = new DataGridViewTextBoxCell();
  1013. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  1014. dgvr.Cells.Add(cell);
  1015. cell = new DataGridViewTextBoxCell();
  1016. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  1017. dgvr.Cells.Add(cell);
  1018. cell = new DataGridViewTextBoxCell();
  1019. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  1020. dgvr.Cells.Add(cell);
  1021. cell = new DataGridViewTextBoxCell();
  1022. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  1023. dgvr.Cells.Add(cell);
  1024. cell = new DataGridViewTextBoxCell();
  1025. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  1026. dgvr.Cells.Add(cell);
  1027. }
  1028. else
  1029. {
  1030. cell = new DataGridViewTextBoxCell();
  1031. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  1032. dgvr.Cells.Add(cell);
  1033. cell = new DataGridViewTextBoxCell();
  1034. cell.Value = "";
  1035. dgvr.Cells.Add(cell);
  1036. cell = new DataGridViewTextBoxCell();
  1037. cell.Value = "";
  1038. dgvr.Cells.Add(cell);
  1039. cell = new DataGridViewTextBoxCell();
  1040. cell.Value = dt.Rows[i]["ID"].ToString();
  1041. dgvr.Cells.Add(cell);
  1042. }
  1043. this.dgv2.Rows.Add(dgvr);
  1044. }
  1045. this.dgv2.ClearSelection();
  1046. }
  1047. }
  1048. #endregion
  1049. #endregion
  1050. #region 看样
  1051. #region 看设计师
  1052. if (this.cmbObject.Text == "看设计师")
  1053. {
  1054. dt = srmsbll.GetList("Sfrms_SurveySetID=11 and Sfrms_EnableStatus=0").Tables[0];
  1055. if (dt.Rows.Count > 0)
  1056. {
  1057. for (int i = 0; i < dt.Rows.Count; i++)
  1058. {
  1059. DataGridViewRow dgvr = new DataGridViewRow();
  1060. DataGridViewCell cell = null;
  1061. 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];
  1062. if (dtOk.Rows.Count > 0)
  1063. {
  1064. cell = new DataGridViewTextBoxCell();
  1065. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  1066. dgvr.Cells.Add(cell);
  1067. cell = new DataGridViewTextBoxCell();
  1068. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  1069. dgvr.Cells.Add(cell);
  1070. cell = new DataGridViewTextBoxCell();
  1071. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  1072. dgvr.Cells.Add(cell);
  1073. cell = new DataGridViewTextBoxCell();
  1074. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  1075. dgvr.Cells.Add(cell);
  1076. cell = new DataGridViewTextBoxCell();
  1077. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  1078. dgvr.Cells.Add(cell);
  1079. }
  1080. else
  1081. {
  1082. cell = new DataGridViewTextBoxCell();
  1083. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  1084. dgvr.Cells.Add(cell);
  1085. cell = new DataGridViewTextBoxCell();
  1086. cell.Value = "";
  1087. dgvr.Cells.Add(cell);
  1088. cell = new DataGridViewTextBoxCell();
  1089. cell.Value = "";
  1090. dgvr.Cells.Add(cell);
  1091. cell = new DataGridViewTextBoxCell();
  1092. cell.Value = dt.Rows[i]["ID"].ToString();
  1093. dgvr.Cells.Add(cell);
  1094. }
  1095. this.dgv2.Rows.Add(dgvr);
  1096. }
  1097. this.dgv2.ClearSelection();
  1098. }
  1099. }
  1100. #endregion
  1101. #region 设计师
  1102. if (this.cmbObject.Text == "设计师")
  1103. {
  1104. dt = srmsbll.GetList("Sfrms_SurveySetID=12 and Sfrms_EnableStatus=0").Tables[0];
  1105. if (dt.Rows.Count > 0)
  1106. {
  1107. for (int i = 0; i < dt.Rows.Count; i++)
  1108. {
  1109. DataGridViewRow dgvr = new DataGridViewRow();
  1110. DataGridViewCell cell = null;
  1111. 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];
  1112. if (dtOk.Rows.Count > 0)
  1113. {
  1114. cell = new DataGridViewTextBoxCell();
  1115. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  1116. dgvr.Cells.Add(cell);
  1117. cell = new DataGridViewTextBoxCell();
  1118. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  1119. dgvr.Cells.Add(cell);
  1120. cell = new DataGridViewTextBoxCell();
  1121. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  1122. dgvr.Cells.Add(cell);
  1123. cell = new DataGridViewTextBoxCell();
  1124. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  1125. dgvr.Cells.Add(cell);
  1126. cell = new DataGridViewTextBoxCell();
  1127. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  1128. dgvr.Cells.Add(cell);
  1129. }
  1130. else
  1131. {
  1132. cell = new DataGridViewTextBoxCell();
  1133. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  1134. dgvr.Cells.Add(cell);
  1135. cell = new DataGridViewTextBoxCell();
  1136. cell.Value = "";
  1137. dgvr.Cells.Add(cell);
  1138. cell = new DataGridViewTextBoxCell();
  1139. cell.Value = "";
  1140. dgvr.Cells.Add(cell);
  1141. cell = new DataGridViewTextBoxCell();
  1142. cell.Value = dt.Rows[i]["ID"].ToString();
  1143. dgvr.Cells.Add(cell);
  1144. }
  1145. this.dgv2.Rows.Add(dgvr);
  1146. }
  1147. this.dgv2.ClearSelection();
  1148. }
  1149. }
  1150. #endregion
  1151. #endregion
  1152. #region 取件
  1153. if (this.cmbObject.Text == "近期取件")
  1154. {
  1155. #region 产品满意度
  1156. if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "13")
  1157. {
  1158. dt = srmsbll.GetList("Sfrms_SurveySetID=13 and Sfrms_EnableStatus=0").Tables[0];
  1159. if (dt.Rows.Count > 0)
  1160. {
  1161. for (int i = 0; i < dt.Rows.Count; i++)
  1162. {
  1163. DataGridViewRow dgvr = new DataGridViewRow();
  1164. DataGridViewCell cell = null;
  1165. 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];
  1166. if (dtOk.Rows.Count > 0)
  1167. {
  1168. cell = new DataGridViewTextBoxCell();
  1169. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  1170. dgvr.Cells.Add(cell);
  1171. cell = new DataGridViewTextBoxCell();
  1172. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  1173. dgvr.Cells.Add(cell);
  1174. cell = new DataGridViewTextBoxCell();
  1175. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  1176. dgvr.Cells.Add(cell);
  1177. cell = new DataGridViewTextBoxCell();
  1178. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  1179. dgvr.Cells.Add(cell);
  1180. cell = new DataGridViewTextBoxCell();
  1181. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  1182. dgvr.Cells.Add(cell);
  1183. }
  1184. else
  1185. {
  1186. cell = new DataGridViewTextBoxCell();
  1187. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  1188. dgvr.Cells.Add(cell);
  1189. cell = new DataGridViewTextBoxCell();
  1190. cell.Value = "";
  1191. dgvr.Cells.Add(cell);
  1192. cell = new DataGridViewTextBoxCell();
  1193. cell.Value = "";
  1194. dgvr.Cells.Add(cell);
  1195. cell = new DataGridViewTextBoxCell();
  1196. cell.Value = dt.Rows[i]["ID"].ToString();
  1197. dgvr.Cells.Add(cell);
  1198. }
  1199. this.dgv2.Rows.Add(dgvr);
  1200. }
  1201. this.dgv2.ClearSelection();
  1202. }
  1203. }
  1204. #endregion
  1205. #region 进度满意度
  1206. if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "14")
  1207. {
  1208. dt = srmsbll.GetList("Sfrms_SurveySetID=14 and Sfrms_EnableStatus=0").Tables[0];
  1209. if (dt.Rows.Count > 0)
  1210. {
  1211. for (int i = 0; i < dt.Rows.Count; i++)
  1212. {
  1213. DataGridViewRow dgvr = new DataGridViewRow();
  1214. DataGridViewCell cell = null;
  1215. 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];
  1216. if (dtOk.Rows.Count > 0)
  1217. {
  1218. cell = new DataGridViewTextBoxCell();
  1219. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  1220. dgvr.Cells.Add(cell);
  1221. cell = new DataGridViewTextBoxCell();
  1222. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  1223. dgvr.Cells.Add(cell);
  1224. cell = new DataGridViewTextBoxCell();
  1225. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  1226. dgvr.Cells.Add(cell);
  1227. cell = new DataGridViewTextBoxCell();
  1228. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  1229. dgvr.Cells.Add(cell);
  1230. cell = new DataGridViewTextBoxCell();
  1231. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  1232. dgvr.Cells.Add(cell);
  1233. }
  1234. else
  1235. {
  1236. cell = new DataGridViewTextBoxCell();
  1237. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  1238. dgvr.Cells.Add(cell);
  1239. cell = new DataGridViewTextBoxCell();
  1240. cell.Value = "";
  1241. dgvr.Cells.Add(cell);
  1242. cell = new DataGridViewTextBoxCell();
  1243. cell.Value = "";
  1244. dgvr.Cells.Add(cell);
  1245. cell = new DataGridViewTextBoxCell();
  1246. cell.Value = dt.Rows[i]["ID"].ToString();
  1247. dgvr.Cells.Add(cell);
  1248. }
  1249. this.dgv2.Rows.Add(dgvr);
  1250. }
  1251. this.dgv2.ClearSelection();
  1252. }
  1253. }
  1254. #endregion
  1255. }
  1256. #endregion
  1257. #region 服务
  1258. if (this.cmbObject.Text == "近期服务")
  1259. {
  1260. #region 服务人员1
  1261. if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "15")
  1262. {
  1263. dt = srmsbll.GetList("Sfrms_SurveySetID=15 and Sfrms_EnableStatus=0").Tables[0];
  1264. if (dt.Rows.Count > 0)
  1265. {
  1266. for (int i = 0; i < dt.Rows.Count; i++)
  1267. {
  1268. DataGridViewRow dgvr = new DataGridViewRow();
  1269. DataGridViewCell cell = null;
  1270. 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];
  1271. if (dtOk.Rows.Count > 0)
  1272. {
  1273. cell = new DataGridViewTextBoxCell();
  1274. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  1275. dgvr.Cells.Add(cell);
  1276. cell = new DataGridViewTextBoxCell();
  1277. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  1278. dgvr.Cells.Add(cell);
  1279. cell = new DataGridViewTextBoxCell();
  1280. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  1281. dgvr.Cells.Add(cell);
  1282. cell = new DataGridViewTextBoxCell();
  1283. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  1284. dgvr.Cells.Add(cell);
  1285. cell = new DataGridViewTextBoxCell();
  1286. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  1287. dgvr.Cells.Add(cell);
  1288. }
  1289. else
  1290. {
  1291. cell = new DataGridViewTextBoxCell();
  1292. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  1293. dgvr.Cells.Add(cell);
  1294. cell = new DataGridViewTextBoxCell();
  1295. cell.Value = "";
  1296. dgvr.Cells.Add(cell);
  1297. cell = new DataGridViewTextBoxCell();
  1298. cell.Value = "";
  1299. dgvr.Cells.Add(cell);
  1300. cell = new DataGridViewTextBoxCell();
  1301. cell.Value = dt.Rows[i]["ID"].ToString();
  1302. dgvr.Cells.Add(cell);
  1303. }
  1304. this.dgv2.Rows.Add(dgvr);
  1305. }
  1306. this.dgv2.ClearSelection();
  1307. }
  1308. }
  1309. #endregion
  1310. #region 服务人员2
  1311. if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "16")
  1312. {
  1313. dt = srmsbll.GetList("Sfrms_SurveySetID=16 and Sfrms_EnableStatus=0").Tables[0];
  1314. if (dt.Rows.Count > 0)
  1315. {
  1316. for (int i = 0; i < dt.Rows.Count; i++)
  1317. {
  1318. DataGridViewRow dgvr = new DataGridViewRow();
  1319. DataGridViewCell cell = null;
  1320. 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];
  1321. if (dtOk.Rows.Count > 0)
  1322. {
  1323. cell = new DataGridViewTextBoxCell();
  1324. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  1325. dgvr.Cells.Add(cell);
  1326. cell = new DataGridViewTextBoxCell();
  1327. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  1328. dgvr.Cells.Add(cell);
  1329. cell = new DataGridViewTextBoxCell();
  1330. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  1331. dgvr.Cells.Add(cell);
  1332. cell = new DataGridViewTextBoxCell();
  1333. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  1334. dgvr.Cells.Add(cell);
  1335. cell = new DataGridViewTextBoxCell();
  1336. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  1337. dgvr.Cells.Add(cell);
  1338. }
  1339. else
  1340. {
  1341. cell = new DataGridViewTextBoxCell();
  1342. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  1343. dgvr.Cells.Add(cell);
  1344. cell = new DataGridViewTextBoxCell();
  1345. cell.Value = "";
  1346. dgvr.Cells.Add(cell);
  1347. cell = new DataGridViewTextBoxCell();
  1348. cell.Value = "";
  1349. dgvr.Cells.Add(cell);
  1350. cell = new DataGridViewTextBoxCell();
  1351. cell.Value = dt.Rows[i]["ID"].ToString();
  1352. dgvr.Cells.Add(cell);
  1353. }
  1354. this.dgv2.Rows.Add(dgvr);
  1355. }
  1356. this.dgv2.ClearSelection();
  1357. }
  1358. }
  1359. #endregion
  1360. }
  1361. #endregion
  1362. #region 其它调查
  1363. if (this.cmbObject.Text == "其它调查")
  1364. {
  1365. dt = srmsbll.GetList("Sfrms_SurveySetID=" + this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() + " and Sfrms_EnableStatus=0").Tables[0];
  1366. if (dt.Rows.Count > 0)
  1367. {
  1368. for (int i = 0; i < dt.Rows.Count; i++)
  1369. {
  1370. DataGridViewRow dgvr = new DataGridViewRow();
  1371. DataGridViewCell cell = null;
  1372. 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];
  1373. if (dtOk.Rows.Count > 0)
  1374. {
  1375. cell = new DataGridViewTextBoxCell();
  1376. cell.Value = dtOk.Rows[i]["Sfrms_Contents"].ToString();
  1377. dgvr.Cells.Add(cell);
  1378. cell = new DataGridViewTextBoxCell();
  1379. cell.Value = dtOk.Rows[i]["Sfs_RatingSetName"].ToString();
  1380. dgvr.Cells.Add(cell);
  1381. cell = new DataGridViewTextBoxCell();
  1382. cell.Value = dtOk.Rows[i]["Sfs_Remark"].ToString();
  1383. dgvr.Cells.Add(cell);
  1384. cell = new DataGridViewTextBoxCell();
  1385. cell.Value = dtOk.Rows[i]["Sfs_ReturningMattersSetID"].ToString();
  1386. dgvr.Cells.Add(cell);
  1387. cell = new DataGridViewTextBoxCell();
  1388. cell.Value = dtOk.Rows[i]["Sfrs_Scores"].ToString();
  1389. dgvr.Cells.Add(cell);
  1390. }
  1391. else
  1392. {
  1393. cell = new DataGridViewTextBoxCell();
  1394. cell.Value = dt.Rows[i]["Sfrms_Contents"].ToString();
  1395. dgvr.Cells.Add(cell);
  1396. cell = new DataGridViewTextBoxCell();
  1397. cell.Value = "";
  1398. dgvr.Cells.Add(cell);
  1399. cell = new DataGridViewTextBoxCell();
  1400. cell.Value = "";
  1401. dgvr.Cells.Add(cell);
  1402. cell = new DataGridViewTextBoxCell();
  1403. cell.Value = dt.Rows[i]["ID"].ToString();
  1404. dgvr.Cells.Add(cell);
  1405. }
  1406. this.dgv2.Rows.Add(dgvr);
  1407. }
  1408. this.dgv2.ClearSelection();
  1409. }
  1410. }
  1411. #endregion
  1412. }
  1413. }
  1414. catch (Exception ex)
  1415. { MessageBoxCustom.Show(ex.Message); }
  1416. }
  1417. /// <summary>
  1418. /// 保存
  1419. /// </summary>
  1420. /// <param name="sender"></param>
  1421. /// <param name="e"></param>
  1422. protected override void btnSave_Click(object sender, EventArgs e)
  1423. {
  1424. try
  1425. {
  1426. // 判断不能为空
  1427. if (string.IsNullOrEmpty(this.cmbObject.Text))
  1428. { MessageBoxCustom.Show("请选择回访对象!"); return; }
  1429. if (this.dgv1.SelectedRows.Count == 0)
  1430. { MessageBoxCustom.Show("请选择调查对象!"); return; }
  1431. if (this.dgv2.Rows.Count <= 0)
  1432. { MessageBoxCustom.Show("请设置回访对象或者满意度!"); return; }
  1433. if (this.dgv2.Rows.Count > 0)
  1434. {
  1435. for (int i = 0; i < this.dgv2.Rows.Count; i++)
  1436. {
  1437. if (string.IsNullOrEmpty(this.dgv2.Rows[i].Cells["Sfrs_Scores"].Value.ToString()))
  1438. { MessageBoxCustom.Show("满意度不能为空,请选择满意度!"); return; }
  1439. }
  1440. }
  1441. #region 判断是否已经调查过
  1442. DataTable dtOk = new DataTable();
  1443. // 订单
  1444. if (this.Type == "0")
  1445. {
  1446. 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];
  1447. if (dtOk.Rows.Count > 0)
  1448. { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
  1449. }
  1450. // 礼服师
  1451. if (this.Type == "1")
  1452. {
  1453. 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];
  1454. if (dtOk.Rows.Count > 0)
  1455. { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
  1456. }
  1457. // 拍照
  1458. if (this.Type == "2")
  1459. {
  1460. if (this.cmbObject.Text == "摄影师")
  1461. { 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]; }
  1462. if (this.cmbObject.Text == "摄影助理")
  1463. { 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]; }
  1464. if (this.cmbObject.Text == "化妆师")
  1465. { 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]; }
  1466. if (this.cmbObject.Text == "化妆助理")
  1467. { 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]; }
  1468. if (this.cmbObject.Text == "引导师")
  1469. { 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]; }
  1470. if (dtOk.Rows.Count > 0)
  1471. { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
  1472. }
  1473. // 选片
  1474. if (this.Type == "3")
  1475. {
  1476. if (this.cmbObject.Text == "选片师")
  1477. { 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]; }
  1478. if (this.cmbObject.Text == "初修师")
  1479. { 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]; }
  1480. if (this.cmbObject.Text == "精修师")
  1481. { 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]; }
  1482. if (dtOk.Rows.Count > 0)
  1483. { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
  1484. }
  1485. // 看样
  1486. if (this.Type == "4")
  1487. {
  1488. if (this.cmbObject.Text == "看设计师")
  1489. { 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]; }
  1490. if (this.cmbObject.Text == "设计师")
  1491. { 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]; }
  1492. if (dtOk.Rows.Count > 0)
  1493. { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
  1494. }
  1495. // 取件
  1496. if (this.Type == "5")
  1497. {
  1498. if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "13")
  1499. { 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]; }
  1500. if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "14")
  1501. { 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]; }
  1502. if (dtOk.Rows.Count > 0)
  1503. { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
  1504. }
  1505. // 服务
  1506. if (this.Type == "6")
  1507. {
  1508. if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "15")
  1509. { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_EmployeeID='" + fw1 + "' and Sfs_Type=6 and Sfs_SurveySetID=15").Tables[0]; }
  1510. if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "16")
  1511. { dtOk = sfsbll.Vw_ErpSatisfactionSurvey(" Sfs_OrderNumber='" + this.Ord_Number + "' and Sfs_EmployeeID='" + fw2 + "' and Sfs_Type=6 and Sfs_SurveySetID=16").Tables[0]; }
  1512. if (dtOk.Rows.Count > 0)
  1513. { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
  1514. }
  1515. // 其它调查
  1516. if (this.Type == "7")
  1517. {
  1518. 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];
  1519. if (dtOk.Rows.Count > 0)
  1520. { MessageBoxCustom.Show("此对象已经调查过了!"); return; }
  1521. }
  1522. #endregion
  1523. #region 保存
  1524. if (this.dgv2.Rows.Count > 0)
  1525. {
  1526. DateTime StrTime = SDateTime.Now;
  1527. string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
  1528. List<Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
  1529. LYFZ.Model.Model_ErpSatisfactionSurvey model = null;
  1530. for (int i = 0; i < this.dgv2.Rows.Count; i++)
  1531. {
  1532. model = new Model.Model_ErpSatisfactionSurvey();
  1533. model.Sfs_OrderNumber = this.Ord_Number;
  1534. // 订单
  1535. if (this.Type == "0")
  1536. {
  1537. model.Sfs_OrderNumberDeputy = "";
  1538. model.Sfs_EmployeeID = this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString();
  1539. model.Sfs_Type = 0;
  1540. model.Sfs_SurveySetID = Convert.ToInt32(this.cmbObject.SelectedValue);
  1541. }
  1542. // 礼服师
  1543. if (this.Type == "1")
  1544. {
  1545. model.Sfs_OrderNumberDeputy = this.Ord_Number_Deputy;
  1546. model.Sfs_EmployeeID = this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString();
  1547. model.Sfs_Type = 1;
  1548. model.Sfs_SurveySetID = Convert.ToInt32(this.cmbObject.SelectedValue);
  1549. }
  1550. // 拍照
  1551. if (this.Type == "2")
  1552. {
  1553. model.Sfs_OrderNumberDeputy = this.Ord_Number_Deputy;
  1554. model.Sfs_EmployeeID = this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString();
  1555. model.Sfs_Type = 2;
  1556. model.Sfs_SurveySetID = Convert.ToInt32(this.cmbObject.SelectedValue);
  1557. }
  1558. // 选片
  1559. if (this.Type == "3")
  1560. {
  1561. model.Sfs_OrderNumberDeputy = this.Ord_Number_Deputy;
  1562. model.Sfs_EmployeeID = this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString();
  1563. model.Sfs_Type = 3;
  1564. model.Sfs_SurveySetID = Convert.ToInt32(this.cmbObject.SelectedValue);
  1565. }
  1566. // 看样
  1567. if (this.Type == "4")
  1568. {
  1569. model.Sfs_OrderNumberDeputy = this.Ord_Number_Deputy;
  1570. model.Sfs_EmployeeID = this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString();
  1571. model.Sfs_Type = 4;
  1572. model.Sfs_SurveySetID = Convert.ToInt32(this.cmbObject.SelectedValue);
  1573. }
  1574. // 取件
  1575. if (this.Type == "5")
  1576. {
  1577. model.Sfs_OrderNumberDeputy = this.Ord_Number_Deputy;
  1578. model.Sfs_EmployeeID = "";
  1579. model.Sfs_Type = 5;
  1580. model.Sfs_SurveySetID = Convert.ToInt32(this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString());
  1581. }
  1582. // 服务
  1583. if (this.Type == "6")
  1584. {
  1585. model.Sfs_OrderNumberDeputy = "";
  1586. if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "15")
  1587. { model.Sfs_EmployeeID = this.fw1; }
  1588. if (this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString() == "16")
  1589. { model.Sfs_EmployeeID = this.fw2; }
  1590. model.Sfs_Type = 6;
  1591. model.Sfs_SurveySetID = Convert.ToInt32(this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString());
  1592. }
  1593. // 其它调查
  1594. if (this.Type == "7")
  1595. {
  1596. model.Sfs_OrderNumberDeputy = "";
  1597. model.Sfs_EmployeeID = "";
  1598. model.Sfs_Type = 7;
  1599. model.Sfs_SurveySetID = Convert.ToInt32(this.dgv1.CurrentRow.Cells["Numbering"].Value.ToString());
  1600. }
  1601. model.Sfs_ReturningMattersSetID = Convert.ToInt32(this.dgv2.Rows[i].Cells["Sfs_ReturningMattersSetID"].Value);
  1602. model.Sfs_RatingSetID = sfrsbll.GetID(this.dgv2.Rows[i].Cells["Sfrs_Scores"].Value.ToString());
  1603. model.Sfs_Remark = this.dgv2.Rows[i].Cells["Remark"].Value.ToString();
  1604. model.Sfs_CreateTime = StrTime;
  1605. model.Sfs_CreateName = StrUserID;
  1606. clist.Add(sfsbll.GetAddCommandInfo(model));
  1607. }
  1608. if (clist.Count > 0)
  1609. {
  1610. if (LYFZ.BLL.BaseBllOperate.ExecuteSqlTran(clist) <= 0)
  1611. { MessageBoxCustom.Show("保存失败!"); return; }
  1612. MessageBoxCustom.Show("保存成功!");
  1613. this.bl = true;
  1614. this.BindReturningItems();
  1615. }
  1616. }
  1617. #endregion
  1618. }
  1619. catch (Exception ex)
  1620. { MessageBoxCustom.Show(ex.Message); }
  1621. }
  1622. /// <summary>
  1623. /// 选择满意度
  1624. /// </summary>
  1625. /// <param name="sender"></param>
  1626. /// <param name="e"></param>
  1627. protected override void cmSfrs_Scores_SelectedIndexChanged(object sender, EventArgs e)
  1628. {
  1629. try
  1630. {
  1631. DataTable dt = new DataTable();
  1632. for (int i = 0; i < dgv2.SelectedRows.Count; i++)
  1633. {
  1634. dgv2.SelectedRows[i].Cells["Sfrs_Scores"].Value = cmSfrs_Scores.Text;
  1635. dt = sfrsbll.GetList("Sfrs_Name='" + dgv2.SelectedRows[i].Cells["Sfrs_Scores"].Value + "'").Tables[0];
  1636. if (dt.Rows.Count > 0)
  1637. { dgv2.SelectedRows[i].Cells["满意分值"].Value = dt.Rows[0]["Sfrs_Scores"].ToString(); }
  1638. }
  1639. }
  1640. catch (Exception ex)
  1641. { MessageBoxCustom.Show(ex.Message); }
  1642. }
  1643. /// <summary>
  1644. /// dgv控件里面塞下拉框
  1645. /// </summary>
  1646. /// <param name="sender"></param>
  1647. /// <param name="e"></param>
  1648. protected override void dgv2_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
  1649. {
  1650. if (this.dgv2.Rows.Count > 0)
  1651. {
  1652. if (this.dgv2.CurrentCell.ColumnIndex == this.dgv2.Columns["Sfrs_Scores"].Index)
  1653. {
  1654. DataGridViewCell cell = this.dgv2.Rows[e.RowIndex].Cells[e.ColumnIndex];
  1655. Rectangle rect = this.dgv2.GetCellDisplayRectangle(cell.ColumnIndex, cell.RowIndex, true);
  1656. this.cmSfrs_Scores.Location = new Point(rect.Location.X + this.dgv2.Location.X, rect.Location.Y + this.dgv2.Location.Y + 1);
  1657. this.cmSfrs_Scores.Size = rect.Size;
  1658. if (cell.Value != null)
  1659. { this.cmSfrs_Scores.Text = (string)cell.Value; }
  1660. this.cmSfrs_Scores.Visible = true;
  1661. this.cmSfrs_Scores.Focus();
  1662. }
  1663. }
  1664. }
  1665. /// <summary>
  1666. ///
  1667. /// </summary>
  1668. /// <param name="sender"></param>
  1669. /// <param name="e"></param>
  1670. protected override void cmSfrs_Scores_Leave(object sender, EventArgs e)
  1671. {
  1672. this.dgv2.CurrentRow.Cells["Sfrs_Scores"].Value = this.cmSfrs_Scores.Text.Trim();
  1673. this.cmSfrs_Scores.Visible = false;
  1674. }
  1675. /// <summary>
  1676. /// 关闭
  1677. /// </summary>
  1678. /// <param name="sender"></param>
  1679. /// <param name="e"></param>
  1680. protected override void btnClose_Click(object sender, EventArgs e)
  1681. { this.Close(); }
  1682. }
  1683. }