addDailyManagement.aspx.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using Models;
  8. using DAL;
  9. using OA2014.publicCode;
  10. namespace OA2014.users
  11. {
  12. public partial class addDailyManagement : SessionCode
  13. {
  14. protected void Page_Load(object sender, EventArgs e)
  15. {
  16. if (!IsPostBack)
  17. {
  18. }
  19. }
  20. /// <summary>
  21. /// 保存事件
  22. /// </summary>
  23. /// <param name="sender"></param>
  24. /// <param name="e"></param>
  25. protected void btnSave_Click(object sender, EventArgs e)
  26. {
  27. DailyManagementService dms = new DailyManagementService();
  28. DailyManagement dm = new DailyManagement();
  29. dm.DailyDate = txtDailyDate.Text;
  30. dm.WorkTitle = txtWorkTitle.Text;
  31. dm.WorkHours = txtWorkHours.Text;
  32. dm.CompletionRate = txtCompletionRate.Text;
  33. dm.WorkContent = txtWorkContent.Text;
  34. dm.UserId = UserId;
  35. dm.Dates = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
  36. dm.IsAudit = 0;
  37. dm.AuditUserId = 0;
  38. dm.AuditDate = "";
  39. dm.IsDel = 0;
  40. if (dms.AddDailyManagement(dm))
  41. Response.Redirect("dailyManagement.aspx");
  42. else
  43. PublicCode.GetAlertMsg(this, GetType(), PublicCode.AlertMsgOne);
  44. }
  45. /// <summary>
  46. /// 返回事件
  47. /// </summary>
  48. /// <param name="sender"></param>
  49. /// <param name="e"></param>
  50. protected void btnBack_Click(object sender, EventArgs e)
  51. {
  52. Response.Redirect("dailyManagement.aspx");
  53. }
  54. }
  55. }