F_TAT_0501.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_TAT_0501.cs
  5. * 2.功能描述:进度考核一览
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 宋扬 2014/12/11 1.00 新建
  9. *******************************************************************************/
  10. using System;
  11. using System.Data;
  12. using System.Windows.Forms;
  13. using Dongke.IBOSS.PRD.Basics.BaseResources;
  14. using Dongke.IBOSS.PRD.Basics.DockPanel;
  15. using Dongke.IBOSS.PRD.Client.CommonModule;
  16. using Dongke.IBOSS.PRD.WCF.DataModels;
  17. using Dongke.IBOSS.PRD.WCF.Proxys;
  18. using Dongke.IBOSS.PRD.WCF.Proxys.TATModuleService;
  19. namespace Dongke.IBOSS.PRD.Client.TATModule
  20. {
  21. public partial class F_TAT_0501 : DockPanelBase
  22. {
  23. #region 成员变量
  24. // 单例模式
  25. private static F_TAT_0501 _instance;
  26. // 检索用加载条件实体
  27. private ProgressEntity _progressEntity;
  28. #endregion
  29. #region 构造函数
  30. /// <summary>
  31. /// 窗体构造函数
  32. /// </summary>
  33. private F_TAT_0501()
  34. {
  35. InitializeComponent();
  36. // 窗体显示的Title
  37. this.Text = FormTitles.F_TAT_0501;
  38. }
  39. #endregion
  40. #region 单例模式
  41. /// <summary>
  42. /// 单例模式
  43. /// </summary>
  44. public static F_TAT_0501 Instance
  45. {
  46. get
  47. {
  48. if (_instance == null)
  49. {
  50. _instance = new F_TAT_0501();
  51. }
  52. return _instance;
  53. }
  54. }
  55. #endregion
  56. #region 事件处理
  57. /// <summary>
  58. /// 窗体加载
  59. /// </summary>
  60. /// <param name="sender"></param>
  61. /// <param name="e"></param>
  62. private void F_TAT_0501_Load(object sender, EventArgs e)
  63. {
  64. try
  65. {
  66. this.dgvProgress.AutoGenerateColumns = false;
  67. //绑定页面各查询条件的数据源
  68. this.BindSelectData();
  69. //按钮变灰
  70. ButtonEnabled();
  71. }
  72. catch (Exception ex)
  73. {
  74. // 对异常进行共通处理
  75. ExceptionManager.HandleEventException(this.ToString(),
  76. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  77. }
  78. }
  79. /// <summary>
  80. /// 窗体关闭事件
  81. /// </summary>
  82. /// <param name="sender"></param>
  83. /// <param name="e"></param>
  84. private void F_TAT_0501_FormClosed(object sender, FormClosedEventArgs e)
  85. {
  86. _instance = null;
  87. }
  88. /// <summary>
  89. /// 关闭按钮
  90. /// </summary>
  91. /// <param name="sender"></param>
  92. /// <param name="e"></param>
  93. private void tsbtnClose_Click(object sender, EventArgs e)
  94. {
  95. this.Close();
  96. }
  97. /// <summary>
  98. /// 自动适应列宽
  99. /// </summary>
  100. /// <param name="sender"></param>
  101. /// <param name="e"></param>
  102. private void tsbtnAdaptive_Click(object sender, EventArgs e)
  103. {
  104. this.dgvProgress.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
  105. }
  106. /// <summary>
  107. /// 查询按钮事件
  108. /// </summary>
  109. /// <param name="sender"></param>
  110. /// <param name="e"></param>
  111. private void btnSearch_Click(object sender, EventArgs e)
  112. {
  113. try
  114. {
  115. //获取查询条件
  116. BindSelectedData();
  117. ServiceResultEntity srEntity = (ServiceResultEntity)DoAsync(new AsyncMethod(() =>
  118. {
  119. return TATModuleProxy.Service.GetProgress(_progressEntity);
  120. }));
  121. if (srEntity.Data != null)
  122. {
  123. if (srEntity.Data.Tables[Constant.INT_IS_ZERO].Rows.Count <= Constant.INT_IS_ZERO)
  124. {
  125. // 提示未查找到数据
  126. MessageBox.Show(Messages.MSG_CMN_I002, this.Text,
  127. MessageBoxButtons.OK, MessageBoxIcon.Information);
  128. //清空数据
  129. this.dgvProgress.DataSource = null;
  130. //按钮变灰
  131. ButtonEnabled();
  132. }
  133. else
  134. {
  135. //绑定值
  136. this.dgvProgress.DataSource = srEntity.Data.Tables[Constant.INT_IS_ZERO];
  137. }
  138. }
  139. }
  140. catch (Exception ex)
  141. {
  142. // 对异常进行共通处理
  143. ExceptionManager.HandleEventException(this.ToString(),
  144. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  145. }
  146. }
  147. /// <summary>
  148. /// 清空条件
  149. /// </summary>
  150. /// <param name="sender"></param>
  151. /// <param name="e"></param>
  152. private void btnClearCondition_Click(object sender, EventArgs e)
  153. {
  154. this.txtProgressName.Text = string.Empty;
  155. this.lbxAuditStatus.Text = string.Empty;
  156. this.txtRemarks.Text = string.Empty;
  157. this.cbStartTime.Checked = false;
  158. this.cbEndTime.Checked = false;
  159. this.lbxSalaryType.Text = string.Empty;
  160. }
  161. /// <summary>
  162. /// 新建信息
  163. /// </summary>
  164. /// <param name="sender"></param>
  165. /// <param name="e"></param>
  166. private void tsbtnAdd_Click(object sender, EventArgs e)
  167. {
  168. try
  169. {
  170. //以新建模式打开信息窗体
  171. F_TAT_0502 frmTAT0502 = new F_TAT_0502(Constant.FormMode.Add, Constant.INT_IS_ZERO);
  172. DialogResult dialogResult = frmTAT0502.ShowDialog();
  173. //操作成功后刷新数据源
  174. if (dialogResult == DialogResult.OK)
  175. {
  176. //清空数据
  177. this.dgvProgress.DataSource = null;
  178. BindSelectedData();//获取条件值
  179. ServiceResultEntity srEntity = (ServiceResultEntity)DoAsync(new AsyncMethod(() =>
  180. {
  181. return TATModuleProxy.Service.GetProgress(this._progressEntity);
  182. }));
  183. if (srEntity.Data != null
  184. && srEntity.Data.Tables[Constant.INT_IS_ZERO].Rows.Count > Constant.INT_IS_ZERO)
  185. {
  186. //绑定值
  187. this.dgvProgress.DataSource = srEntity.Data.Tables[Constant.INT_IS_ZERO];
  188. }
  189. //服务实体共通处理
  190. ServiceResultEntityManager.HandleServiceResultEntity(srEntity, this.Text);
  191. }
  192. }
  193. catch (Exception ex)
  194. {
  195. // 对异常进行共通处理
  196. ExceptionManager.HandleEventException(this.ToString(),
  197. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  198. }
  199. }
  200. /// <summary>
  201. /// 复制添加信息
  202. /// </summary>
  203. /// <param name="sender"></param>
  204. /// <param name="e"></param>
  205. private void tsbtnCopy_Click(object sender, EventArgs e)
  206. {
  207. try
  208. {
  209. DataGridViewRow currentRow = this.dgvProgress.CurrentRow;
  210. if (currentRow != null)
  211. {
  212. //获取需要添加明细的信息ID
  213. int entityId = Convert.ToInt32(currentRow.Cells["ProgressID"].Value);
  214. //以复制模式打开信息窗体
  215. F_TAT_0502 frmTAT0502 = new F_TAT_0502(Constant.FormMode.CopyAndAdd, entityId);
  216. DialogResult dialogResult = frmTAT0502.ShowDialog();
  217. //操作成功后刷新数据源
  218. if (dialogResult == DialogResult.OK)
  219. {
  220. BindSelectedData();//获取条件值
  221. this.dgvProgress.DataSource = null;
  222. ServiceResultEntity srEntity = (ServiceResultEntity)DoAsync(new AsyncMethod(() =>
  223. {
  224. return TATModuleProxy.Service.GetProgress(this._progressEntity);
  225. }));
  226. if (srEntity.Data != null
  227. && srEntity.Data.Tables[Constant.INT_IS_ZERO].Rows.Count > Constant.INT_IS_ZERO)
  228. {
  229. //绑定值
  230. this.dgvProgress.DataSource = srEntity.Data.Tables[Constant.INT_IS_ZERO];
  231. }
  232. //服务实体共通处理
  233. ServiceResultEntityManager.HandleServiceResultEntity(srEntity, this.Text);
  234. }
  235. }
  236. }
  237. catch (Exception ex)
  238. {
  239. // 对异常进行共通处理
  240. ExceptionManager.HandleEventException(this.ToString(),
  241. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  242. }
  243. }
  244. /// <summary>
  245. /// 编辑信息
  246. /// </summary>
  247. /// <param name="sender"></param>
  248. /// <param name="e"></param>
  249. private void tsbtnEdit_Click(object sender, EventArgs e)
  250. {
  251. try
  252. {
  253. DataGridViewRow currentRow = this.dgvProgress.CurrentRow;
  254. if (currentRow != null)
  255. {
  256. //获取需要添加明细的信息ID
  257. int entityId = Convert.ToInt32(currentRow.Cells["ProgressID"].Value);
  258. //以复制模式打开信息窗体
  259. F_TAT_0502 frmTAT0502 = new F_TAT_0502(Constant.FormMode.Edit, entityId);
  260. DialogResult dialogResult = frmTAT0502.ShowDialog();
  261. //操作成功后刷新数据源2
  262. if (dialogResult == DialogResult.OK)
  263. {
  264. this.dgvProgress.DataSource = null;
  265. BindSelectedData();//获取条件值
  266. ServiceResultEntity srEntity = (ServiceResultEntity)DoAsync(new AsyncMethod(() =>
  267. {
  268. return TATModuleProxy.Service.GetProgress(this._progressEntity);
  269. }));
  270. if (srEntity.Data != null
  271. && srEntity.Data.Tables[Constant.INT_IS_ZERO].Rows.Count > Constant.INT_IS_ZERO)
  272. {
  273. //绑定值
  274. this.dgvProgress.DataSource = srEntity.Data.Tables[Constant.INT_IS_ZERO];
  275. }
  276. else
  277. {
  278. //按钮变灰
  279. ButtonEnabled();
  280. }
  281. //服务实体共通处理
  282. ServiceResultEntityManager.HandleServiceResultEntity(srEntity, this.Text);
  283. }
  284. }
  285. }
  286. catch (Exception ex)
  287. {
  288. // 对异常进行共通处理
  289. ExceptionManager.HandleEventException(this.ToString(),
  290. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  291. }
  292. }
  293. /// <summary>
  294. /// 操作明细
  295. /// </summary>
  296. /// <param name="sender"></param>
  297. /// <param name="e"></param>
  298. private void tsbtnDetail_Click(object sender, EventArgs e)
  299. {
  300. try
  301. {
  302. DataGridViewRow currentRow = this.dgvProgress.CurrentRow;
  303. if (currentRow != null)
  304. {
  305. //获取需要添加明细的信息ID
  306. int entityId = Convert.ToInt32(currentRow.Cells["ProgressID"].Value);
  307. //以复制模式打开信息窗体
  308. F_TAT_0503 frmTAT0503;
  309. if (Convert.ToInt32(currentRow.Cells["colAuditStatus"].Value)
  310. == Convert.ToInt32(Constant.AuditStatus.Agree))
  311. {
  312. frmTAT0503 = new F_TAT_0503(Constant.FormMode.Display, entityId);
  313. }
  314. else
  315. {
  316. frmTAT0503 = new F_TAT_0503(Constant.FormMode.Edit, entityId);
  317. }
  318. DialogResult dialogResult = frmTAT0503.ShowDialog();
  319. //操作成功后刷新数据源2
  320. if (dialogResult == DialogResult.OK)
  321. {
  322. this.dgvProgress.DataSource = null;
  323. BindSelectedData();//获取条件值
  324. ServiceResultEntity srEntity = (ServiceResultEntity)DoAsync(new AsyncMethod(() =>
  325. {
  326. return TATModuleProxy.Service.GetProgress(this._progressEntity);
  327. }));
  328. if (srEntity.Data != null
  329. && srEntity.Data.Tables[Constant.INT_IS_ZERO].Rows.Count > Constant.INT_IS_ZERO)
  330. {
  331. //绑定值
  332. this.dgvProgress.DataSource = srEntity.Data.Tables[Constant.INT_IS_ZERO];
  333. }
  334. //服务实体共通处理
  335. ServiceResultEntityManager.HandleServiceResultEntity(srEntity, this.Text);
  336. }
  337. }
  338. }
  339. catch (Exception ex)
  340. {
  341. // 对异常进行共通处理
  342. ExceptionManager.HandleEventException(this.ToString(),
  343. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  344. }
  345. }
  346. /// <summary>
  347. /// 审核信息
  348. /// </summary>
  349. /// <param name="sender"></param>
  350. /// <param name="e"></param>
  351. private void tsbtnApprover_Click(object sender, EventArgs e)
  352. {
  353. try
  354. {
  355. DataGridViewRow currentRow = this.dgvProgress.CurrentRow;
  356. if (currentRow != null)
  357. {
  358. //获取需要添加明细的信息ID
  359. int entityId = Convert.ToInt32(currentRow.Cells["ProgressID"].Value);
  360. //以复制模式打开信息窗体
  361. F_TAT_0502 frmTAT0502 = new F_TAT_0502(Constant.FormMode.Display, entityId);
  362. DialogResult dialogResult = frmTAT0502.ShowDialog();
  363. //操作成功后刷新数据源2
  364. if (dialogResult == DialogResult.OK)
  365. {
  366. this.dgvProgress.DataSource = null;
  367. BindSelectedData();//获取条件值
  368. ServiceResultEntity srEntity = (ServiceResultEntity)DoAsync(new AsyncMethod(() =>
  369. {
  370. return TATModuleProxy.Service.GetProgress(this._progressEntity);
  371. }));
  372. if (srEntity.Data != null
  373. && srEntity.Data.Tables[Constant.INT_IS_ZERO].Rows.Count > Constant.INT_IS_ZERO)
  374. {
  375. //绑定值
  376. this.dgvProgress.DataSource = srEntity.Data.Tables[Constant.INT_IS_ZERO];
  377. }
  378. else
  379. {
  380. //按钮变灰
  381. ButtonEnabled();
  382. }
  383. //服务实体共通处理
  384. ServiceResultEntityManager.HandleServiceResultEntity(srEntity, this.Text);
  385. }
  386. }
  387. }
  388. catch (Exception ex)
  389. {
  390. // 对异常进行共通处理
  391. ExceptionManager.HandleEventException(this.ToString(),
  392. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  393. }
  394. }
  395. /// <summary>
  396. /// 停用信息
  397. /// </summary>
  398. /// <param name="sender"></param>
  399. /// <param name="e"></param>
  400. private void tsbtnDisable_Click(object sender, EventArgs e)
  401. {
  402. try
  403. {
  404. DataGridViewRow currentRow = this.dgvProgress.CurrentRow;
  405. if (currentRow != null)
  406. {
  407. ProgressEntity dfEntity = new ProgressEntity();
  408. //获取ID以及时间戳
  409. dfEntity.ProgressID = Convert.ToInt32(currentRow.Cells["ProgressID"].Value);
  410. dfEntity.OPTimeStamp = Convert.ToDateTime(currentRow.Cells["colOPTimeStamp"].Value);
  411. ServiceResultEntity srEntity = (ServiceResultEntity)DoAsync(() =>
  412. {
  413. return TATModuleProxy.Service.StopProgress(dfEntity);
  414. });
  415. //服务实体共通处理
  416. ServiceResultEntityManager.HandleServiceResultEntity(srEntity, this.Text);
  417. //成功后刷新数据源
  418. if (srEntity.Status == Constant.ServiceResultStatus.Success)
  419. {
  420. this.dgvProgress.DataSource = null;
  421. BindSelectedData();//获取条件值
  422. srEntity = (ServiceResultEntity)DoAsync(new AsyncMethod(() =>
  423. {
  424. return TATModuleProxy.Service.GetProgress(this._progressEntity);
  425. }));
  426. if (srEntity.Data != null
  427. && srEntity.Data.Tables[Constant.INT_IS_ZERO].Rows.Count > Constant.INT_IS_ZERO)
  428. {
  429. //绑定值
  430. this.dgvProgress.DataSource = srEntity.Data.Tables[Constant.INT_IS_ZERO];
  431. }
  432. else
  433. {
  434. //按钮变灰
  435. ButtonEnabled();
  436. }
  437. //服务实体共通处理
  438. ServiceResultEntityManager.HandleServiceResultEntity(srEntity, this.Text);
  439. }
  440. }
  441. }
  442. catch (Exception ex)
  443. {
  444. // 对异常进行共通处理
  445. ExceptionManager.HandleEventException(this.ToString(),
  446. System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
  447. }
  448. }
  449. /// <summary>
  450. /// 开始时间条件有效性更改
  451. /// </summary>
  452. /// <param name="sender"></param>
  453. /// <param name="e"></param>
  454. private void cbStartTime_CheckedChanged(object sender, EventArgs e)
  455. {
  456. this.dtpStartTimeBetween.Enabled = this.cbStartTime.Checked;
  457. this.dtpStartTimeAfter.Enabled = this.cbStartTime.Checked;
  458. }
  459. /// <summary>
  460. /// 结束时间条件有效性更改
  461. /// </summary>
  462. /// <param name="sender"></param>
  463. /// <param name="e"></param>
  464. private void cbEndTime_CheckedChanged(object sender, EventArgs e)
  465. {
  466. this.dtpEndTimeBetween.Enabled = this.cbEndTime.Checked;
  467. this.dtpEndTimeAfter.Enabled = this.cbEndTime.Checked;
  468. }
  469. /// <summary>
  470. /// 选择信息后,工具条按钮的变化
  471. /// </summary>
  472. /// <param name="sender"></param>
  473. /// <param name="e"></param>
  474. private void dgvQuality_SelectionChanged(object sender, EventArgs e)
  475. {
  476. DataGridViewRow gvrNow = this.dgvProgress.CurrentRow;
  477. if (gvrNow != null)
  478. {
  479. //如果是待审核就可以进行修改以及审核以及停用
  480. if (Convert.ToInt32(gvrNow.Cells["colAuditStatus"].Value)
  481. == Convert.ToInt32(Constant.AuditStatus.Pending))
  482. {
  483. this.tsbtnEdit.Enabled = true;
  484. this.tsbtnDetail.Enabled = true;
  485. this.tsbtnApprover.Enabled = true;
  486. this.tsbtnDisable.Enabled = true;
  487. this.tsbtnCopy.Enabled = true;
  488. }
  489. else //否则不可以
  490. {
  491. //如果是审批通过的则不可以删除
  492. if (Convert.ToInt32(gvrNow.Cells["colAuditStatus"].Value)
  493. == Convert.ToInt32(Constant.AuditStatus.Agree))
  494. {
  495. this.tsbtnDisable.Enabled = false;
  496. }
  497. else
  498. {
  499. this.tsbtnDisable.Enabled = true;
  500. }
  501. this.tsbtnEdit.Enabled = false;
  502. this.tsbtnApprover.Enabled = false;
  503. this.tsbtnDetail.Enabled = true;
  504. }
  505. }
  506. }
  507. #endregion
  508. #region 私有方法/函数
  509. /// <summary>
  510. /// 绑定检索条件数据
  511. /// </summary>
  512. private void BindSelectData()
  513. {
  514. try
  515. {
  516. //绑定审核状态
  517. DataSet dsStatus = SystemModuleProxy.Service.GetAuditStatus();
  518. this.lbxAuditStatus.DataSource = dsStatus.Tables[Constant.INT_IS_ZERO];
  519. this.lbxAuditStatus.ValueMember = "AuditStatusID";
  520. this.lbxAuditStatus.DisplayMember = "AuditStatusName";
  521. this.lbxAuditStatus.Text = "";
  522. //绑定策略类型
  523. DataTable dtSalaryType = new DataTable();
  524. dtSalaryType.Columns.Add("SalaryTypeValue");
  525. dtSalaryType.Columns.Add("SalaryTypeName");
  526. Type SalaryTypeEnum = typeof(Constant.SalaryType);
  527. Array SalaryTypeArray = Enum.GetValues(SalaryTypeEnum);
  528. for (int i = Constant.INT_IS_ZERO; i < Constant.SalaryTypeName.Length; i++)
  529. {
  530. dtSalaryType.Rows.Add(Convert.ToInt32(SalaryTypeArray.GetValue(i)), Constant.SalaryTypeName[i]);
  531. }
  532. this.lbxSalaryType.DisplayMember = "SalaryTypeName";
  533. this.lbxSalaryType.ValueMember = "SalaryTypeValue";
  534. this.lbxSalaryType.DataSource = dtSalaryType;
  535. this.lbxSalaryType.Text = "";
  536. }
  537. catch (Exception ex)
  538. {
  539. throw ex;
  540. }
  541. }
  542. /// <summary>
  543. /// 获取页面的输入值
  544. /// </summary>
  545. private void BindSelectedData()
  546. {
  547. try
  548. {
  549. this._progressEntity = new ProgressEntity();
  550. _progressEntity.ProgressName = this.txtProgressName.Text.Trim();
  551. _progressEntity.Remarks = this.txtRemarks.Text.Trim();
  552. if (this.lbxSalaryType.SelectedValue != null)
  553. {
  554. _progressEntity.SalaryType = Convert.ToInt32(this.lbxSalaryType.SelectedValue);
  555. }
  556. if (this.lbxAuditStatus.SelectedValue != null)
  557. {
  558. _progressEntity.AuditStatus = Convert.ToInt32(this.lbxAuditStatus.SelectedValue);
  559. }
  560. if (this.cbStartTime.Checked)
  561. {
  562. string beginAccountMonthStart = this.dtpStartTimeBetween.Value.ToString("yyyy-MM-dd") + " 0:0:0";
  563. _progressEntity.BeginAccountMonthStart = Convert.ToDateTime(beginAccountMonthStart);
  564. string beginAccountMonthEnd = this.dtpEndTimeBetween.Value.ToString("yyyy-MM-dd") + " 23:59:59";
  565. _progressEntity.BeginAccountMonthEnd = Convert.ToDateTime(beginAccountMonthEnd);
  566. }
  567. if (this.cbEndTime.Checked)
  568. {
  569. string endAccountMonthStart = this.dtpStartTimeAfter.Value.ToString("yyyy-MM-dd") + " 0:0:0";
  570. _progressEntity.EndAccountMonthStart = Convert.ToDateTime(endAccountMonthStart);
  571. string endAccountMonthEnd = this.dtpEndTimeAfter.Value.ToString("yyyy-MM-dd") + " 23:59:59";
  572. _progressEntity.EndAccountMonthEnd = Convert.ToDateTime(endAccountMonthEnd);
  573. }
  574. }
  575. catch(Exception ex)
  576. {
  577. throw ex;
  578. }
  579. }
  580. /// <summary>
  581. /// 按钮变灰
  582. /// </summary>
  583. private void ButtonEnabled()
  584. {
  585. this.tsbtnEdit.Enabled = false;
  586. this.tsbtnDetail.Enabled = false;
  587. this.tsbtnApprover.Enabled = false;
  588. this.tsbtnDisable.Enabled = false;
  589. this.tsbtnCopy.Enabled = false;
  590. }
  591. #endregion
  592. }
  593. }