Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int id = Int32.Parse(Request["id"]);
         model       = gongKaiXinXi.GetModel(id);
         biaoti.Text = model.BiaoTi;
     }
 }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     BLL.GongKaiXinXi gongKaiXinXi = new BLL.GongKaiXinXi();
     model = gongKaiXinXi.GetModel(Int32.Parse(Request["id"]));
     //TimeSpan sp = DateTime.Now - model.FaBuShiJian;
     //DateTime dt=DateTime.Now + sp;
     //if (sp.TotalMinutes >= 1 && sp.TotalHours <= 72)
     //{
     //    Context.Response.Write(dt);
     //}
 }
Beispiel #3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            int id = Int32.Parse(Request["id"]);

            Model.GongKaiXinXi model1 = gongKaiXinXi.GetModel(id);
            model1.NeiRong    = Request["mytext"];
            model1.BiaoTi     = biaoti.Text;
            model1.LeiXing    = Request.Params.Get("select");
            model1.FaBuDanWei = Request["fabudanwei"];
            model1.ZuoZe      = Request["faburen"];
            gongKaiXinXi.Update(model1);
            Context.Response.Redirect("GongKaiXinXi_List.aspx");
        }
Beispiel #4
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     BLL.GongKaiXinXi   gongKaiXinXi = new BLL.GongKaiXinXi();
     Model.GongKaiXinXi model        = new Model.GongKaiXinXi
     {
         NeiRong     = Request["mytext"],
         BiaoTi      = this.biaoti.Text,
         LeiXing     = Request.Params.Get("select"),
         FaBuDanWei  = Request["fabudanwei"],
         ZuoZe       = Request["faburen"],
         FaBuShiJian = DateTime.Now,
         LiuLanCiShu = 0,
         BeiZhu      = ""
     };
     gongKaiXinXi.Add(model);
     Context.Response.Redirect("/Admin/html/Success.html?id=gongkaixinxi");
 }