nianzongjie.aspx.cs
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:2k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using COM.OA.Entity;
  12. using COM.OA.BLL;
  13. public partial class wx_zongjie_nianzongjie : System.Web.UI.Page
  14. {
  15.     protected void Page_Load(object sender, EventArgs e)
  16.     {
  17.     }
  18.     protected void Submit1_ServerClick(object sender, EventArgs e)
  19.     {
  20.         //取要插入的数据值
  21.         string changgui = this.Request.Form["Freenianzong"].Trim();
  22.         string jobjihua = this.Request.Form["txt_jobjihua"].Trim();
  23.         string chuangxin = this.Request.Form["txt_chuangxin"].Trim();
  24.         string year = this.Request.Form["yearvalue"].Trim();
  25.         string month = this.Request.Form["monthvalue"].Trim();
  26.         if (changgui == null || changgui=="")
  27.         {
  28.             this.Response.Write(string.Format(GetRedirect.WINALERT, "常规不能为空"));
  29.             return;
  30.         }
  31.         else if (jobjihua == null || jobjihua == "")
  32.         {
  33.             this.Response.Write(string.Format(GetRedirect.WINALERT, "工作计划不能为空"));
  34.             return;
  35.         }
  36.         else if (chuangxin == null || chuangxin == "")
  37.         {
  38.             this.Response.Write(string.Format(GetRedirect.WINALERT, "创新不能为空"));
  39.             return;
  40.         }
  41.         else
  42.         {
  43.             users loginuser = Session["loginuser"] as users;
  44.             //实力化实体,存值
  45.             worksumup ws = new worksumup();
  46.             ws.ws_st_id = 1;
  47.             ws.ws_year = year;
  48.             ws.ws_month = month;
  49.             ws.ws_time = DateTime.Now;
  50.             ws.ws_generalwork = changgui;
  51.             ws.ws_nextplan = jobjihua;
  52.             ws.ws_advice = chuangxin;
  53.             ws.ws_u_id = loginuser.u_id;
  54.             //插入
  55.             worksumupBLL.Insert(ws);
  56.             this.Response.Write(string.Format(GetRedirect.WINALERT, "插入成功"));
  57.             this.Response.Write(string.Format(GetRedirect.REDIRECT, "nianzongjie.aspx"));
  58.         }
  59.     }
  60. }