⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jh_writeplan.aspx.cs

📁 OA自动化办公系统,就是OA自动化办公系统
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using COM.OA.BLL;
using System.Collections.Generic;
using COM.OA.Entity;

public partial class rc_jh_writeplan : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    //提交按钮
    protected void Button1_Click(object sender, EventArgs e)
    {
        //主题
        string title=this.Request.Form["txtTitle"];
        //内容
        string content = this.ftbContent.Text;
        //日期
        string orderdate = DateTime.Now.ToString("yyyy-MM-dd");
        //发送人
        string username = this.Request.Form["txtusername"];
        //发送人id
        int userid = 0;

        string sql3 = "u_username='{0}'";
        sql3 = string.Format(sql3, username);
        IList<users> userlist = usersBLL.Select(sql3);
        if (userlist.Count == 1)
        {
            foreach (users u in userlist)
            {
                userid = u.u_id;
            }
        }
        //发送时间
        DateTime sendtime = DateTime.Parse(this.Request.Form["txtsendtime"]);
        //状态
        int state = 1;
        //读否
        int isread = 0;
        //读写人id
        int readerid = 1;
        //读写内容
        string readcontent = "";
        //读写时间
        string readtime = DateTime.Now.ToString("yyyy-MM-dd");

        timeorder torder = new timeorder();
        torder.to_orderdate =  DateTime.Parse(orderdate);//日程日期
        torder.to_title = title;//标题
        torder.to_content = content;//内容
        torder.to_u_id = userid;//发送人id
        torder.to_sendtime = sendtime;//发送时间
        torder.to_state = state; //状态
        torder.to_isread = isread;//是否批阅
        torder.to_readerid = readerid;//批阅人id
        torder.to_readcontent = readcontent;//批阅内容
        torder.to_readtime = DateTime.Parse(readtime); //批阅时间

        int flag = timeorderBLL.Insert(torder);
        if (flag == 0)
        {
            this.ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "<script>alert('计划发送失败!!');</script>");
        }
        this.ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "<script>alert('计划发送成功!!');</script>");
        this.Response.Redirect("jh_myplan.aspx");

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -