FrmCustomerSatisfactionRecord.cs 102 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029
  1. using LYFZ.ComponentLibrary;
  2. using LYFZ.Software.MainBusiness.DoorCityProcess;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Data;
  7. using System.Drawing;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Windows.Forms;
  11. namespace LYFZ.Software.MainBusiness.CustomerSatisfactionRecord
  12. {
  13. public partial class FrmCustomerSatisfactionRecord : LYFZ.Software.UI.CustomerSatisfactionRecord.FrmCustomerSatisfactionRecord
  14. {
  15. private delegate void UpdateControl();
  16. List<LYFZ.Software.MainBusiness.EnumPermissions.BusinessType> Versions = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessTypeList();
  17. LYFZ.BLL.BLL_ErpSatisfactionSurvey sfsbll = new BLL.BLL_ErpSatisfactionSurvey();
  18. public FrmCustomerSatisfactionRecord()
  19. {
  20. this.ucPagerEx1.EventPaging += ucPagerEx1_EventPaging;
  21. this.ucPagerEx2.EventPaging += ucPagerEx2_EventPaging;
  22. this.ucPagerEx3.EventPaging += ucPagerEx3_EventPaging;
  23. this.ucPagerEx4.EventPaging += ucPagerEx4_EventPaging;
  24. this.ucPagerEx5.EventPaging += ucPagerEx5_EventPaging;
  25. this.ucPagerEx6.EventPaging += ucPagerEx6_EventPaging;
  26. this.ucPagerEx7.EventPaging += ucPagerEx7_EventPaging;
  27. this.ucPagerEx8.EventPaging += ucPagerEx8_EventPaging;
  28. this.btnExport.Click += btnExport_Click;
  29. this.IsOthersurveys();
  30. this.dgv1.MouseDoubleClick += dgv1_MouseDoubleClick;
  31. this.dgv2.MouseDoubleClick += dgv2_MouseDoubleClick;
  32. this.dgv3.MouseDoubleClick += dgv3_MouseDoubleClick;
  33. this.dgv4.MouseDoubleClick += dgv4_MouseDoubleClick;
  34. this.dgv5.MouseDoubleClick += dgv5_MouseDoubleClick;
  35. this.dgv6.MouseDoubleClick += dgv6_MouseDoubleClick;
  36. this.dgv7.MouseDoubleClick += dgv7_MouseDoubleClick;
  37. this.dgv8.MouseDoubleClick += dgv8_MouseDoubleClick;
  38. }
  39. /// <summary>
  40. /// 窗体加载事件
  41. /// </summary>
  42. /// <param name="sender"></param>
  43. /// <param name="e"></param>
  44. protected override void FrmCustomerSatisfactionRecord_Shown(object sender, EventArgs e)
  45. {
  46. try
  47. {
  48. this.txtTimeStart.Text = SDateTime.Now.ToString("yyyy-MM") + "-01";
  49. this.txtTimeEnd.Text = Convert.ToDateTime(SDateTime.Now.ToString("yyyy-MM") + "-01").AddMonths(1).AddSeconds(-1).ToString();
  50. //近期订单
  51. this.BindOrderForm();
  52. // 权限设置
  53. this.btnDc.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.CustomerSatisfactionRecordCompetence, CustomAttributes.OperatingAuthority.SatisfactionSurvey);
  54. this.btnDc.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.CustomerSatisfactionRecordCompetence, CustomAttributes.OperatingAuthority.SatisfactionSurveySet);
  55. }
  56. catch (Exception ex)
  57. { MessageBoxCustom.Show(ex.Message); }
  58. }
  59. /// <summary>
  60. /// 是否存在其它调查
  61. /// </summary>
  62. public void IsOthersurveys()
  63. {
  64. LYFZ.BLL.BLL_ErpSatisfactionSurveySet bll = new BLL.BLL_ErpSatisfactionSurveySet();
  65. DataTable dt = bll.GetList("Sfss_Type=7", "id asc").Tables[0];
  66. if (dt.Rows.Count > 0)
  67. {
  68. #region
  69. DataGridViewTextBoxColumn acCode = new DataGridViewTextBoxColumn();
  70. acCode.Name = "订单号";
  71. acCode.HeaderText = "订单号";
  72. this.dgv8.Columns.Add(acCode);
  73. acCode = new DataGridViewTextBoxColumn();
  74. acCode.Name = "订单类型";
  75. acCode.HeaderText = "订单类型";
  76. this.dgv8.Columns.Add(acCode);
  77. acCode = new DataGridViewTextBoxColumn();
  78. acCode.Name = "客户名称";
  79. acCode.HeaderText = "客户名称";
  80. this.dgv8.Columns.Add(acCode);
  81. acCode = new DataGridViewTextBoxColumn();
  82. acCode.Name = "客户电话";
  83. acCode.HeaderText = "客户电话";
  84. this.dgv8.Columns.Add(acCode);
  85. acCode = new DataGridViewTextBoxColumn();
  86. acCode.Name = "订单日期";
  87. acCode.HeaderText = "订单日期";
  88. this.dgv8.Columns.Add(acCode);
  89. for (int i = 0; i < dt.Rows.Count; i++)
  90. {
  91. acCode = new DataGridViewTextBoxColumn();
  92. acCode.Name = dt.Rows[i]["Sfss_Name"].ToString();
  93. acCode.HeaderText = dt.Rows[i]["Sfss_Name"].ToString();
  94. this.dgv8.Columns.Add(acCode);
  95. acCode = new DataGridViewTextBoxColumn();
  96. acCode.Name = "回访人员";
  97. acCode.HeaderText = "回访人员";
  98. this.dgv8.Columns.Add(acCode);
  99. acCode = new DataGridViewTextBoxColumn();
  100. acCode.Name = "回访日期";
  101. acCode.HeaderText = "回访日期";
  102. this.dgv8.Columns.Add(acCode);
  103. acCode = new DataGridViewTextBoxColumn();
  104. acCode.Name = "备注";
  105. acCode.HeaderText = "备注";
  106. this.dgv8.Columns.Add(acCode);
  107. }
  108. #endregion
  109. }
  110. else
  111. { this.tabPage8.Parent = null; }
  112. }
  113. /// <summary>
  114. /// 调查
  115. /// </summary>
  116. /// <param name="sender"></param>
  117. /// <param name="e"></param>
  118. protected override void btnDc_Click(object sender, EventArgs e)
  119. {
  120. LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation frm = new Satisfaction.FrmSatisfactionInvestigation();
  121. if (this.tab.SelectedTab.Name == "tabPage1")// 订单
  122. {
  123. if (this.dgv1.SelectedRows.Count == 0)
  124. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  125. frm.Ord_Number = this.dgv1.CurrentRow.Cells["Column1"].Value.ToString();
  126. frm.Ord_Number_Deputy = "";
  127. frm.CustomerName = this.dgv1.CurrentRow.Cells["Column2"].Value.ToString();
  128. frm.Type = "0";
  129. }
  130. else if (this.tab.SelectedTab.Name == "tabPage2")// 选衣
  131. {
  132. if (this.dgv2.SelectedRows.Count == 0)
  133. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  134. frm.Ord_Number = this.dgv2.CurrentRow.Cells["dataGridViewTextBoxColumn1"].Value.ToString();
  135. frm.Ord_Number_Deputy = this.dgv2.CurrentRow.Cells["Column83"].Value.ToString();
  136. frm.CustomerName = this.dgv2.CurrentRow.Cells["dataGridViewTextBoxColumn2"].Value.ToString();
  137. frm.Type = "1";
  138. }
  139. else if (this.tab.SelectedTab.Name == "tabPage3")// 拍照
  140. {
  141. if (this.dgv3.SelectedRows.Count == 0)
  142. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  143. frm.Ord_Number = this.dgv3.CurrentRow.Cells["dataGridViewTextBoxColumn10"].Value.ToString();
  144. frm.Ord_Number_Deputy = this.dgv3.CurrentRow.Cells["Column84"].Value.ToString();
  145. frm.CustomerName = this.dgv3.CurrentRow.Cells["dataGridViewTextBoxColumn11"].Value.ToString();
  146. frm.Type = "2";
  147. }
  148. else if (this.tab.SelectedTab.Name == "tabPage4")// 选片
  149. {
  150. if (this.dgv4.SelectedRows.Count == 0)
  151. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  152. frm.Ord_Number = this.dgv4.CurrentRow.Cells["dataGridViewTextBoxColumn19"].Value.ToString();
  153. frm.Ord_Number_Deputy = this.dgv4.CurrentRow.Cells["Column85"].Value.ToString();
  154. frm.CustomerName = this.dgv4.CurrentRow.Cells["dataGridViewTextBoxColumn20"].Value.ToString();
  155. frm.Type = "3";
  156. }
  157. else if (this.tab.SelectedTab.Name == "tabPage5")// 看样
  158. {
  159. if (this.dgv5.SelectedRows.Count == 0)
  160. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  161. frm.Ord_Number = this.dgv5.CurrentRow.Cells["dataGridViewTextBoxColumn28"].Value.ToString();
  162. frm.Ord_Number_Deputy = this.dgv5.CurrentRow.Cells["Column86"].Value.ToString();
  163. frm.CustomerName = this.dgv5.CurrentRow.Cells["dataGridViewTextBoxColumn29"].Value.ToString();
  164. frm.Type = "4";
  165. }
  166. else if (this.tab.SelectedTab.Name == "tabPage6")// 取件
  167. {
  168. if (this.dgv6.SelectedRows.Count == 0)
  169. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  170. frm.Ord_Number = this.dgv6.CurrentRow.Cells["dataGridViewTextBoxColumn39"].Value.ToString();
  171. frm.Ord_Number_Deputy = this.dgv6.CurrentRow.Cells["Column87"].Value.ToString();
  172. frm.CustomerName = this.dgv6.CurrentRow.Cells["dataGridViewTextBoxColumn40"].Value.ToString();
  173. frm.Type = "5";
  174. }
  175. else if (this.tab.SelectedTab.Name == "tabPage7")// 服务
  176. {
  177. if (dgv7.SelectedRows.Count == 0)
  178. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  179. frm.Ord_Number = this.dgv7.CurrentRow.Cells["dataGridViewTextBoxColumn48"].Value.ToString();
  180. frm.Ord_Number_Deputy = "";
  181. frm.CustomerName = this.dgv7.CurrentRow.Cells["dataGridViewTextBoxColumn49"].Value.ToString();
  182. frm.Type = "6";
  183. frm.fw1 = this.dgv7.CurrentRow.Cells["fw1"].Value.ToString();
  184. frm.fw2 = this.dgv7.CurrentRow.Cells["fw2"].Value.ToString();
  185. }
  186. else if (this.tab.SelectedTab.Name == "tabPage8")// 其它调查
  187. {
  188. if (this.dgv8.SelectedRows.Count == 0)
  189. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  190. frm.Ord_Number = this.dgv8.CurrentRow.Cells["订单号"].Value.ToString();
  191. frm.Ord_Number_Deputy = "";
  192. frm.CustomerName = this.dgv8.CurrentRow.Cells["客户名称"].Value.ToString();
  193. frm.Type = "7";
  194. }
  195. if (frm.ShowDialog() == DialogResult.OK)
  196. { this.btnSelect_Click(sender, e); }
  197. }
  198. /// <summary>
  199. /// 查询
  200. /// </summary>
  201. /// <param name="sender"></param>
  202. /// <param name="e"></param>
  203. protected override void btnSelect_Click(object sender, EventArgs e)
  204. {
  205. try
  206. {
  207. if (this.tab.SelectedTab.Name == "tabPage1")
  208. { this.BindOrderForm(); }
  209. else if (this.tab.SelectedTab.Name == "tabPage2")
  210. { this.BindChooseClothes(); }
  211. else if (this.tab.SelectedTab.Name == "tabPage3")
  212. { this.BindPhotography(); }
  213. else if (this.tab.SelectedTab.Name == "tabPage4")
  214. { this.BindSelectionFilms(); }
  215. else if (this.tab.SelectedTab.Name == "tabPage5")
  216. { this.BindLookLike(); }
  217. else if (this.tab.SelectedTab.Name == "tabPage6")
  218. { this.BindPickup(); }
  219. else if (this.tab.SelectedTab.Name == "tabPage7")
  220. { this.BindService(); }
  221. else if (this.tab.SelectedTab.Name == "tabPage8")
  222. { this.BindOtherSurveys(); }
  223. }
  224. catch (Exception ex)
  225. { MessageBoxCustom.Show(ex.Message); }
  226. }
  227. /// <summary>
  228. /// 导出
  229. /// </summary>
  230. /// <param name="sender"></param>
  231. /// <param name="e"></param>
  232. void btnExport_Click(object sender, EventArgs e)
  233. {
  234. try
  235. {
  236. if (this.tab.SelectedTab.Name == "tabPage1")
  237. { this.dgv1.ExportDataTable(); }
  238. else if (this.tab.SelectedTab.Name == "tabPage2")
  239. { this.dgv2.ExportDataTable(); }
  240. else if (this.tab.SelectedTab.Name == "tabPage3")
  241. { this.dgv3.ExportDataTable(); }
  242. else if (this.tab.SelectedTab.Name == "tabPage4")
  243. { this.dgv4.ExportDataTable(); }
  244. else if (this.tab.SelectedTab.Name == "tabPage5")
  245. { this.dgv5.ExportDataTable(); }
  246. else if (this.tab.SelectedTab.Name == "tabPage6")
  247. { this.dgv6.ExportDataTable(); }
  248. else if (this.tab.SelectedTab.Name == "tabPage7")
  249. { this.dgv7.ExportDataTable(); }
  250. else if (this.tab.SelectedTab.Name == "tabPage8")
  251. { this.dgv8.ExportDataTable(); }
  252. }
  253. catch (Exception ex)
  254. { MessageBoxCustom.Show(ex.Message); }
  255. }
  256. /// <summary>
  257. /// 关闭
  258. /// </summary>
  259. /// <param name="sender"></param>
  260. /// <param name="e"></param>
  261. protected override void btnClose_Click(object sender, EventArgs e)
  262. { this.Close(); }
  263. /// <summary>
  264. /// 选项卡事件
  265. /// </summary>
  266. /// <param name="sender"></param>
  267. /// <param name="e"></param>
  268. protected override void tab_SelectedIndexChanged(object sender, EventArgs e)
  269. {
  270. try
  271. {
  272. if (this.tab.SelectedTab.Name == "tabPage1")
  273. { this.BindOrderForm(); }
  274. else if (this.tab.SelectedTab.Name == "tabPage2")
  275. {
  276. this.BindChooseClothes(); }
  277. else if (this.tab.SelectedTab.Name == "tabPage3")
  278. {
  279. this.BindPhotography();
  280. }
  281. else if (this.tab.SelectedTab.Name == "tabPage4")
  282. {
  283. this.BindSelectionFilms();
  284. }
  285. else if (this.tab.SelectedTab.Name == "tabPage5")
  286. {
  287. this.BindLookLike();
  288. }
  289. else if (this.tab.SelectedTab.Name == "tabPage6")
  290. {
  291. this.BindPickup();
  292. }
  293. else if (this.tab.SelectedTab.Name == "tabPage7")
  294. {
  295. this.BindService();
  296. }
  297. else if (this.tab.SelectedTab.Name == "tabPage8")
  298. {
  299. this.BindOtherSurveys();
  300. }
  301. }
  302. catch (Exception ex)
  303. { MessageBoxCustom.Show(ex.Message); }
  304. }
  305. /// <summary>
  306. /// 调查设置
  307. /// </summary>
  308. /// <param name="sender"></param>
  309. /// <param name="e"></param>
  310. protected override void btnSet_Click(object sender, EventArgs e)
  311. {
  312. LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction.FrmCustomerSatisfactionSet frm = new Satisfaction.FrmCustomerSatisfactionSet();
  313. frm.ShowDialog();
  314. }
  315. #region 列表双击事件
  316. /// <summary>
  317. ///
  318. /// </summary>
  319. /// <param name="sender"></param>
  320. /// <param name="e"></param>
  321. void dgv1_MouseDoubleClick(object sender, MouseEventArgs e)
  322. {
  323. if (e.Location.Y > this.dgv1.ColumnHeadersHeight)
  324. {
  325. if (this.dgv1.SelectedRows.Count == 0)
  326. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  327. LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation frm = new Satisfaction.FrmSatisfactionInvestigation();
  328. frm.Ord_Number = this.dgv1.CurrentRow.Cells["Column1"].Value.ToString();
  329. frm.Ord_Number_Deputy = "";
  330. frm.CustomerName = this.dgv1.CurrentRow.Cells["Column2"].Value.ToString();
  331. frm.Type = "0";
  332. if (frm.ShowDialog() == DialogResult.OK)
  333. { this.btnSelect_Click(sender, e); }
  334. }
  335. }
  336. /// <summary>
  337. ///
  338. /// </summary>
  339. /// <param name="sender"></param>
  340. /// <param name="e"></param>
  341. void dgv2_MouseDoubleClick(object sender, MouseEventArgs e)
  342. {
  343. if (e.Location.Y > this.dgv2.ColumnHeadersHeight)
  344. {
  345. if (this.dgv2.SelectedRows.Count == 0)
  346. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  347. LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation frm = new Satisfaction.FrmSatisfactionInvestigation();
  348. frm.Ord_Number = this.dgv2.CurrentRow.Cells["dataGridViewTextBoxColumn1"].Value.ToString();
  349. frm.Ord_Number_Deputy = this.dgv2.CurrentRow.Cells["Column83"].Value.ToString();
  350. frm.CustomerName = this.dgv2.CurrentRow.Cells["dataGridViewTextBoxColumn2"].Value.ToString();
  351. frm.Type = "1";
  352. if (frm.ShowDialog() == DialogResult.OK)
  353. { this.btnSelect_Click(sender, e); }
  354. }
  355. }
  356. /// <summary>
  357. ///
  358. /// </summary>
  359. /// <param name="sender"></param>
  360. /// <param name="e"></param>
  361. void dgv3_MouseDoubleClick(object sender, MouseEventArgs e)
  362. {
  363. if (e.Location.Y > this.dgv3.ColumnHeadersHeight)
  364. {
  365. if (this.dgv3.SelectedRows.Count == 0)
  366. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  367. LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation frm = new Satisfaction.FrmSatisfactionInvestigation();
  368. frm.Ord_Number = this.dgv3.CurrentRow.Cells["dataGridViewTextBoxColumn10"].Value.ToString();
  369. frm.Ord_Number_Deputy = this.dgv3.CurrentRow.Cells["Column84"].Value.ToString();
  370. frm.CustomerName = this.dgv3.CurrentRow.Cells["dataGridViewTextBoxColumn11"].Value.ToString();
  371. frm.StrID = this.dgv3.CurrentRow.Cells["ID"].Value.ToString();
  372. frm.Type = "2";
  373. if (frm.ShowDialog() == DialogResult.OK)
  374. { btnSelect_Click(sender, e); }
  375. }
  376. }
  377. /// <summary>
  378. ///
  379. /// </summary>
  380. /// <param name="sender"></param>
  381. /// <param name="e"></param>
  382. void dgv4_MouseDoubleClick(object sender, MouseEventArgs e)
  383. {
  384. if (e.Location.Y > this.dgv4.ColumnHeadersHeight)
  385. {
  386. if (this.dgv4.SelectedRows.Count == 0)
  387. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  388. LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation frm = new Satisfaction.FrmSatisfactionInvestigation();
  389. frm.Ord_Number = this.dgv4.CurrentRow.Cells["dataGridViewTextBoxColumn19"].Value.ToString();
  390. frm.Ord_Number_Deputy = this.dgv4.CurrentRow.Cells["Column85"].Value.ToString();
  391. frm.CustomerName = this.dgv4.CurrentRow.Cells["dataGridViewTextBoxColumn20"].Value.ToString();
  392. frm.Type = "3";
  393. if (frm.ShowDialog() == DialogResult.OK)
  394. { this.btnSelect_Click(sender, e); }
  395. }
  396. }
  397. /// <summary>
  398. ///
  399. /// </summary>
  400. /// <param name="sender"></param>
  401. /// <param name="e"></param>
  402. void dgv5_MouseDoubleClick(object sender, MouseEventArgs e)
  403. {
  404. if (e.Location.Y > this.dgv5.ColumnHeadersHeight)
  405. {
  406. if (this.dgv5.SelectedRows.Count == 0)
  407. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  408. LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation frm = new Satisfaction.FrmSatisfactionInvestigation();
  409. frm.Ord_Number = this.dgv5.CurrentRow.Cells["dataGridViewTextBoxColumn28"].Value.ToString();
  410. frm.Ord_Number_Deputy = this.dgv5.CurrentRow.Cells["Column86"].Value.ToString();
  411. frm.CustomerName = this.dgv5.CurrentRow.Cells["dataGridViewTextBoxColumn29"].Value.ToString();
  412. frm.Type = "4";
  413. if (frm.ShowDialog() == DialogResult.OK)
  414. { this.btnSelect_Click(sender, e); }
  415. }
  416. }
  417. /// <summary>
  418. ///
  419. /// </summary>
  420. /// <param name="sender"></param>
  421. /// <param name="e"></param>
  422. void dgv6_MouseDoubleClick(object sender, MouseEventArgs e)
  423. {
  424. if (e.Location.Y > this.dgv6.ColumnHeadersHeight)
  425. {
  426. if (this.dgv6.SelectedRows.Count == 0)
  427. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  428. LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation frm = new Satisfaction.FrmSatisfactionInvestigation();
  429. frm.Ord_Number = this.dgv6.CurrentRow.Cells["dataGridViewTextBoxColumn39"].Value.ToString();
  430. frm.Ord_Number_Deputy = this.dgv6.CurrentRow.Cells["Column87"].Value.ToString();
  431. frm.CustomerName = this.dgv6.CurrentRow.Cells["dataGridViewTextBoxColumn40"].Value.ToString();
  432. frm.Type = "5";
  433. if (frm.ShowDialog() == DialogResult.OK)
  434. { this.btnSelect_Click(sender, e); }
  435. }
  436. }
  437. /// <summary>
  438. ///
  439. /// </summary>
  440. /// <param name="sender"></param>
  441. /// <param name="e"></param>
  442. void dgv7_MouseDoubleClick(object sender, MouseEventArgs e)
  443. {
  444. if (e.Location.Y > this.dgv7.ColumnHeadersHeight)
  445. {
  446. if (this.dgv7.SelectedRows.Count == 0)
  447. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  448. LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation frm = new Satisfaction.FrmSatisfactionInvestigation();
  449. frm.Ord_Number = this.dgv7.CurrentRow.Cells["dataGridViewTextBoxColumn48"].Value.ToString();
  450. frm.Ord_Number_Deputy = "";
  451. frm.CustomerName = this.dgv7.CurrentRow.Cells["dataGridViewTextBoxColumn49"].Value.ToString();
  452. frm.Type = "6";
  453. frm.fw1 = this.dgv7.CurrentRow.Cells["fw1"].Value.ToString();
  454. frm.fw2 = this.dgv7.CurrentRow.Cells["fw2"].Value.ToString();
  455. if (frm.ShowDialog() == DialogResult.OK)
  456. { this.btnSelect_Click(sender, e); }
  457. }
  458. }
  459. /// <summary>
  460. ///
  461. /// </summary>
  462. /// <param name="sender"></param>
  463. /// <param name="e"></param>
  464. void dgv8_MouseDoubleClick(object sender, MouseEventArgs e)
  465. {
  466. if (e.Location.Y > this.dgv8.ColumnHeadersHeight)
  467. {
  468. if (this.dgv8.SelectedRows.Count == 0)
  469. { MessageBoxCustom.Show("请选择你要调查的订单!"); return; }
  470. LYFZ.Software.MainBusiness.CustomerSatisfactionRecord.Satisfaction.FrmSatisfactionInvestigation frm = new Satisfaction.FrmSatisfactionInvestigation();
  471. frm.Ord_Number = this.dgv8.CurrentRow.Cells["订单号"].Value.ToString();
  472. frm.Ord_Number_Deputy = "";
  473. frm.CustomerName = this.dgv8.CurrentRow.Cells["客户名称"].Value.ToString();
  474. frm.Type = "7";
  475. if (frm.ShowDialog() == DialogResult.OK)
  476. { this.btnSelect_Click(sender, e); }
  477. }
  478. }
  479. #endregion
  480. #region 绑定数据
  481. #region 绑定近期订单
  482. /// <summary>
  483. /// 绑定近期订单
  484. /// </summary>
  485. public void BindOrderForm()
  486. {
  487. this.ucPagerEx1.PageCurrent = 1;
  488. this.ucPagerEx1.PageSize = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  489. this.ucPagerEx1.Bind();
  490. }
  491. /// <summary>
  492. /// 画分页
  493. /// </summary>
  494. /// <param name="e"></param>
  495. /// <returns></returns>
  496. private int ucPagerEx1_EventPaging(UCPager.EventPagingArg e)
  497. {
  498. LYFZ.UCPager.PageData pageData = new LYFZ.UCPager.PageData();
  499. this.dgv1.Rows.Clear();
  500. DataTable dt = new DataTable();
  501. StringBuilder sql = new StringBuilder();
  502. if (!string.IsNullOrEmpty(this.txtTimeStart.DateValue) && !string.IsNullOrEmpty(this.txtTimeEnd.DateValue))
  503. { sql.Append(PublicCodeClasses.GetDateTime("Ord_CreateDatetime", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + "and Ord_Class='1'"); }
  504. else
  505. { sql.Append(" "); }
  506. DataTable dtSurvey = sfsbll.Vw_ErpSatisfactionSurvey("").Tables[0];
  507. LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
  508. {
  509. pageData.TableName = "Vw_Customer_PaymentOrders";
  510. pageData.PageIndex = this.ucPagerEx1.PageCurrent;
  511. pageData.PageSize = this.ucPagerEx1.PageSize;
  512. pageData.QueryCondition = sql.ToString();
  513. pageData.QueryFieldName = "ID,Ord_Number,Ord_DividedShop,Ord_Type,Ord_PhotographyCategory,Ord_SeriesName,Ord_SeriesPrice,Ord_Class,GP_OrderNumber,GP_CustomerGroupID,Cus_Name,Cus_Name_py,Cus_Telephone,Ord_OrdersPersonID,Ord_OrdersPerson,Ord_CreateDatetime,PickupStatusCount";
  514. pageData.OrderStr = " ID desc ";
  515. dt = pageData.QueryDataTable().Tables[0];
  516. if (dt.Rows.Count > 0)
  517. {
  518. this.Invoke(new UpdateControl(delegate()
  519. {
  520. for (int t = 0; t < dt.Rows.Count; t++)
  521. {
  522. #region
  523. DataGridViewRow dgvr = new DataGridViewRow();
  524. DataGridViewCell cell = null;
  525. cell = new DataGridViewTextBoxCell();
  526. cell.Value = dt.Rows[t]["Ord_Number"].ToString().Trim();
  527. dgvr.Cells.Add(cell);
  528. cell = new DataGridViewTextBoxCell();
  529. cell.Value = dt.Rows[t]["Ord_Type"].ToString().Trim() == "0" ? "婚纱订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "1" ? "儿童订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "2" ? "写真订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "3" ? "服务订单" : "其它消费";
  530. dgvr.Cells.Add(cell);
  531. cell = new DataGridViewTextBoxCell();
  532. cell.Value = dt.Rows[t]["Cus_Name"].ToString().Trim();
  533. dgvr.Cells.Add(cell);
  534. cell = new DataGridViewTextBoxCell();
  535. cell.Value = dt.Rows[t]["Cus_Telephone"].ToString().Trim();
  536. dgvr.Cells.Add(cell);
  537. cell = new DataGridViewTextBoxCell();
  538. cell.Value = Convert.ToDateTime(dt.Rows[t]["Ord_CreateDatetime"].ToString().Trim()).ToString("yyyy-MM-dd");
  539. dgvr.Cells.Add(cell);
  540. cell = new DataGridViewTextBoxCell();
  541. cell.Value = dt.Rows[t]["Ord_OrdersPerson"].ToString().Trim();
  542. dgvr.Cells.Add(cell);
  543. DataRow[] dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ord_Number"].ToString().Trim() + "' and Sfs_Type=0 and Sfs_SurveySetID=1", " id asc");
  544. if (dtleng.Length > 0)
  545. {
  546. cell = new DataGridViewTextBoxCell();
  547. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  548. dgvr.Cells.Add(cell);
  549. cell = new DataGridViewTextBoxCell();
  550. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  551. dgvr.Cells.Add(cell);
  552. cell = new DataGridViewTextBoxCell();
  553. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  554. dgvr.Cells.Add(cell);
  555. cell = new DataGridViewTextBoxCell();
  556. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  557. dgvr.Cells.Add(cell);
  558. }
  559. else
  560. {
  561. cell = new DataGridViewTextBoxCell();
  562. cell.Value = "";
  563. dgvr.Cells.Add(cell);
  564. cell = new DataGridViewTextBoxCell();
  565. cell.Value = "";
  566. dgvr.Cells.Add(cell);
  567. cell = new DataGridViewTextBoxCell();
  568. cell.Value = "";
  569. dgvr.Cells.Add(cell);
  570. cell = new DataGridViewTextBoxCell();
  571. cell.Value = "";
  572. dgvr.Cells.Add(cell);
  573. }
  574. this.dgv1.Rows.Add(dgvr);
  575. #endregion
  576. }
  577. }));
  578. }
  579. });
  580. try
  581. {
  582. this.ucPagerEx1.TbDataSource = dt;
  583. this.dgv1.ClearSelection();
  584. }
  585. catch { }
  586. return pageData.TotalCount;
  587. }
  588. #endregion
  589. #region 绑定近期选衣
  590. /// <summary>
  591. /// 绑定近期选衣
  592. /// </summary>
  593. public void BindChooseClothes()
  594. {
  595. this.ucPagerEx2.PageCurrent = 1;
  596. this.ucPagerEx2.PageSize = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  597. this.ucPagerEx2.Bind();
  598. }
  599. /// <summary>
  600. /// 画分页
  601. /// </summary>
  602. /// <param name="e"></param>
  603. /// <returns></returns>
  604. private int ucPagerEx2_EventPaging(UCPager.EventPagingArg e)
  605. {
  606. LYFZ.UCPager.PageData pageData = new LYFZ.UCPager.PageData();
  607. this.dgv2.Rows.Clear();
  608. DataTable dt = new DataTable();
  609. StringBuilder sql = new StringBuilder();
  610. if (!string.IsNullOrEmpty(this.txtTimeStart.DateValue) && !string.IsNullOrEmpty(this.txtTimeEnd.DateValue))
  611. { sql.Append(PublicCodeClasses.GetDateTime("选衣时间", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and 礼服师状态='1' and Ord_Class='1'"); }
  612. else
  613. { sql.Append(" "); }
  614. DataTable dtSurvey = sfsbll.Vw_ErpSatisfactionSurvey("").Tables[0];
  615. LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
  616. {
  617. pageData.TableName = "Vw_OrdersWageDigital";
  618. pageData.PageIndex = this.ucPagerEx2.PageCurrent;
  619. pageData.PageSize = this.ucPagerEx2.PageSize;
  620. pageData.QueryCondition = sql.ToString();
  621. pageData.QueryFieldName = "Id,Ordv_Number,Ordv_ViceNumber,Ordv_DigitalNumber,Ord_Number,Ord_Type,Ord_Class,Ord_PhotographyCategory,Ord_SeriesName,Ord_SeriesPrice,拍摄名称,客户名称,客户电话,礼服师ID,礼服师,礼服师状态,选衣时间";
  622. pageData.OrderStr = " ID desc ";
  623. dt = pageData.QueryDataTable().Tables[0];
  624. if (dt.Rows.Count > 0)
  625. {
  626. this.Invoke(new UpdateControl(delegate()
  627. {
  628. for (int t = 0; t < dt.Rows.Count; t++)
  629. {
  630. #region
  631. DataGridViewRow dgvr = new DataGridViewRow();
  632. DataGridViewCell cell = null;
  633. cell = new DataGridViewTextBoxCell();
  634. cell.Value = dt.Rows[t]["Ord_Number"].ToString().Trim();
  635. dgvr.Cells.Add(cell);
  636. cell = new DataGridViewTextBoxCell();
  637. cell.Value = dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim();
  638. dgvr.Cells.Add(cell);
  639. cell = new DataGridViewTextBoxCell();
  640. cell.Value = dt.Rows[t]["Ord_Type"].ToString().Trim() == "0" ? "婚纱订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "1" ? "儿童订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "2" ? "写真订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "3" ? "服务订单" : "其它消费";
  641. dgvr.Cells.Add(cell);
  642. cell = new DataGridViewTextBoxCell();
  643. cell.Value = dt.Rows[t]["客户名称"].ToString().Trim();
  644. dgvr.Cells.Add(cell);
  645. cell = new DataGridViewTextBoxCell();
  646. cell.Value = dt.Rows[t]["客户电话"].ToString().Trim();
  647. dgvr.Cells.Add(cell);
  648. cell = new DataGridViewTextBoxCell();
  649. cell.Value = dt.Rows[t]["拍摄名称"].ToString().Trim();
  650. dgvr.Cells.Add(cell);
  651. cell = new DataGridViewTextBoxCell();
  652. cell.Value = dt.Rows[t]["选衣时间"].ToString().Trim() == "" ? "" : Convert.ToDateTime(dt.Rows[t]["选衣时间"].ToString().Trim()).ToString("yyyy-MM-dd");
  653. dgvr.Cells.Add(cell);
  654. cell = new DataGridViewTextBoxCell();
  655. cell.Value = dt.Rows[t]["礼服师状态"].ToString().Trim() == "1" ? "OK" : "未选";
  656. dgvr.Cells.Add(cell);
  657. cell = new DataGridViewTextBoxCell();
  658. cell.Value = dt.Rows[t]["礼服师ID"].ToString().Trim();
  659. dgvr.Cells.Add(cell);
  660. cell = new DataGridViewTextBoxCell();
  661. cell.Value = dt.Rows[t]["礼服师"].ToString().Trim();
  662. dgvr.Cells.Add(cell);
  663. DataRow[] dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ord_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim() + "' and Sfs_Type=1 and Sfs_SurveySetID=2", " id asc");
  664. if (dtleng.Length > 0)
  665. {
  666. cell = new DataGridViewTextBoxCell();
  667. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  668. dgvr.Cells.Add(cell);
  669. cell = new DataGridViewTextBoxCell();
  670. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  671. dgvr.Cells.Add(cell);
  672. cell = new DataGridViewTextBoxCell();
  673. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  674. dgvr.Cells.Add(cell);
  675. cell = new DataGridViewTextBoxCell();
  676. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  677. dgvr.Cells.Add(cell);
  678. }
  679. else
  680. {
  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 = "";
  689. dgvr.Cells.Add(cell);
  690. cell = new DataGridViewTextBoxCell();
  691. cell.Value = "";
  692. dgvr.Cells.Add(cell);
  693. }
  694. this.dgv2.Rows.Add(dgvr);
  695. #endregion
  696. }
  697. }));
  698. }
  699. });
  700. try
  701. {
  702. this.ucPagerEx2.TbDataSource = dt;
  703. this.dgv2.ClearSelection();
  704. }
  705. catch
  706. { }
  707. return pageData.TotalCount;
  708. }
  709. #endregion
  710. #region 绑定近期拍照
  711. /// <summary>
  712. /// 绑定近期拍照
  713. /// </summary>
  714. public void BindPhotography()
  715. {
  716. this.ucPagerEx3.PageCurrent = 1;
  717. this.ucPagerEx3.PageSize = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  718. this.ucPagerEx3.Bind();
  719. }
  720. /// <summary>
  721. /// 画分页
  722. /// </summary>
  723. /// <param name="e"></param>
  724. /// <returns></returns>
  725. private int ucPagerEx3_EventPaging(UCPager.EventPagingArg e)
  726. {
  727. LYFZ.UCPager.PageData pageData = new LYFZ.UCPager.PageData();
  728. this.dgv3.Rows.Clear();
  729. DataTable dt = new DataTable();
  730. StringBuilder sql = new StringBuilder();
  731. if (!string.IsNullOrEmpty(this.txtTimeStart.Text) && !string.IsNullOrEmpty(this.txtTimeEnd.Text))
  732. { sql.Append(PublicCodeClasses.GetDateTime("拍摄时间", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and 拍摄状态='1' and Ord_Class='1'"); }
  733. else
  734. { sql.Append(" "); }
  735. DataTable dtSurvey = sfsbll.Vw_ErpSatisfactionSurvey("").Tables[0];
  736. LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
  737. {
  738. pageData.TableName = "Vw_OrdersWagePhotography";
  739. pageData.PageIndex = this.ucPagerEx3.PageCurrent;
  740. pageData.PageSize = this.ucPagerEx3.PageSize;
  741. pageData.QueryCondition = sql.ToString();
  742. pageData.QueryFieldName = "ID,Ordpg_Number,Ordpg_ViceNumber,Ord_Type,Ord_Class,Ord_PhotographyCategory,Ord_SeriesName,Ord_SeriesPrice,客户名称,客户电话,拍摄名称,景点类别,服装套数,摄影师ID,摄影师名称,拍摄时间,拍摄状态,摄影助理ID,摄影助理名称,化妆师ID,化妆师名称,化妆助理ID,化妆助理名称,引导师ID,引导师名称";
  743. pageData.OrderStr = " ID desc ";
  744. dt = pageData.QueryDataTable().Tables[0];
  745. if (dt.Rows.Count > 0)
  746. {
  747. this.Invoke(new UpdateControl(delegate()
  748. {
  749. for (int t = 0; t < dt.Rows.Count; t++)
  750. {
  751. #region
  752. DataGridViewRow dgvr = new DataGridViewRow();
  753. DataGridViewCell cell = null;
  754. cell = new DataGridViewTextBoxCell();
  755. cell.Value = dt.Rows[t]["Ordpg_Number"].ToString().Trim();
  756. dgvr.Cells.Add(cell);
  757. cell = new DataGridViewTextBoxCell();
  758. cell.Value = dt.Rows[t]["Ordpg_ViceNumber"].ToString().Trim();
  759. dgvr.Cells.Add(cell);
  760. cell = new DataGridViewTextBoxCell();
  761. cell.Value = dt.Rows[t]["Ord_Type"].ToString().Trim() == "0" ? "婚纱订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "1" ? "儿童订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "2" ? "写真订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "3" ? "服务订单" : "其它消费";
  762. dgvr.Cells.Add(cell);
  763. cell = new DataGridViewTextBoxCell();
  764. cell.Value = dt.Rows[t]["客户名称"].ToString().Trim();
  765. dgvr.Cells.Add(cell);
  766. cell = new DataGridViewTextBoxCell();
  767. cell.Value = dt.Rows[t]["客户电话"].ToString().Trim();
  768. dgvr.Cells.Add(cell);
  769. cell = new DataGridViewTextBoxCell();
  770. cell.Value = dt.Rows[t]["拍摄名称"].ToString().Trim();
  771. dgvr.Cells.Add(cell);
  772. cell = new DataGridViewTextBoxCell();
  773. cell.Value = dt.Rows[t]["拍摄时间"].ToString().Trim() == "" ? "" : Convert.ToDateTime(dt.Rows[t]["拍摄时间"].ToString().Trim()).ToString("yyyy-MM-dd");
  774. dgvr.Cells.Add(cell);
  775. cell = new DataGridViewTextBoxCell();
  776. cell.Value = dt.Rows[t]["拍摄状态"].ToString().Trim() == "1" ? "OK" : "未拍";
  777. dgvr.Cells.Add(cell);
  778. cell = new DataGridViewTextBoxCell();
  779. cell.Value = dt.Rows[t]["摄影师ID"].ToString().Trim();
  780. dgvr.Cells.Add(cell);
  781. cell = new DataGridViewTextBoxCell();
  782. cell.Value = dt.Rows[t]["摄影师名称"].ToString().Trim();
  783. dgvr.Cells.Add(cell);
  784. #region 赋值
  785. DataRow[] dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ordpg_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordpg_ViceNumber"].ToString().Trim() + "' and Sfs_Type=2 and Sfs_SurveySetID=3", " id asc");
  786. if (dtleng.Length > 0)
  787. {
  788. cell = new DataGridViewTextBoxCell();
  789. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  790. dgvr.Cells.Add(cell);
  791. cell = new DataGridViewTextBoxCell();
  792. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  793. dgvr.Cells.Add(cell);
  794. cell = new DataGridViewTextBoxCell();
  795. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  796. dgvr.Cells.Add(cell);
  797. cell = new DataGridViewTextBoxCell();
  798. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  799. dgvr.Cells.Add(cell);
  800. }
  801. else
  802. {
  803. cell = new DataGridViewTextBoxCell();
  804. cell.Value = "";
  805. dgvr.Cells.Add(cell);
  806. cell = new DataGridViewTextBoxCell();
  807. cell.Value = "";
  808. dgvr.Cells.Add(cell);
  809. cell = new DataGridViewTextBoxCell();
  810. cell.Value = "";
  811. dgvr.Cells.Add(cell);
  812. cell = new DataGridViewTextBoxCell();
  813. cell.Value = "";
  814. dgvr.Cells.Add(cell);
  815. }
  816. #endregion
  817. cell = new DataGridViewTextBoxCell();
  818. cell.Value = dt.Rows[t]["摄影助理ID"].ToString().Trim();
  819. dgvr.Cells.Add(cell);
  820. cell = new DataGridViewTextBoxCell();
  821. cell.Value = dt.Rows[t]["摄影助理名称"].ToString().Trim();
  822. dgvr.Cells.Add(cell);
  823. #region 赋值
  824. dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ordpg_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordpg_ViceNumber"].ToString().Trim() + "' and Sfs_Type=2 and Sfs_SurveySetID=4", " id asc");
  825. if (dtleng.Length > 0)
  826. {
  827. cell = new DataGridViewTextBoxCell();
  828. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  829. dgvr.Cells.Add(cell);
  830. cell = new DataGridViewTextBoxCell();
  831. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  832. dgvr.Cells.Add(cell);
  833. cell = new DataGridViewTextBoxCell();
  834. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  835. dgvr.Cells.Add(cell);
  836. cell = new DataGridViewTextBoxCell();
  837. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  838. dgvr.Cells.Add(cell);
  839. }
  840. else
  841. {
  842. cell = new DataGridViewTextBoxCell();
  843. cell.Value = "";
  844. dgvr.Cells.Add(cell);
  845. cell = new DataGridViewTextBoxCell();
  846. cell.Value = "";
  847. dgvr.Cells.Add(cell);
  848. cell = new DataGridViewTextBoxCell();
  849. cell.Value = "";
  850. dgvr.Cells.Add(cell);
  851. cell = new DataGridViewTextBoxCell();
  852. cell.Value = "";
  853. dgvr.Cells.Add(cell);
  854. }
  855. #endregion
  856. cell = new DataGridViewTextBoxCell();
  857. cell.Value = dt.Rows[t]["化妆师ID"].ToString().Trim();
  858. dgvr.Cells.Add(cell);
  859. cell = new DataGridViewTextBoxCell();
  860. cell.Value = dt.Rows[t]["化妆师名称"].ToString().Trim();
  861. dgvr.Cells.Add(cell);
  862. #region 赋值
  863. dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ordpg_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordpg_ViceNumber"].ToString().Trim() + "' and Sfs_Type=2 and Sfs_SurveySetID=5", " id asc");
  864. if (dtleng.Length > 0)
  865. {
  866. cell = new DataGridViewTextBoxCell();
  867. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  868. dgvr.Cells.Add(cell);
  869. cell = new DataGridViewTextBoxCell();
  870. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  871. dgvr.Cells.Add(cell);
  872. cell = new DataGridViewTextBoxCell();
  873. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  874. dgvr.Cells.Add(cell);
  875. cell = new DataGridViewTextBoxCell();
  876. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  877. dgvr.Cells.Add(cell);
  878. }
  879. else
  880. {
  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 = "";
  889. dgvr.Cells.Add(cell);
  890. cell = new DataGridViewTextBoxCell();
  891. cell.Value = "";
  892. dgvr.Cells.Add(cell);
  893. }
  894. #endregion
  895. cell = new DataGridViewTextBoxCell();
  896. cell.Value = dt.Rows[t]["化妆助理ID"].ToString().Trim();
  897. dgvr.Cells.Add(cell);
  898. cell = new DataGridViewTextBoxCell();
  899. cell.Value = dt.Rows[t]["化妆助理名称"].ToString().Trim();
  900. dgvr.Cells.Add(cell);
  901. #region 赋值
  902. dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ordpg_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordpg_ViceNumber"].ToString().Trim() + "' and Sfs_Type=2 and Sfs_SurveySetID=6", " id asc");
  903. if (dtleng.Length > 0)
  904. {
  905. cell = new DataGridViewTextBoxCell();
  906. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  907. dgvr.Cells.Add(cell);
  908. cell = new DataGridViewTextBoxCell();
  909. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  910. dgvr.Cells.Add(cell);
  911. cell = new DataGridViewTextBoxCell();
  912. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  913. dgvr.Cells.Add(cell);
  914. cell = new DataGridViewTextBoxCell();
  915. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  916. dgvr.Cells.Add(cell);
  917. }
  918. else
  919. {
  920. cell = new DataGridViewTextBoxCell();
  921. cell.Value = "";
  922. dgvr.Cells.Add(cell);
  923. cell = new DataGridViewTextBoxCell();
  924. cell.Value = "";
  925. dgvr.Cells.Add(cell);
  926. cell = new DataGridViewTextBoxCell();
  927. cell.Value = "";
  928. dgvr.Cells.Add(cell);
  929. cell = new DataGridViewTextBoxCell();
  930. cell.Value = "";
  931. dgvr.Cells.Add(cell);
  932. }
  933. #endregion
  934. cell = new DataGridViewTextBoxCell();
  935. cell.Value = dt.Rows[t]["引导师ID"].ToString().Trim();
  936. dgvr.Cells.Add(cell);
  937. cell = new DataGridViewTextBoxCell();
  938. cell.Value = dt.Rows[t]["引导师名称"].ToString().Trim();
  939. dgvr.Cells.Add(cell);
  940. #region 赋值
  941. dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ordpg_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordpg_ViceNumber"].ToString().Trim() + "' and Sfs_Type=2 and Sfs_SurveySetID=7", " id asc");
  942. if (dtleng.Length > 0)
  943. {
  944. cell = new DataGridViewTextBoxCell();
  945. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  946. dgvr.Cells.Add(cell);
  947. cell = new DataGridViewTextBoxCell();
  948. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  949. dgvr.Cells.Add(cell);
  950. cell = new DataGridViewTextBoxCell();
  951. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  952. dgvr.Cells.Add(cell);
  953. cell = new DataGridViewTextBoxCell();
  954. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  955. dgvr.Cells.Add(cell);
  956. }
  957. else
  958. {
  959. cell = new DataGridViewTextBoxCell();
  960. cell.Value = "";
  961. dgvr.Cells.Add(cell);
  962. cell = new DataGridViewTextBoxCell();
  963. cell.Value = "";
  964. dgvr.Cells.Add(cell);
  965. cell = new DataGridViewTextBoxCell();
  966. cell.Value = "";
  967. dgvr.Cells.Add(cell);
  968. cell = new DataGridViewTextBoxCell();
  969. cell.Value = "";
  970. dgvr.Cells.Add(cell);
  971. }
  972. #endregion
  973. this.dgv3.Rows.Add(dgvr);
  974. #endregion
  975. }
  976. }));
  977. }
  978. });
  979. try
  980. {
  981. this.ucPagerEx3.TbDataSource = dt;
  982. this.dgv3.ClearSelection();
  983. }
  984. catch
  985. { }
  986. return pageData.TotalCount;
  987. }
  988. #endregion
  989. #region 绑定近期选片
  990. /// <summary>
  991. /// 绑定近期选片
  992. /// </summary>
  993. public void BindSelectionFilms()
  994. {
  995. this.ucPagerEx4.PageCurrent = 1;
  996. this.ucPagerEx4.PageSize = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  997. this.ucPagerEx4.Bind();
  998. }
  999. /// <summary>
  1000. /// 画分页
  1001. /// </summary>
  1002. /// <param name="e"></param>
  1003. /// <returns></returns>
  1004. private int ucPagerEx4_EventPaging(UCPager.EventPagingArg e)
  1005. {
  1006. LYFZ.UCPager.PageData pageData = new LYFZ.UCPager.PageData();
  1007. this.dgv4.Rows.Clear();
  1008. DataTable dt = new DataTable();
  1009. StringBuilder sql = new StringBuilder();
  1010. //if (!string.IsNullOrEmpty(this.txtTimeStart.Text) && !string.IsNullOrEmpty(this.txtTimeEnd.Text))
  1011. //{ sql.Append(" 1=1 and ((" + PublicCodeClasses.GetDateTime("选片时间", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and 选片状态='1') or (" + PublicCodeClasses.GetDateTime("初修时间", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and 初修状态='2') or (" + PublicCodeClasses.GetDateTime("精修时间", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and 精修状态='2')) and Ord_Class='1'"); }
  1012. if (!string.IsNullOrEmpty(this.txtTimeStart.Text) && !string.IsNullOrEmpty(this.txtTimeEnd.Text))
  1013. { sql.Append(PublicCodeClasses.GetDateTime("选片时间", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and 选片状态='1' and Ord_Class='1'"); }
  1014. DataTable dtSurvey = sfsbll.Vw_ErpSatisfactionSurvey("").Tables[0];
  1015. LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
  1016. {
  1017. pageData.TableName = "Vw_OrdersWageDigital";
  1018. pageData.PageIndex = this.ucPagerEx4.PageCurrent;
  1019. pageData.PageSize = this.ucPagerEx4.PageSize;
  1020. pageData.QueryCondition = sql.ToString();
  1021. pageData.QueryFieldName = "Id,Ordv_Number,Ordv_ViceNumber,Ordv_DigitalNumber,Ord_Number,Ord_Type,Ord_Class,Ord_PhotographyCategory,Ord_SeriesName,Ord_SeriesPrice,拍摄名称,客户名称,客户电话,选片师ID,选片师,选片状态,选片时间,初修师ID,初修师,初修状态,初修时间,精修师ID,精修师,精修状态,精修时间";
  1022. pageData.OrderStr = " ID desc ";
  1023. dt = pageData.QueryDataTable().Tables[0];
  1024. if (dt.Rows.Count > 0)
  1025. {
  1026. this.Invoke(new UpdateControl(delegate()
  1027. {
  1028. for (int t = 0; t < dt.Rows.Count; t++)
  1029. {
  1030. #region
  1031. DataGridViewRow dgvr = new DataGridViewRow();
  1032. DataGridViewCell cell = null;
  1033. cell = new DataGridViewTextBoxCell();
  1034. cell.Value = dt.Rows[t]["Ord_Number"].ToString().Trim();
  1035. dgvr.Cells.Add(cell);
  1036. cell = new DataGridViewTextBoxCell();
  1037. cell.Value = dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim();
  1038. dgvr.Cells.Add(cell);
  1039. cell = new DataGridViewTextBoxCell();
  1040. cell.Value = dt.Rows[t]["Ord_Type"].ToString().Trim() == "0" ? "婚纱订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "1" ? "儿童订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "2" ? "写真订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "3" ? "服务订单" : "其它消费";
  1041. dgvr.Cells.Add(cell);
  1042. cell = new DataGridViewTextBoxCell();
  1043. cell.Value = dt.Rows[t]["客户名称"].ToString().Trim();
  1044. dgvr.Cells.Add(cell);
  1045. cell = new DataGridViewTextBoxCell();
  1046. cell.Value = dt.Rows[t]["客户电话"].ToString().Trim();
  1047. dgvr.Cells.Add(cell);
  1048. cell = new DataGridViewTextBoxCell();
  1049. cell.Value = dt.Rows[t]["拍摄名称"].ToString().Trim();
  1050. dgvr.Cells.Add(cell);
  1051. cell = new DataGridViewTextBoxCell();
  1052. cell.Value = dt.Rows[t]["选片时间"].ToString().Trim() == "" ? "" : Convert.ToDateTime(dt.Rows[t]["选片时间"].ToString().Trim()).ToString("yyyy-MM-dd");
  1053. dgvr.Cells.Add(cell);
  1054. cell = new DataGridViewTextBoxCell();
  1055. cell.Value = dt.Rows[t]["选片状态"].ToString().Trim() == "1" ? "OK" : "未选";
  1056. dgvr.Cells.Add(cell);
  1057. cell = new DataGridViewTextBoxCell();
  1058. cell.Value = dt.Rows[t]["选片师ID"].ToString().Trim();
  1059. dgvr.Cells.Add(cell);
  1060. cell = new DataGridViewTextBoxCell();
  1061. cell.Value = dt.Rows[t]["选片师"].ToString().Trim();
  1062. dgvr.Cells.Add(cell);
  1063. #region 赋值
  1064. DataRow[] dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ord_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim() + "' and Sfs_Type=3 and Sfs_SurveySetID=8", " id asc");
  1065. if (dtleng.Length > 0)
  1066. {
  1067. cell = new DataGridViewTextBoxCell();
  1068. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  1069. dgvr.Cells.Add(cell);
  1070. cell = new DataGridViewTextBoxCell();
  1071. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  1072. dgvr.Cells.Add(cell);
  1073. cell = new DataGridViewTextBoxCell();
  1074. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  1075. dgvr.Cells.Add(cell);
  1076. cell = new DataGridViewTextBoxCell();
  1077. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  1078. dgvr.Cells.Add(cell);
  1079. }
  1080. else
  1081. {
  1082. cell = new DataGridViewTextBoxCell();
  1083. cell.Value = "";
  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 = "";
  1093. dgvr.Cells.Add(cell);
  1094. }
  1095. #endregion
  1096. cell = new DataGridViewTextBoxCell();
  1097. cell.Value = dt.Rows[t]["初修师ID"].ToString().Trim();
  1098. dgvr.Cells.Add(cell);
  1099. cell = new DataGridViewTextBoxCell();
  1100. cell.Value = dt.Rows[t]["初修时间"].ToString().Trim() == "" ? "" : Convert.ToDateTime(dt.Rows[t]["初修时间"].ToString().Trim()).ToString("yyyy-MM-dd");
  1101. dgvr.Cells.Add(cell);
  1102. cell = new DataGridViewTextBoxCell();
  1103. cell.Value = dt.Rows[t]["初修状态"].ToString().Trim() == "2" ? "OK" : "未修";
  1104. dgvr.Cells.Add(cell);
  1105. cell = new DataGridViewTextBoxCell();
  1106. cell.Value = dt.Rows[t]["初修师"].ToString().Trim();
  1107. dgvr.Cells.Add(cell);
  1108. #region 赋值
  1109. dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ord_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim() + "' and Sfs_Type=3 and Sfs_SurveySetID=9", " id asc");
  1110. if (dtleng.Length > 0)
  1111. {
  1112. cell = new DataGridViewTextBoxCell();
  1113. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  1114. dgvr.Cells.Add(cell);
  1115. cell = new DataGridViewTextBoxCell();
  1116. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  1117. dgvr.Cells.Add(cell);
  1118. cell = new DataGridViewTextBoxCell();
  1119. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  1120. dgvr.Cells.Add(cell);
  1121. cell = new DataGridViewTextBoxCell();
  1122. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  1123. dgvr.Cells.Add(cell);
  1124. }
  1125. else
  1126. {
  1127. cell = new DataGridViewTextBoxCell();
  1128. cell.Value = "";
  1129. dgvr.Cells.Add(cell);
  1130. cell = new DataGridViewTextBoxCell();
  1131. cell.Value = "";
  1132. dgvr.Cells.Add(cell);
  1133. cell = new DataGridViewTextBoxCell();
  1134. cell.Value = "";
  1135. dgvr.Cells.Add(cell);
  1136. cell = new DataGridViewTextBoxCell();
  1137. cell.Value = "";
  1138. dgvr.Cells.Add(cell);
  1139. }
  1140. #endregion
  1141. cell = new DataGridViewTextBoxCell();
  1142. cell.Value = dt.Rows[t]["精修师ID"].ToString().Trim();
  1143. dgvr.Cells.Add(cell);
  1144. cell = new DataGridViewTextBoxCell();
  1145. cell.Value = dt.Rows[t]["精修时间"].ToString().Trim() == "" ? "" : Convert.ToDateTime(dt.Rows[t]["精修时间"].ToString().Trim()).ToString("yyyy-MM-dd");
  1146. dgvr.Cells.Add(cell);
  1147. cell = new DataGridViewTextBoxCell();
  1148. cell.Value = dt.Rows[t]["精修状态"].ToString().Trim() == "2" ? "OK" : "未修";
  1149. dgvr.Cells.Add(cell);
  1150. cell = new DataGridViewTextBoxCell();
  1151. cell.Value = dt.Rows[t]["精修师"].ToString().Trim();
  1152. dgvr.Cells.Add(cell);
  1153. #region 赋值
  1154. dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ord_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim() + "' and Sfs_Type=3 and Sfs_SurveySetID=10", " id asc");
  1155. if (dtleng.Length > 0)
  1156. {
  1157. cell = new DataGridViewTextBoxCell();
  1158. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  1159. dgvr.Cells.Add(cell);
  1160. cell = new DataGridViewTextBoxCell();
  1161. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  1162. dgvr.Cells.Add(cell);
  1163. cell = new DataGridViewTextBoxCell();
  1164. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  1165. dgvr.Cells.Add(cell);
  1166. cell = new DataGridViewTextBoxCell();
  1167. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  1168. dgvr.Cells.Add(cell);
  1169. }
  1170. else
  1171. {
  1172. cell = new DataGridViewTextBoxCell();
  1173. cell.Value = "";
  1174. dgvr.Cells.Add(cell);
  1175. cell = new DataGridViewTextBoxCell();
  1176. cell.Value = "";
  1177. dgvr.Cells.Add(cell);
  1178. cell = new DataGridViewTextBoxCell();
  1179. cell.Value = "";
  1180. dgvr.Cells.Add(cell);
  1181. cell = new DataGridViewTextBoxCell();
  1182. cell.Value = "";
  1183. dgvr.Cells.Add(cell);
  1184. }
  1185. #endregion
  1186. this.dgv4.Rows.Add(dgvr);
  1187. #endregion
  1188. }
  1189. }));
  1190. }
  1191. });
  1192. try
  1193. {
  1194. this.ucPagerEx4.TbDataSource = dt;
  1195. this.dgv4.ClearSelection();
  1196. }
  1197. catch { }
  1198. return pageData.TotalCount;
  1199. }
  1200. #endregion
  1201. #region 绑定近期看样
  1202. /// <summary>
  1203. /// 绑定近期看样
  1204. /// </summary>
  1205. public void BindLookLike()
  1206. {
  1207. this.ucPagerEx5.PageCurrent = 1;
  1208. this.ucPagerEx5.PageSize = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  1209. this.ucPagerEx5.Bind();
  1210. }
  1211. /// <summary>
  1212. /// 画分页
  1213. /// </summary>
  1214. /// <param name="e"></param>
  1215. /// <returns></returns>
  1216. private int ucPagerEx5_EventPaging(UCPager.EventPagingArg e)
  1217. {
  1218. LYFZ.UCPager.PageData pageData = new LYFZ.UCPager.PageData();
  1219. this.dgv5.Rows.Clear();
  1220. DataTable dt = new DataTable();
  1221. StringBuilder sql = new StringBuilder();
  1222. //if (!string.IsNullOrEmpty(this.txtTimeStart.Text) && !string.IsNullOrEmpty(this.txtTimeEnd.Text))
  1223. //{ sql.Append(" 1=1 and ((" + PublicCodeClasses.GetDateTime("看设计时间", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and 看设计状态='1') or (" + PublicCodeClasses.GetDateTime("设计时间", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and 设计状态='2')) and Ord_Class='1'");
  1224. if (!string.IsNullOrEmpty(this.txtTimeStart.Text) && !string.IsNullOrEmpty(this.txtTimeEnd.Text))
  1225. { sql.Append(PublicCodeClasses.GetDateTime("看设计时间", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and 看设计状态='1' and Ord_Class='1'"); }
  1226. DataTable dtSurvey = sfsbll.Vw_ErpSatisfactionSurvey("").Tables[0];
  1227. LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
  1228. {
  1229. pageData.TableName = "Vw_OrdersWageDigital";
  1230. pageData.PageIndex = this.ucPagerEx5.PageCurrent;
  1231. pageData.PageSize = this.ucPagerEx5.PageSize;
  1232. pageData.QueryCondition = sql.ToString();
  1233. pageData.QueryFieldName = "Id,Ordv_Number,Ordv_ViceNumber,Ordv_DigitalNumber,Ord_Number,Ord_Type,Ord_Class,Ord_PhotographyCategory,Ord_SeriesName,Ord_SeriesPrice,拍摄名称,客户名称,客户电话,看设计师ID,看设计师,看设计状态,看设计时间,设计师ID,设计师,设计状态,设计时间";
  1234. pageData.OrderStr = " ID desc ";
  1235. dt = pageData.QueryDataTable().Tables[0];
  1236. if (dt.Rows.Count > 0)
  1237. {
  1238. this.Invoke(new UpdateControl(delegate()
  1239. {
  1240. for (int t = 0; t < dt.Rows.Count; t++)
  1241. {
  1242. #region
  1243. DataGridViewRow dgvr = new DataGridViewRow();
  1244. DataGridViewCell cell = null;
  1245. cell = new DataGridViewTextBoxCell();
  1246. cell.Value = dt.Rows[t]["Ord_Number"].ToString().Trim();
  1247. dgvr.Cells.Add(cell);
  1248. cell = new DataGridViewTextBoxCell();
  1249. cell.Value = dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim();
  1250. dgvr.Cells.Add(cell);
  1251. cell = new DataGridViewTextBoxCell();
  1252. cell.Value = dt.Rows[t]["Ord_Type"].ToString().Trim() == "0" ? "婚纱订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "1" ? "儿童订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "2" ? "写真订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "3" ? "服务订单" : "其它消费";
  1253. dgvr.Cells.Add(cell);
  1254. cell = new DataGridViewTextBoxCell();
  1255. cell.Value = dt.Rows[t]["客户名称"].ToString().Trim();
  1256. dgvr.Cells.Add(cell);
  1257. cell = new DataGridViewTextBoxCell();
  1258. cell.Value = dt.Rows[t]["客户电话"].ToString().Trim();
  1259. dgvr.Cells.Add(cell);
  1260. cell = new DataGridViewTextBoxCell();
  1261. cell.Value = dt.Rows[t]["拍摄名称"].ToString().Trim();
  1262. dgvr.Cells.Add(cell);
  1263. cell = new DataGridViewTextBoxCell();
  1264. cell.Value = dt.Rows[t]["看设计时间"].ToString().Trim() == "" ? "" : Convert.ToDateTime(dt.Rows[t]["看设计时间"].ToString().Trim()).ToString("yyyy-MM-dd");
  1265. dgvr.Cells.Add(cell);
  1266. cell = new DataGridViewTextBoxCell();
  1267. cell.Value = dt.Rows[t]["看设计状态"].ToString().Trim() == "1" ? "OK" : "未看";
  1268. dgvr.Cells.Add(cell);
  1269. cell = new DataGridViewTextBoxCell();
  1270. cell.Value = dt.Rows[t]["看设计师ID"].ToString().Trim();
  1271. dgvr.Cells.Add(cell);
  1272. cell = new DataGridViewTextBoxCell();
  1273. cell.Value = dt.Rows[t]["看设计师"].ToString().Trim();
  1274. dgvr.Cells.Add(cell);
  1275. #region 赋值
  1276. DataRow[] dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ord_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim() + "' and Sfs_Type=4 and Sfs_SurveySetID=11", " id asc");
  1277. if (dtleng.Length > 0)
  1278. {
  1279. cell = new DataGridViewTextBoxCell();
  1280. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  1281. dgvr.Cells.Add(cell);
  1282. cell = new DataGridViewTextBoxCell();
  1283. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  1284. dgvr.Cells.Add(cell);
  1285. cell = new DataGridViewTextBoxCell();
  1286. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  1287. dgvr.Cells.Add(cell);
  1288. cell = new DataGridViewTextBoxCell();
  1289. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  1290. dgvr.Cells.Add(cell);
  1291. }
  1292. else
  1293. {
  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 = "";
  1302. dgvr.Cells.Add(cell);
  1303. cell = new DataGridViewTextBoxCell();
  1304. cell.Value = "";
  1305. dgvr.Cells.Add(cell);
  1306. }
  1307. #endregion
  1308. cell = new DataGridViewTextBoxCell();
  1309. cell.Value = dt.Rows[t]["设计时间"].ToString().Trim() == "" ? "" : Convert.ToDateTime(dt.Rows[t]["设计时间"].ToString().Trim()).ToString("yyyy-MM-dd");
  1310. dgvr.Cells.Add(cell);
  1311. cell = new DataGridViewTextBoxCell();
  1312. cell.Value = dt.Rows[t]["设计状态"].ToString().Trim() == "2" ? "OK" : "未设计";
  1313. dgvr.Cells.Add(cell);
  1314. cell = new DataGridViewTextBoxCell();
  1315. cell.Value = dt.Rows[t]["设计师ID"].ToString().Trim();
  1316. dgvr.Cells.Add(cell);
  1317. cell = new DataGridViewTextBoxCell();
  1318. cell.Value = dt.Rows[t]["设计师"].ToString().Trim();
  1319. dgvr.Cells.Add(cell);
  1320. #region 赋值
  1321. dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ord_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim() + "' and Sfs_Type=4 and Sfs_SurveySetID=12", " id asc");
  1322. if (dtleng.Length > 0)
  1323. {
  1324. cell = new DataGridViewTextBoxCell();
  1325. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  1326. dgvr.Cells.Add(cell);
  1327. cell = new DataGridViewTextBoxCell();
  1328. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  1329. dgvr.Cells.Add(cell);
  1330. cell = new DataGridViewTextBoxCell();
  1331. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  1332. dgvr.Cells.Add(cell);
  1333. cell = new DataGridViewTextBoxCell();
  1334. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  1335. dgvr.Cells.Add(cell);
  1336. }
  1337. else
  1338. {
  1339. cell = new DataGridViewTextBoxCell();
  1340. cell.Value = "";
  1341. dgvr.Cells.Add(cell);
  1342. cell = new DataGridViewTextBoxCell();
  1343. cell.Value = "";
  1344. dgvr.Cells.Add(cell);
  1345. cell = new DataGridViewTextBoxCell();
  1346. cell.Value = "";
  1347. dgvr.Cells.Add(cell);
  1348. cell = new DataGridViewTextBoxCell();
  1349. cell.Value = "";
  1350. dgvr.Cells.Add(cell);
  1351. }
  1352. #endregion
  1353. this.dgv5.Rows.Add(dgvr);
  1354. #endregion
  1355. }
  1356. }));
  1357. }
  1358. });
  1359. try
  1360. {
  1361. this.ucPagerEx5.TbDataSource = dt;
  1362. this.dgv5.ClearSelection();
  1363. }
  1364. catch
  1365. { }
  1366. return pageData.TotalCount;
  1367. }
  1368. #endregion
  1369. #region 绑定近期取件
  1370. /// <summary>
  1371. /// 绑定近期取件
  1372. /// </summary>
  1373. public void BindPickup()
  1374. {
  1375. this.ucPagerEx6.PageCurrent = 1;
  1376. this.ucPagerEx6.PageSize = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  1377. this.ucPagerEx6.Bind();
  1378. }
  1379. /// <summary>
  1380. /// 画分页
  1381. /// </summary>
  1382. /// <param name="e"></param>
  1383. /// <returns></returns>
  1384. private int ucPagerEx6_EventPaging(UCPager.EventPagingArg e)
  1385. {
  1386. LYFZ.UCPager.PageData pageData = new LYFZ.UCPager.PageData();
  1387. this.dgv6.Rows.Clear();
  1388. DataTable dt = new DataTable();
  1389. StringBuilder sql = new StringBuilder();
  1390. if (!string.IsNullOrEmpty(this.txtTimeStart.Text) && !string.IsNullOrEmpty(this.txtTimeEnd.Text))
  1391. { sql.Append(PublicCodeClasses.GetDateTime("取件日期", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and Ord_Class='1'"); }
  1392. else
  1393. { sql.Append(" "); }
  1394. DataTable dtSurvey = sfsbll.Vw_ErpSatisfactionSurvey("").Tables[0];
  1395. LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
  1396. {
  1397. pageData.TableName = "Vw_OrdersWageDigital";
  1398. pageData.PageIndex = this.ucPagerEx6.PageCurrent;
  1399. pageData.PageSize = this.ucPagerEx6.PageSize;
  1400. pageData.QueryCondition = sql.ToString();
  1401. pageData.QueryFieldName = "Id,Ordv_Number,Ordv_ViceNumber,Ordv_DigitalNumber,Ord_Number,Ord_Type,Ord_Class,Ord_PhotographyCategory,Ord_SeriesName,Ord_SeriesPrice,拍摄名称,客户名称,客户电话,取件状态,取件日期";
  1402. pageData.OrderStr = " ID desc ";
  1403. dt = pageData.QueryDataTable().Tables[0];
  1404. if (dt.Rows.Count > 0)
  1405. {
  1406. this.Invoke(new UpdateControl(delegate()
  1407. {
  1408. for (int t = 0; t < dt.Rows.Count; t++)
  1409. {
  1410. #region
  1411. DataGridViewRow dgvr = new DataGridViewRow();
  1412. DataGridViewCell cell = null;
  1413. cell = new DataGridViewTextBoxCell();
  1414. cell.Value = dt.Rows[t]["Ord_Number"].ToString().Trim();
  1415. dgvr.Cells.Add(cell);
  1416. cell = new DataGridViewTextBoxCell();
  1417. cell.Value = dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim();
  1418. dgvr.Cells.Add(cell);
  1419. cell = new DataGridViewTextBoxCell();
  1420. cell.Value = dt.Rows[t]["Ord_Type"].ToString().Trim() == "0" ? "婚纱订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "1" ? "儿童订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "2" ? "写真订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "3" ? "服务订单" : "其它消费";
  1421. dgvr.Cells.Add(cell);
  1422. cell = new DataGridViewTextBoxCell();
  1423. cell.Value = dt.Rows[t]["客户名称"].ToString().Trim();
  1424. dgvr.Cells.Add(cell);
  1425. cell = new DataGridViewTextBoxCell();
  1426. cell.Value = dt.Rows[t]["客户电话"].ToString().Trim();
  1427. dgvr.Cells.Add(cell);
  1428. cell = new DataGridViewTextBoxCell();
  1429. cell.Value = dt.Rows[t]["拍摄名称"].ToString().Trim();
  1430. dgvr.Cells.Add(cell);
  1431. cell = new DataGridViewTextBoxCell();
  1432. cell.Value = dt.Rows[t]["取件日期"].ToString().Trim() == "" ? "" : Convert.ToDateTime(dt.Rows[t]["取件日期"].ToString().Trim()).ToString("yyyy-MM-dd");
  1433. dgvr.Cells.Add(cell);
  1434. cell = new DataGridViewTextBoxCell();
  1435. cell.Value = dt.Rows[t]["取件状态"].ToString().Trim();
  1436. dgvr.Cells.Add(cell);
  1437. #region 赋值产品满意度
  1438. DataRow[] dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ord_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim() + "' and Sfs_Type=5 and Sfs_SurveySetID=13", " id asc");
  1439. if (dtleng.Length > 0)
  1440. {
  1441. cell = new DataGridViewTextBoxCell();
  1442. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  1443. dgvr.Cells.Add(cell);
  1444. cell = new DataGridViewTextBoxCell();
  1445. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  1446. dgvr.Cells.Add(cell);
  1447. cell = new DataGridViewTextBoxCell();
  1448. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  1449. dgvr.Cells.Add(cell);
  1450. cell = new DataGridViewTextBoxCell();
  1451. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  1452. dgvr.Cells.Add(cell);
  1453. }
  1454. else
  1455. {
  1456. cell = new DataGridViewTextBoxCell();
  1457. cell.Value = "";
  1458. dgvr.Cells.Add(cell);
  1459. cell = new DataGridViewTextBoxCell();
  1460. cell.Value = "";
  1461. dgvr.Cells.Add(cell);
  1462. cell = new DataGridViewTextBoxCell();
  1463. cell.Value = "";
  1464. dgvr.Cells.Add(cell);
  1465. cell = new DataGridViewTextBoxCell();
  1466. cell.Value = "";
  1467. dgvr.Cells.Add(cell);
  1468. }
  1469. #endregion
  1470. #region 赋值进度满意度
  1471. dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ord_Number"].ToString().Trim() + "' and Sfs_OrderNumberDeputy='" + dt.Rows[t]["Ordv_ViceNumber"].ToString().Trim() + "' and Sfs_Type=5 and Sfs_SurveySetID=14", " id asc");
  1472. if (dtleng.Length > 0)
  1473. {
  1474. cell = new DataGridViewTextBoxCell();
  1475. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  1476. dgvr.Cells.Add(cell);
  1477. cell = new DataGridViewTextBoxCell();
  1478. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  1479. dgvr.Cells.Add(cell);
  1480. cell = new DataGridViewTextBoxCell();
  1481. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  1482. dgvr.Cells.Add(cell);
  1483. cell = new DataGridViewTextBoxCell();
  1484. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  1485. dgvr.Cells.Add(cell);
  1486. }
  1487. else
  1488. {
  1489. cell = new DataGridViewTextBoxCell();
  1490. cell.Value = "";
  1491. dgvr.Cells.Add(cell);
  1492. cell = new DataGridViewTextBoxCell();
  1493. cell.Value = "";
  1494. dgvr.Cells.Add(cell);
  1495. cell = new DataGridViewTextBoxCell();
  1496. cell.Value = "";
  1497. dgvr.Cells.Add(cell);
  1498. cell = new DataGridViewTextBoxCell();
  1499. cell.Value = "";
  1500. dgvr.Cells.Add(cell);
  1501. }
  1502. #endregion
  1503. this.dgv6.Rows.Add(dgvr);
  1504. #endregion
  1505. }
  1506. }));
  1507. }
  1508. });
  1509. try
  1510. {
  1511. this.ucPagerEx6.TbDataSource = dt;
  1512. this.dgv6.ClearSelection();
  1513. }
  1514. catch
  1515. { }
  1516. return pageData.TotalCount;
  1517. }
  1518. #endregion
  1519. #region 绑定近期服务
  1520. /// <summary>
  1521. /// 绑定近期服务
  1522. /// </summary>
  1523. public void BindService()
  1524. {
  1525. this.ucPagerEx7.PageCurrent = 1;
  1526. this.ucPagerEx7.PageSize = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  1527. this.ucPagerEx7.Bind();
  1528. }
  1529. /// <summary>
  1530. /// 画分页
  1531. /// </summary>
  1532. /// <param name="e"></param>
  1533. /// <returns></returns>
  1534. private int ucPagerEx7_EventPaging(UCPager.EventPagingArg e)
  1535. {
  1536. LYFZ.UCPager.PageData pageData = new LYFZ.UCPager.PageData();
  1537. this.dgv7.Rows.Clear();
  1538. DataTable dt = new DataTable();
  1539. StringBuilder sql = new StringBuilder();
  1540. if (!string.IsNullOrEmpty(this.txtTimeStart.Text) && !string.IsNullOrEmpty(this.txtTimeEnd.Text))
  1541. { sql.Append(PublicCodeClasses.GetDateTime("Ws_WeddingDate", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and Ws_Status='1'"); }
  1542. else
  1543. { sql.Append(" "); }
  1544. DataTable dtSurvey = sfsbll.Vw_ErpSatisfactionSurvey("").Tables[0];
  1545. LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
  1546. {
  1547. pageData.TableName = "View_ErpWeddingService";
  1548. pageData.PageIndex = this.ucPagerEx7.PageCurrent;
  1549. pageData.PageSize = this.ucPagerEx7.PageSize;
  1550. pageData.QueryCondition = sql.ToString();
  1551. pageData.QueryFieldName = "ID,Ws_Number,Ws_Type,Ws_ProdNumber,Ws_ProdName,Ws_ProdCostPrice,Ws_ProdSoldPrice,Ws_ProdQuantity,Ws_WeddingDate,Ws_WeddingDateLunar,Ws_Serviceman1ID,Ws_Serviceman2ID,Ws_Serviceman1,Ws_Serviceman2,Ws_Status,Ws_Remark,Ws_WeddingDispatcher,Ws_WeddingDispatchDate,Ws_UpdateDateTime,Ws_UpdateName,客户名称,客户电话";
  1552. pageData.OrderStr = " ID desc ";
  1553. dt = pageData.QueryDataTable().Tables[0];
  1554. if (dt.Rows.Count > 0)
  1555. {
  1556. this.Invoke(new UpdateControl(delegate()
  1557. {
  1558. for (int t = 0; t < dt.Rows.Count; t++)
  1559. {
  1560. #region
  1561. DataGridViewRow dgvr = new DataGridViewRow();
  1562. DataGridViewCell cell = null;
  1563. cell = new DataGridViewTextBoxCell();
  1564. cell.Value = dt.Rows[t]["Ws_Number"].ToString().Trim();
  1565. dgvr.Cells.Add(cell);
  1566. cell = new DataGridViewTextBoxCell();
  1567. cell.Value = dt.Rows[t]["客户名称"].ToString().Trim();
  1568. dgvr.Cells.Add(cell);
  1569. cell = new DataGridViewTextBoxCell();
  1570. cell.Value = dt.Rows[t]["客户电话"].ToString().Trim();
  1571. dgvr.Cells.Add(cell);
  1572. cell = new DataGridViewTextBoxCell();
  1573. cell.Value = dt.Rows[t]["Ws_ProdName"].ToString().Trim();
  1574. dgvr.Cells.Add(cell);
  1575. cell = new DataGridViewTextBoxCell();
  1576. cell.Value = dt.Rows[t]["Ws_WeddingDate"].ToString().Trim() == "" ? "" : Convert.ToDateTime(dt.Rows[t]["Ws_WeddingDate"].ToString().Trim()).ToString("yyyy-MM-dd");
  1577. dgvr.Cells.Add(cell);
  1578. cell = new DataGridViewTextBoxCell();
  1579. cell.Value = dt.Rows[t]["Ws_Status"].ToString().Trim() == "1" ? "OK" : "未完成";
  1580. dgvr.Cells.Add(cell);
  1581. cell = new DataGridViewTextBoxCell();
  1582. cell.Value = dt.Rows[t]["Ws_Serviceman1"].ToString().Trim();
  1583. dgvr.Cells.Add(cell);
  1584. #region 赋值
  1585. DataRow[] dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ws_Number"].ToString().Trim() + "' and Sfs_Type=6 and Sfs_SurveySetID=15", " id asc");
  1586. if (dtleng.Length > 0)
  1587. {
  1588. cell = new DataGridViewTextBoxCell();
  1589. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  1590. dgvr.Cells.Add(cell);
  1591. cell = new DataGridViewTextBoxCell();
  1592. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  1593. dgvr.Cells.Add(cell);
  1594. cell = new DataGridViewTextBoxCell();
  1595. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  1596. dgvr.Cells.Add(cell);
  1597. cell = new DataGridViewTextBoxCell();
  1598. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  1599. dgvr.Cells.Add(cell);
  1600. }
  1601. else
  1602. {
  1603. cell = new DataGridViewTextBoxCell();
  1604. cell.Value = "";
  1605. dgvr.Cells.Add(cell);
  1606. cell = new DataGridViewTextBoxCell();
  1607. cell.Value = "";
  1608. dgvr.Cells.Add(cell);
  1609. cell = new DataGridViewTextBoxCell();
  1610. cell.Value = "";
  1611. dgvr.Cells.Add(cell);
  1612. cell = new DataGridViewTextBoxCell();
  1613. cell.Value = "";
  1614. dgvr.Cells.Add(cell);
  1615. }
  1616. #endregion
  1617. cell = new DataGridViewTextBoxCell();
  1618. cell.Value = dt.Rows[t]["Ws_Serviceman2"].ToString().Trim();
  1619. dgvr.Cells.Add(cell);
  1620. #region 赋值
  1621. dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ws_Number"].ToString().Trim() + "' and Sfs_Type=6 and Sfs_SurveySetID=16", " id asc");
  1622. if (dtleng.Length > 0)
  1623. {
  1624. cell = new DataGridViewTextBoxCell();
  1625. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  1626. dgvr.Cells.Add(cell);
  1627. cell = new DataGridViewTextBoxCell();
  1628. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  1629. dgvr.Cells.Add(cell);
  1630. cell = new DataGridViewTextBoxCell();
  1631. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  1632. dgvr.Cells.Add(cell);
  1633. cell = new DataGridViewTextBoxCell();
  1634. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  1635. dgvr.Cells.Add(cell);
  1636. }
  1637. else
  1638. {
  1639. cell = new DataGridViewTextBoxCell();
  1640. cell.Value = "";
  1641. dgvr.Cells.Add(cell);
  1642. cell = new DataGridViewTextBoxCell();
  1643. cell.Value = "";
  1644. dgvr.Cells.Add(cell);
  1645. cell = new DataGridViewTextBoxCell();
  1646. cell.Value = "";
  1647. dgvr.Cells.Add(cell);
  1648. cell = new DataGridViewTextBoxCell();
  1649. cell.Value = "";
  1650. dgvr.Cells.Add(cell);
  1651. }
  1652. #endregion
  1653. cell = new DataGridViewTextBoxCell();
  1654. cell.Value = dt.Rows[t]["Ws_Serviceman1ID"].ToString().Trim();
  1655. dgvr.Cells.Add(cell);
  1656. cell = new DataGridViewTextBoxCell();
  1657. cell.Value = dt.Rows[t]["Ws_Serviceman2ID"].ToString().Trim();
  1658. dgvr.Cells.Add(cell);
  1659. this.dgv7.Rows.Add(dgvr);
  1660. #endregion
  1661. }
  1662. }));
  1663. }
  1664. });
  1665. try
  1666. {
  1667. this.ucPagerEx7.TbDataSource = dt;
  1668. this.dgv7.ClearSelection();
  1669. }
  1670. catch
  1671. { }
  1672. return pageData.TotalCount;
  1673. }
  1674. #endregion
  1675. #region 绑定近期其它调查
  1676. /// <summary>
  1677. /// 绑定近期其它调查
  1678. /// </summary>
  1679. public void BindOtherSurveys()
  1680. {
  1681. this.ucPagerEx8.PageCurrent = 1;
  1682. this.ucPagerEx8.PageSize = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  1683. this.ucPagerEx8.Bind();
  1684. }
  1685. /// <summary>
  1686. /// 画分页
  1687. /// </summary>
  1688. /// <param name="e"></param>
  1689. /// <returns></returns>
  1690. private int ucPagerEx8_EventPaging(UCPager.EventPagingArg e)
  1691. {
  1692. LYFZ.UCPager.PageData pageData = new LYFZ.UCPager.PageData();
  1693. this.dgv8.Rows.Clear();
  1694. DataTable dt = new DataTable();
  1695. StringBuilder sql = new StringBuilder();
  1696. if (!string.IsNullOrEmpty(this.txtTimeStart.Text) && !string.IsNullOrEmpty(this.txtTimeEnd.Text))
  1697. { sql.Append(PublicCodeClasses.GetDateTime("Ord_CreateDatetime", this.txtTimeStart.Text, this.txtTimeEnd.Text, ConnectWord: "") + " and Ord_Class='1'"); }
  1698. else
  1699. { sql.Append(" "); }
  1700. DataTable dtSurvey = sfsbll.Vw_ErpSatisfactionSurvey("").Tables[0];
  1701. LYFZ.BLL.BLL_ErpSatisfactionSurveySet setbll = new BLL.BLL_ErpSatisfactionSurveySet();
  1702. LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
  1703. {
  1704. pageData.TableName = "Vw_Customer_PaymentOrders";
  1705. pageData.PageIndex = this.ucPagerEx8.PageCurrent;
  1706. pageData.PageSize = this.ucPagerEx8.PageSize;
  1707. pageData.QueryCondition = sql.ToString();
  1708. pageData.QueryFieldName = "ID,Ord_Number,Ord_DividedShop,Ord_Type,Ord_PhotographyCategory,Ord_SeriesName,Ord_SeriesPrice,Ord_Class,GP_OrderNumber,GP_CustomerGroupID,Cus_Name,Cus_Name_py,Cus_Telephone,Ord_OrdersPersonID,Ord_OrdersPerson,Ord_CreateDatetime,PickupStatusCount";
  1709. pageData.OrderStr = " ID desc ";
  1710. dt = pageData.QueryDataTable().Tables[0];
  1711. if (dt.Rows.Count > 0)
  1712. {
  1713. this.Invoke(new UpdateControl(delegate()
  1714. {
  1715. for (int t = 0; t < dt.Rows.Count; t++)
  1716. {
  1717. #region
  1718. DataGridViewRow dgvr = new DataGridViewRow();
  1719. DataGridViewCell cell = null;
  1720. cell = new DataGridViewTextBoxCell();
  1721. cell.Value = dt.Rows[t]["Ord_Number"].ToString().Trim();
  1722. dgvr.Cells.Add(cell);
  1723. cell = new DataGridViewTextBoxCell();
  1724. cell.Value = dt.Rows[t]["Ord_Type"].ToString().Trim() == "0" ? "婚纱订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "1" ? "儿童订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "2" ? "写真订单" : dt.Rows[t]["Ord_Type"].ToString().Trim() == "3" ? "服务订单" : "其它消费";
  1725. dgvr.Cells.Add(cell);
  1726. cell = new DataGridViewTextBoxCell();
  1727. cell.Value = dt.Rows[t]["Cus_Name"].ToString().Trim();
  1728. dgvr.Cells.Add(cell);
  1729. cell = new DataGridViewTextBoxCell();
  1730. cell.Value = dt.Rows[t]["Cus_Telephone"].ToString().Trim();
  1731. dgvr.Cells.Add(cell);
  1732. cell = new DataGridViewTextBoxCell();
  1733. cell.Value = Convert.ToDateTime(dt.Rows[t]["Ord_CreateDatetime"].ToString().Trim()).ToString("yyyy-MM-dd");
  1734. dgvr.Cells.Add(cell);
  1735. DataTable dtSet = setbll.GetList("Sfss_Type=7", "id asc").Tables[0];
  1736. if (dtSet.Rows.Count > 0)
  1737. {
  1738. for (int y = 0; y < dtSet.Rows.Count; y++)
  1739. {
  1740. #region 赋值
  1741. DataRow[] dtleng = dtSurvey.Select(" Sfs_OrderNumber='" + dt.Rows[t]["Ord_Number"].ToString().Trim() + "' and Sfs_Type=7 and Sfs_SurveySetID=" + dtSet.Rows[y]["ID"].ToString() + "", " id asc");
  1742. if (dtleng.Length > 0)
  1743. {
  1744. cell = new DataGridViewTextBoxCell();
  1745. cell.Value = dtleng[0]["Sfs_RatingSetName"].ToString();
  1746. dgvr.Cells.Add(cell);
  1747. cell = new DataGridViewTextBoxCell();
  1748. cell.Value = dtleng[0]["Sfs_CreateName"].ToString();
  1749. dgvr.Cells.Add(cell);
  1750. cell = new DataGridViewTextBoxCell();
  1751. cell.Value = dtleng[0]["Sfs_CreateTime"].ToString();
  1752. dgvr.Cells.Add(cell);
  1753. cell = new DataGridViewTextBoxCell();
  1754. cell.Value = dtleng[0]["Sfs_Remark"].ToString();
  1755. dgvr.Cells.Add(cell);
  1756. }
  1757. else
  1758. {
  1759. cell = new DataGridViewTextBoxCell();
  1760. cell.Value = "";
  1761. dgvr.Cells.Add(cell);
  1762. cell = new DataGridViewTextBoxCell();
  1763. cell.Value = "";
  1764. dgvr.Cells.Add(cell);
  1765. cell = new DataGridViewTextBoxCell();
  1766. cell.Value = "";
  1767. dgvr.Cells.Add(cell);
  1768. cell = new DataGridViewTextBoxCell();
  1769. cell.Value = "";
  1770. dgvr.Cells.Add(cell);
  1771. }
  1772. #endregion
  1773. }
  1774. }
  1775. this.dgv8.Rows.Add(dgvr);
  1776. #endregion
  1777. }
  1778. }));
  1779. }
  1780. });
  1781. try
  1782. {
  1783. this.ucPagerEx8.TbDataSource = dt;
  1784. this.dgv8.ClearSelection();
  1785. }
  1786. catch
  1787. { }
  1788. return pageData.TotalCount;
  1789. }
  1790. #endregion
  1791. #endregion
  1792. }
  1793. }