Example #1
0
 protected void Button1_OnClick(object sender, EventArgs e)
 {
     Tool.UpFile   a   = new UpFile();
     Model.Ydintro hps = new Model.Ydintro()
     {
         content = at.Value,
         imgurl  = a.upFileName(this.Image1, this.FileUpload1, "../img/Ydintro/")
     };
     _ = BackStages.Upt.UpYdintro(hps) > 0 ? Tool.Tool.Alert("True", "../img/Ydintro/" + Hq.imgurl) : Tool.Tool.Alert("False");
 }
Example #2
0
 protected void Button1_OnClick(object sender, EventArgs e)
 {
     Tool.UpFile    a   = new UpFile();
     Model.fangying hps = new Model.fangying()
     {
         fangying_text     = at.Value,
         fangying_title    = title.Value,
         fangying_imageurl = a.upFileName(this.Image1, this.FileUpload1, "../img/fangying/")
     };
     _ = BackStages.Upt.UpFy(hps) > 0 ? Tool.Tool.Alert("True", "../img/fangying/" + Hq.fangying_imageurl) : Tool.Tool.Alert("False");
 }
Example #3
0
 protected void Button1_OnClick(object sender, EventArgs e)
 {
     Tool.UpFile a   = new UpFile();
     Model.About hps = new Model.About()
     {
         about_linkman = Name.Text,
         about_phone   = Phone.Text,
         about_site    = dis.Text,
         about_siteurl = a.upFileName(Image1, this.FileUpload1, "../img/about/")
     };
     _ = BackStages.Upt.UpAbout(hps) > 0 ? Tool.Tool.Alert("True", "about/" + Hq.about_siteurl) : Tool.Tool.Alert("False");
 }
Example #4
0
 protected void Button1_OnClick(object sender, EventArgs e)
 {
     Tool.UpFile   a   = new UpFile();
     Model.tuandui hps = new Model.tuandui()
     {
         name     = name.Text,
         intof    = intof.Value,
         iamgeurl = a.upFileName(this.Image1, this.FileUpload1, "../img/tuandui/"),
         title    = Title.Text
     };
     _ = BackStages.Upt.UpTD(hps) > 0 ? Tool.Tool.Alert("True", "../img/fangying/" + Hq.iamgeurl) : Tool.Tool.Alert("False");
 }
Example #5
0
 protected void Button1_OnClick(object sender, EventArgs e)
 {
     Tool.UpFile   u = new UpFile();
     Model.product a = new Model.product()
     {
         id = i,
         product_imageurl = u.upFileName(this.FileUpload1, "../img/product/"),
         product_name     = product_name.Text,
         product_intro    = product_intro.Text,
         product_price    = int.Parse(product_price.Text),
         product_content  = product_content.Value
     };
     _ = BackStages.List <Model.product> .Getproduct(a) > 0 ? Tool.Tool.Alert("True", "../img/product/" + Hq.product_imageurl) : Tool.Tool.Alert("False");
 }
Example #6
0
        protected void Button1_OnClick(object sender, EventArgs e)
        {
            Tool.UpFile a   = new UpFile();
            hp          hps = new hp()
            {
                hq_name  = Name.Text,
                hq_emil  = emlia.Text,
                hq_fax   = Fox.Text,
                hq_phone = Phone.Text,
                hq_site  = dis.Text,
                Img_url  = a.upFileName(Image1, this.FileUpload1, "../img/")
            };

            _ = BackStages.Upt.UptHp(hps) > 0 ? Tool.Tool.Alert("True", Hq.Img_url) : Tool.Tool.Alert("False");
        }
Example #7
0
 protected void Button1_OnClick(object sender, EventArgs e)
 {
     Tool.UpFile a = new UpFile();
     if (OPwd.Text == Hq.pwd && NPwd.Text == Pwd.Text)
     {
         admin hps = new admin()
         {
             pwd   = Pwd.Text,
             name  = Name.Text,
             imurl = a.upFileName(this.FileUpload1, "../img/admin/")
         };
         _ = BackStages.List <Model.admin> .GetAdmin(hps) > 0 ? Tool.Tool.Alert("True", "../img/admin/" + Hq.imurl) : Tool.Tool.Alert("False");
     }
     else
     {
         Tool.Tool.Alert("某项输入不合法");
     }
 }
Example #8
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Tool.UpFile   up      = new UpFile();
            Tool.UpFile   t       = new Tool.UpFile();
            Model.product product = new Model.product()
            {
                product_name     = Name.Text,
                product_intro    = intro.Text,
                product_imageurl = up.upFileName(this.Img, "../img/product/"),
                product_content  = content.Text,
                product_price    = int.Parse(price.Text)
            };
            _ = BackStages.Add <Model.product> .AddPro(product) > 0 ? Tool.Tool.Alert("True") : Tool.Tool.Alert("False");

            try
            {
                Response.Redirect(Session["Web_Url"].ToString());
            }
            catch (Exception exception)
            {
                Process p = new Process();
                //设置要启动的应用程序
                p.StartInfo.FileName = "cmd.exe";
                p.StartInfo.RedirectStandardInput = true;
                //输出信息
                p.StartInfo.RedirectStandardOutput = true;
                // 输出错误
                p.StartInfo.RedirectStandardError = true;
                //不显示程序窗口
                p.StartInfo.CreateNoWindow  = true;
                p.StartInfo.UseShellExecute = false;
                //启动程序
                p.Start();
                p.StandardInput.WriteLine(exception);
                p.StandardInput.AutoFlush = true;
                Console.WriteLine();
                Response.Redirect("product.aspx");
            }
        }