123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using OA2014.publicCode;
- using DAL;
- using Models;
- namespace OA2014.users
- {
- public partial class auditDailyManagementContent : SessionCode
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- bindText();
- }
- }
- void bindText()
- {
- if (Request.QueryString["id"] != null)
- {
- DailyManagementService dms = new DailyManagementService();
- DailyManagement dm = dms.GetDailyManagementByID(Convert.ToInt32(Request.QueryString["id"]));
- if (dm != null)
- {
- txtDailyDate.Text = dm.DailyDate;
- txtWorkTitle.Text = dm.WorkTitle;
- txtWorkHours.Text = dm.WorkHours;
- txtCompletionRate.Text = dm.CompletionRate;
- txtWorkContent.Text = dm.WorkContent;
- }
- }
- }
- /// <summary>
- /// 保存事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected void btnSave_Click(object sender, EventArgs e)
- {
- DailyManagementService dms = new DailyManagementService();
- DailyManagement dm = new DailyManagement();
- if (Request.QueryString["id"] != null)
- if (dms.updateAuditDailyManagement(Convert.ToInt32(Request.QueryString["id"])))
- Response.Redirect("auditDailyManagement.aspx");
- else
- PublicCode.GetAlertMsg(this, GetType(), PublicCode.AlertMsgOne);
- }
- /// <summary>
- /// 返回事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected void btnBack_Click(object sender, EventArgs e)
- {
- Response.Redirect("auditDailyManagement.aspx");
- }
- }
- }
|