QiHaiFengProgram/Personal/NoticeEdit.aspx.cs

(开头部分) 11KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using SuLinClass;
using ProgramLib;
using Telerik.WebControls;

namespace QiHaiFengProgram.Personal
{

    public partial class NoticeEdit : System.Web.UI.Page
    {
        Pub list = new Pub();
        protected void Page_Load(object sender, EventArgs e)
        {
            lblMsg.Text = "";
            FileUpload1.Focus();
            lblPath.Text = "个人事务 >> 公告\\通知维护";
            if (!IsPostBack)
            {
                txtNI_Title.Focus();
                txtNI_AcceptID.Attributes.Add("readonly", "readonly");
                if (Request["action"] == "add")
                {
                    Random g = new Random();
                    string rad = g.Next(10000).ToString();
                    hidNI_LsID.Value = "" + System.DateTime.Now.Year.ToString() + "" + System.DateTime.Now.Month.ToString() + "" + System.DateTime.Now.Day.ToString() + "" + System.DateTime.Now.Hour.ToString() + "" + System.DateTime.Now.Minute.ToString() + "" + System.DateTime.Now.Second.ToString() + "" + System.DateTime.Now.Millisecond.ToString() + "" + rad + "";
                    btnEdit.Visible = false;
                    lbl_UserName.Text = Server.UrlDecode(Request.Cookies["user"].Values["name"]);
                    Hid_UserID.Value = Request.Cookies["user"].Values["id"];
                    lbl_date.Text = DateTime.Now.ToString();
                }
                if (Request["action"] == "update")
                {
                    Bind();
                    btnAdd.Visible = false;
                }
            }
        }

        private void Bind()//绑定拜访计划
        {
            string id = Request["id"];
            SqlDataReader sdr = PublicFunctions.GetDataRows(" where NI_ID=" + id, "", "V_Notice");
            if (sdr.Read())
            {
                lbl_UserName.Text = sdr["NI_YgName"].ToString();
                Hid_UserID.Value = sdr["NI_OPID"].ToString();
                lbl_date.Text = sdr["NI_Time"].ToString();
                hidNI_LsID.Value = sdr["NI_LsID"].ToString();                
                txtNI_Title.Text = sdr["NI_Title"].ToString();
                txtNI_Content.Value = sdr["NI_Content"].ToString();
                txtNI_AcceptID.Text = sdr["NI_AcceptName"].ToString();
                hidtxtNI_AcceptID.Value = sdr["NI_AcceptID"].ToString();
            }
后面还有 179 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。