UnityArrangeWorkSuperSmallForm.cs 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  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. namespace LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm
  10. {
  11. public partial class UnityArrangeWorkSuperSmallForm : LYFZ.Software.UI.CameraControlBook.SuperSmallForm.UnityArrangeWorkSuperSmallForm
  12. {
  13. public UnityArrangeWorkSuperSmallForm()
  14. {
  15. this.Load += UnityArrangeWorkSuperSmallForm_Load;
  16. this.Shown += UnityArrangeWorkSuperSmallForm_Shown;
  17. this.btnSaveed.Click += btnSaveed_Click;
  18. this.btnCancel.Click += btnCancel_Click;
  19. this.btnBootDivisionName.Click += btnBootDivisionName_Click;
  20. this.btnClothingName.Click += btnClothingName_Click;
  21. this.btnFilmSelectionName.Click += btnFilmSelectionName_Click;
  22. this.btnLookDesignName.Click += btnLookDesignName_Click;
  23. this.btnMakeupArtistName.Click += btnMakeupArtistName_Click;
  24. this.btnMakeupAssistantName.Click += btnMakeupAssistantName_Click;
  25. this.btnPhotographerName.Click += btnPhotographerName_Click;
  26. this.btnPhotographyAssistantName.Click += btnPhotographyAssistantName_Click;
  27. this.btnPickupName.Click += btnPickupName_Click;
  28. this.btnServiceName1.Click += btnServiceName1_Click;
  29. this.btnServiceName2.Click += btnServiceName2_Click;
  30. this.chkDateTime.Click += chkDateTime_Click;
  31. this.chkBootDivisionName.Click += chkBootDivisionName_Click;
  32. this.chkClothingName.Click += chkClothingName_Click;
  33. this.chkFilmSelectionName.Click += chkFilmSelectionName_Click;
  34. this.chkLookDesignName.Click += chkLookDesignName_Click;
  35. this.chkMakeupArtistName.Click += chkMakeupArtistName_Click;
  36. this.chkMakeupAssistantName.Click += chkMakeupAssistantName_Click;
  37. this.chkPhotographerName.Click += chkPhotographerName_Click;
  38. this.chkPhotographyAssistantName.Click += chkPhotographyAssistantName_Click;
  39. this.chkPickupName.Click += chkPickupName_Click;
  40. this.chkServiceName1.Click += chkServiceName1_Click;
  41. this.chkServiceName2.Click += chkServiceName2_Click;
  42. }
  43. /// <summary>
  44. /// 是否保存
  45. /// </summary>
  46. public bool IsSaveed = false;
  47. /// <summary>
  48. /// 返回的数据
  49. /// </summary>
  50. public LYFZ.BLL.CameraControlBookUnityArrangeWorkModel UnityArrangeWorkModel;
  51. /// <summary>
  52. /// 加载类型
  53. /// </summary>
  54. public LYFZ.EnumPublic.EnumUnityArrangeWorkType UnityArrangeWorkType;
  55. /// <summary>
  56. /// 窗体加载事件
  57. /// </summary>
  58. /// <param name="sender"></param>
  59. /// <param name="e"></param>
  60. void UnityArrangeWorkSuperSmallForm_Load(object sender, EventArgs e)
  61. {
  62. switch (this.UnityArrangeWorkType)
  63. {
  64. case EnumPublic.EnumUnityArrangeWorkType.拍照客人:
  65. this.panelPhotographerName.Visible = true;
  66. this.panelPhotographyAssistantName.Visible = true;
  67. this.panelMakeupArtistName.Visible = true;
  68. this.panelMakeupAssistantName.Visible = true;
  69. this.panelBootDivisionName.Visible = true;
  70. this.panelBootDivisionAssistantName.Visible = true;
  71. break;
  72. case EnumPublic.EnumUnityArrangeWorkType.选片客人:
  73. this.panelFilmSelectionName.Visible = true;
  74. break;
  75. case EnumPublic.EnumUnityArrangeWorkType.看版客人:
  76. this.panelLookDesignName.Visible = true;
  77. break;
  78. case EnumPublic.EnumUnityArrangeWorkType.取件客人:
  79. this.panelPickupName.Visible = true;
  80. break;
  81. case EnumPublic.EnumUnityArrangeWorkType.服务客人:
  82. this.panelServiceName1.Visible = true;
  83. this.panelServiceName2.Visible = true;
  84. break;
  85. case EnumPublic.EnumUnityArrangeWorkType.选礼服客人:
  86. this.panelClothingName.Visible = true;
  87. break;
  88. }
  89. }
  90. /// <summary>
  91. /// 窗体加载事件
  92. /// </summary>
  93. /// <param name="sender"></param>
  94. /// <param name="e"></param>
  95. void UnityArrangeWorkSuperSmallForm_Shown(object sender, EventArgs e)
  96. {
  97. this.dtpDate.DateValue = SDateTime.Now.ToString();
  98. }
  99. /// <summary>
  100. /// 保存
  101. /// </summary>
  102. /// <param name="sender"></param>
  103. /// <param name="e"></param>
  104. void btnSaveed_Click(object sender, EventArgs e)
  105. {
  106. LYFZ.BLL.CameraControlBookUnityArrangeWorkModel WorkModel = new BLL.CameraControlBookUnityArrangeWorkModel();
  107. switch (this.UnityArrangeWorkType)
  108. {
  109. case EnumPublic.EnumUnityArrangeWorkType.拍照客人:
  110. WorkModel.IsPhotographerName = this.chkPhotographerName.Checked;
  111. WorkModel.PhotographerName = this.txtPhotographerName.Text.Trim();
  112. WorkModel.PhotographerTag = this.txtPhotographerName.Tag.ToString().Trim();
  113. WorkModel.IsPhotographyAssistantName = this.chkPhotographyAssistantName.Checked;
  114. WorkModel.PhotographyAssistantName = this.txtPhotographyAssistantName.Text.Trim();
  115. WorkModel.PhotographyAssistantTag = this.txtPhotographyAssistantName.Tag.ToString().Trim();
  116. WorkModel.IsMakeupArtistName = this.chkMakeupArtistName.Checked;
  117. WorkModel.MakeupArtistName = this.txtMakeupArtistName.Text.Trim();
  118. WorkModel.MakeupArtistTag = this.txtMakeupArtistName.Tag.ToString().Trim();
  119. WorkModel.IsMakeupAssistantName = this.chkMakeupAssistantName.Checked;
  120. WorkModel.MakeupAssistantName = this.txtMakeupAssistantName.Text.Trim();
  121. WorkModel.MakeupAssistantTag = this.txtMakeupAssistantName.Tag.ToString().Trim();
  122. WorkModel.IsBootDivisionName = this.chkBootDivisionName.Checked;
  123. WorkModel.BootDivisionName = this.txtBootDivisionName.Text.Trim();
  124. WorkModel.BootDivisionTag = this.txtBootDivisionName.Tag.ToString().Trim();
  125. WorkModel.IsBootDivisionAssistantName = this.chkBootDivisionAssistantName.Checked;
  126. WorkModel.BootDivisionAssistantName = this.txtBootDivisionAssistantName.Text.Trim();
  127. WorkModel.BootDivisionAssistantTag = this.txtBootDivisionAssistantName.Tag.ToString().Trim();
  128. break;
  129. case EnumPublic.EnumUnityArrangeWorkType.选片客人:
  130. WorkModel.IsFilmSelectionName = this.chkFilmSelectionName.Checked;
  131. WorkModel.FilmSelectionName = this.txtFilmSelectionName.Text.Trim();
  132. WorkModel.FilmSelectionTag = this.txtFilmSelectionName.Tag.ToString().Trim();
  133. break;
  134. case EnumPublic.EnumUnityArrangeWorkType.看版客人:
  135. WorkModel.IsLookDesignName = this.chkLookDesignName.Checked;
  136. WorkModel.LookDesignName = this.txtLookDesignName.Text.Trim();
  137. WorkModel.LookDesignTag = this.txtLookDesignName.Tag.ToString().Trim();
  138. break;
  139. case EnumPublic.EnumUnityArrangeWorkType.取件客人:
  140. WorkModel.IsPickupName = this.chkPickupName.Checked;
  141. WorkModel.PickupName = this.txtPickupName.Text.Trim();
  142. WorkModel.PickupTag = this.txtPickupName.Tag.ToString().Trim();
  143. break;
  144. case EnumPublic.EnumUnityArrangeWorkType.服务客人:
  145. WorkModel.IsServiceName1 = this.chkServiceName1.Checked;
  146. WorkModel.ServiceName1 = this.txtServiceName1.Text.Trim();
  147. WorkModel.ServiceTag1 = this.txtServiceName1.Tag.ToString().Trim();
  148. WorkModel.IsServiceName2 = this.chkServiceName2.Checked;
  149. WorkModel.ServiceName2 = this.txtServiceName2.Text.Trim();
  150. WorkModel.ServiceTag2 = this.txtServiceName2.Tag.ToString().Trim();
  151. break;
  152. case EnumPublic.EnumUnityArrangeWorkType.选礼服客人:
  153. WorkModel.IsClothingName = this.chkClothingName.Checked;
  154. WorkModel.ClothingName = this.txtClothingName.Text.Trim();
  155. WorkModel.ClothingTag = this.txtClothingName.Tag.ToString().Trim();
  156. break;
  157. }
  158. if (!string.IsNullOrEmpty(this.dtpDate.DateValue.Trim()) && this.chkDateTime.Checked)
  159. {
  160. try
  161. {
  162. if (!string.IsNullOrEmpty(this.txtTime.Text.Trim()) && this.txtTime.Text.Trim() != ":")
  163. {
  164. Convert.ToDateTime(SDateTime.Now.ToString("yyyy-MM-dd") + " " + this.txtTime.Text.Trim());
  165. WorkModel.StrDateTime = this.dtpDate.DateValue.Trim() + " " + this.txtTime.Text.Trim();
  166. }
  167. else
  168. { WorkModel.StrDateTime = this.dtpDate.DateValue.Trim(); }
  169. }
  170. catch
  171. { MessageBoxCustom.Show("时间格式出错!"); return; }
  172. }
  173. WorkModel.IsDateTime = this.chkDateTime.Checked;
  174. this.UnityArrangeWorkModel = WorkModel;
  175. this.IsSaveed = true;
  176. this.Close();
  177. }
  178. /// <summary>
  179. /// 取消
  180. /// </summary>
  181. /// <param name="sender"></param>
  182. /// <param name="e"></param>
  183. void btnCancel_Click(object sender, EventArgs e)
  184. {
  185. this.Close();
  186. }
  187. /// <summary>
  188. /// 选择人员
  189. /// </summary>
  190. /// <param name="sender"></param>
  191. /// <param name="e"></param>
  192. void btnBootDivisionName_Click(object sender, EventArgs e)
  193. {
  194. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtBootDivisionName, LYFZ.EnumPublic.EnumWorkPersonType.引导师);
  195. }
  196. /// <summary>
  197. /// 选择人员
  198. /// </summary>
  199. /// <param name="sender"></param>
  200. /// <param name="e"></param>
  201. void btnClothingName_Click(object sender, EventArgs e)
  202. {
  203. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtClothingName, LYFZ.EnumPublic.EnumWorkPersonType.选礼服师);
  204. }
  205. /// <summary>
  206. /// 选择人员
  207. /// </summary>
  208. /// <param name="sender"></param>
  209. /// <param name="e"></param>
  210. void btnFilmSelectionName_Click(object sender, EventArgs e)
  211. {
  212. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtFilmSelectionName, LYFZ.EnumPublic.EnumWorkPersonType.选片师);
  213. }
  214. /// <summary>
  215. /// 选择人员
  216. /// </summary>
  217. /// <param name="sender"></param>
  218. /// <param name="e"></param>
  219. void btnLookDesignName_Click(object sender, EventArgs e)
  220. {
  221. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtLookDesignName, LYFZ.EnumPublic.EnumWorkPersonType.看设计师);
  222. }
  223. /// <summary>
  224. /// 选择人员
  225. /// </summary>
  226. /// <param name="sender"></param>
  227. /// <param name="e"></param>
  228. void btnMakeupArtistName_Click(object sender, EventArgs e)
  229. {
  230. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtMakeupArtistName, LYFZ.EnumPublic.EnumWorkPersonType.化妆师);
  231. }
  232. /// <summary>
  233. /// 选择人员
  234. /// </summary>
  235. /// <param name="sender"></param>
  236. /// <param name="e"></param>
  237. void btnMakeupAssistantName_Click(object sender, EventArgs e)
  238. {
  239. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtMakeupAssistantName, LYFZ.EnumPublic.EnumWorkPersonType.化妆助理);
  240. }
  241. /// <summary>
  242. /// 选择人员
  243. /// </summary>
  244. /// <param name="sender"></param>
  245. /// <param name="e"></param>
  246. void btnPhotographerName_Click(object sender, EventArgs e)
  247. {
  248. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtPhotographerName, LYFZ.EnumPublic.EnumWorkPersonType.摄影师);
  249. }
  250. /// <summary>
  251. /// 选择人员
  252. /// </summary>
  253. /// <param name="sender"></param>
  254. /// <param name="e"></param>
  255. void btnPhotographyAssistantName_Click(object sender, EventArgs e)
  256. {
  257. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtPhotographyAssistantName, LYFZ.EnumPublic.EnumWorkPersonType.摄影助理);
  258. }
  259. /// <summary>
  260. /// 选择人员
  261. /// </summary>
  262. /// <param name="sender"></param>
  263. /// <param name="e"></param>
  264. void btnPickupName_Click(object sender, EventArgs e)
  265. {
  266. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtPickupName, LYFZ.EnumPublic.EnumWorkPersonType.取件师);
  267. }
  268. /// <summary>
  269. /// 选择人员
  270. /// </summary>
  271. /// <param name="sender"></param>
  272. /// <param name="e"></param>
  273. void btnServiceName1_Click(object sender, EventArgs e)
  274. {
  275. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtServiceName1, LYFZ.EnumPublic.EnumWorkPersonType.服务师1);
  276. }
  277. /// <summary>
  278. /// 选择人员
  279. /// </summary>
  280. /// <param name="sender"></param>
  281. /// <param name="e"></param>
  282. void btnServiceName2_Click(object sender, EventArgs e)
  283. {
  284. LYFZ.Software.MainBusiness.CameraControlBook.PublicClass.GetSelectWorkPerson(this.dtpDate.DateValue, this.txtServiceName2, LYFZ.EnumPublic.EnumWorkPersonType.服务师1);
  285. }
  286. /// <summary>
  287. ///
  288. /// </summary>
  289. /// <param name="sender"></param>
  290. /// <param name="e"></param>
  291. void chkDateTime_Click(object sender, EventArgs e)
  292. {
  293. if (this.chkDateTime.Checked)
  294. {
  295. this.dtpDate.Enabled = true;
  296. this.txtTime.ReadOnly = false;
  297. }
  298. else
  299. {
  300. this.dtpDate.Enabled = false;
  301. this.txtTime.ReadOnly = true;
  302. }
  303. }
  304. /// <summary>
  305. ///
  306. /// </summary>
  307. /// <param name="sender"></param>
  308. /// <param name="e"></param>
  309. void chkBootDivisionName_Click(object sender, EventArgs e)
  310. {
  311. if (this.chkBootDivisionName.Checked)
  312. { this.btnBootDivisionName.Enabled = true; }
  313. else
  314. { this.btnBootDivisionName.Enabled = false; }
  315. }
  316. /// <summary>
  317. ///
  318. /// </summary>
  319. /// <param name="sender"></param>
  320. /// <param name="e"></param>
  321. void chkClothingName_Click(object sender, EventArgs e)
  322. {
  323. if (this.chkClothingName.Checked)
  324. { this.btnClothingName.Enabled = true; }
  325. else
  326. { this.btnClothingName.Enabled = false; }
  327. }
  328. /// <summary>
  329. ///
  330. /// </summary>
  331. /// <param name="sender"></param>
  332. /// <param name="e"></param>
  333. void chkFilmSelectionName_Click(object sender, EventArgs e)
  334. {
  335. if (this.chkFilmSelectionName.Checked)
  336. { this.btnFilmSelectionName.Enabled = true; }
  337. else
  338. { this.btnFilmSelectionName.Enabled = false; }
  339. }
  340. /// <summary>
  341. ///
  342. /// </summary>
  343. /// <param name="sender"></param>
  344. /// <param name="e"></param>
  345. void chkLookDesignName_Click(object sender, EventArgs e)
  346. {
  347. if (this.chkLookDesignName.Checked)
  348. { this.btnLookDesignName.Enabled = true; }
  349. else
  350. { this.btnLookDesignName.Enabled = false; }
  351. }
  352. /// <summary>
  353. ///
  354. /// </summary>
  355. /// <param name="sender"></param>
  356. /// <param name="e"></param>
  357. void chkMakeupArtistName_Click(object sender, EventArgs e)
  358. {
  359. if (this.chkMakeupArtistName.Checked)
  360. { this.btnMakeupArtistName.Enabled = true; }
  361. else
  362. { this.btnMakeupArtistName.Enabled = false; }
  363. }
  364. /// <summary>
  365. ///
  366. /// </summary>
  367. /// <param name="sender"></param>
  368. /// <param name="e"></param>
  369. void chkMakeupAssistantName_Click(object sender, EventArgs e)
  370. {
  371. if (this.chkMakeupAssistantName.Checked)
  372. { this.btnMakeupAssistantName.Enabled = true; }
  373. else
  374. { this.btnMakeupAssistantName.Enabled = false; }
  375. }
  376. /// <summary>
  377. ///
  378. /// </summary>
  379. /// <param name="sender"></param>
  380. /// <param name="e"></param>
  381. void chkPhotographerName_Click(object sender, EventArgs e)
  382. {
  383. if (this.chkPhotographerName.Checked)
  384. { this.btnPhotographerName.Enabled = true; }
  385. else
  386. { this.btnPhotographerName.Enabled = false; }
  387. }
  388. /// <summary>
  389. ///
  390. /// </summary>
  391. /// <param name="sender"></param>
  392. /// <param name="e"></param>
  393. void chkPhotographyAssistantName_Click(object sender, EventArgs e)
  394. {
  395. if (this.chkPhotographyAssistantName.Checked)
  396. { this.btnPhotographyAssistantName.Enabled = true; }
  397. else
  398. { this.btnPhotographyAssistantName.Enabled = false; }
  399. }
  400. /// <summary>
  401. ///
  402. /// </summary>
  403. /// <param name="sender"></param>
  404. /// <param name="e"></param>
  405. void chkPickupName_Click(object sender, EventArgs e)
  406. {
  407. if (this.chkPickupName.Checked)
  408. { this.btnPickupName.Enabled = true; }
  409. else
  410. { this.btnPickupName.Enabled = false; }
  411. }
  412. /// <summary>
  413. ///
  414. /// </summary>
  415. /// <param name="sender"></param>
  416. /// <param name="e"></param>
  417. void chkServiceName1_Click(object sender, EventArgs e)
  418. {
  419. if (this.chkServiceName1.Checked)
  420. { this.btnServiceName1.Enabled = true; }
  421. else
  422. { this.btnServiceName1.Enabled = false; }
  423. }
  424. /// <summary>
  425. ///
  426. /// </summary>
  427. /// <param name="sender"></param>
  428. /// <param name="e"></param>
  429. void chkServiceName2_Click(object sender, EventArgs e)
  430. {
  431. if (this.chkServiceName2.Checked)
  432. { this.btnServiceName2.Enabled = true; }
  433. else
  434. { this.btnServiceName2.Enabled = false; }
  435. }
  436. }
  437. }