Ejemplo n.º 1
0
        private void WebBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            WebBrowser webBrowser = (WebBrowser)sender;

            webBrowser.ClientSize        = new Size(this.BrowserWidth, this.BrowserHeight);
            webBrowser.ScrollBarsEnabled = false;
            this.ThumbnailImage          = new Bitmap(webBrowser.Bounds.Width, webBrowser.Bounds.Height);
            webBrowser.BringToFront();
            webBrowser.DrawToBitmap(ThumbnailImage, webBrowser.Bounds);
            this.ThumbnailImage = (Bitmap)ThumbnailImage.GetThumbnailImage(Width, Height, null, IntPtr.Zero);
        }
        private void WebBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            const int    dotsPerInch  = 700; // define the quality in DPI
            const double widthInInch  = 6;   // width of the bitmap in INCH
            const double heightInInch = 1;   // height of the bitmap in INCH
            WebBrowser   webBrowser   = (WebBrowser)sender;

            webBrowser.ClientSize = new Size(this.BrowserWidth, this.BrowserHeight);
            // webBrowser.ClientSize = new Size(  (int)(widthInInch * dotsPerInch), (int)(heightInInch * dotsPerInch));
            webBrowser.ScrollBarsEnabled = true;
            this.ThumbnailImage          = new Bitmap(webBrowser.Bounds.Width, webBrowser.Bounds.Height);
            //   this.ThumbnailImage = new Bitmap( (int)(widthInInch * dotsPerInch), (int)(heightInInch * dotsPerInch) );
            this.ThumbnailImage.SetResolution(dotsPerInch, dotsPerInch);
            webBrowser.BringToFront();
            webBrowser.DrawToBitmap(ThumbnailImage, webBrowser.Bounds);
            this.ThumbnailImage = (Bitmap)ThumbnailImage.GetThumbnailImage(Width, Height, null, IntPtr.Zero);
        }
Ejemplo n.º 3
0
    protected void Button8_Click(object sender, EventArgs e)
    {
        data_conn cn = new data_conn();

        if (FileUpload1.FileName.ToString() != "")
        {

            if (FileUpload1.FileName.ToString().Substring(FileUpload1.FileName.ToString().Length - 4, 4) != ".jpg" && FileUpload1.FileName.ToString().Substring(FileUpload1.FileName.ToString().Length - 4, 4) != ".bmp" && FileUpload1.FileName.ToString().Substring(FileUpload1.FileName.ToString().Length - 4, 4) != ".JPG" && FileUpload1.FileName.ToString().Substring(FileUpload1.FileName.ToString().Length - 4, 4) != ".BMP")
            {
                MessageBox("公司照片格式错误", "公司照片格式错误");
                return;
            }
            string filepath;
            filepath = Server.MapPath("/member/companyhead/") + Request.Cookies["user_id"].Value.ToString() + "(old).jpg";
            FileUpload1.SaveAs(filepath);
            ThumbnailImage thumbnailimage = new ThumbnailImage();
            thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("/member/companyhead/") + Request.Cookies["user_id"].Value.ToString() + ".jpg", 256, 256);

            cn.mdb_exe("update TB_User set Login2_Head=1 where UserId=" + Request.Cookies["user_id"].Value.ToString());
        }

        if (FileUpload2.FileName.ToString() != "")
        {

            if (FileUpload2.FileName.ToString().Substring(FileUpload2.FileName.ToString().Length - 4, 4) != ".jpg" && FileUpload2.FileName.ToString().Substring(FileUpload2.FileName.ToString().Length - 4, 4) != ".bmp")
            {
                MessageBox("个人头像格式错误", "个人头像格式错误");
                return;
            }
            string filepath;
            filepath = Server.MapPath("/member/companyhead/") + Request.Cookies["user_id"].Value.ToString() + "(old).jpg";
            FileUpload2.SaveAs(filepath);
            ThumbnailImage thumbnailimage = new ThumbnailImage();
            thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("/member/companyhead/") + Request.Cookies["user_id"].Value.ToString() + ".jpg", 256, 256);

            cn.mdb_exe("update TB_User set HeadURL=1 where UserId=" + Request.Cookies["user_id"].Value.ToString());
        }

        string sql = "update TB_User set sign='" + TextBox1.Text + "',User_Level=2 where UserID=" + this.Request.Cookies["user_id"].Value.ToString();
        cn.mdb_exe(sql);
        ScriptManager.RegisterStartupScript(this, this.GetType(), "提示", "alert('修改成功');window.location.href='useredit1.aspx'", true);
        //this.Response.Redirect("useredit1.aspx");
        //displayDiv();
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        if (txtStorage.Value != "" && txtCity.Value != "" && txtStoragearea.Value != "" && txtFieldarea.Value != "" && txtAddress.Value != "" && txtIntro.Value != "" && txtValue.Value != "")
        {

            string value;
            if (txtValue.Value == "请填写20'40'40H'的内装价格")
            {
                value = "";
            }
            else
            {
                value = txtValue.Value;
            }
            check ck = new check();
            string sql = "insert into TB_Storage (StorageName,City,TypeName,Storage_area,Field_area,Address,intro,inbuiltValue,Company,linkmen,Phone,Postdate,UserID) values ";
            sql += "('" + ck.CheckInput(txtStorage.Value) + "','" + ck.CheckInput(txtCity.Value) + "','" + ck.CheckInput(DropDownList1.SelectedItem.Text) + "'," + ck.CheckInput(txtStoragearea.Value) + "," + ck.CheckInput(txtFieldarea.Value) + ",'" + ck.CheckInput(txtAddress.Value) + "','" + ck.CheckInput(txtIntro.Value) + "','" + ck.CheckInput(value) + "','" + ck.CheckInput(txtCompany.Value) + "','" + ck.CheckInput(txtlinkmen.Value) + "','" + ck.CheckInput(txtPhone.Value) + "',getdate()," + this.Request.Cookies["user_id"].Value.ToString() + ")";
            string id = mdb_exe_return(sql);

            if (FileUpload1.FileName != "")
            {
                string filepath = Server.MapPath("images/") + "/Storage/upload/old/" + id + "_1.jpg";
                FileUpload1.SaveAs(filepath);
                ThumbnailImage thumbnailimage = new ThumbnailImage();
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("images/") + "/Storage/upload/" + id + "_1.jpg", 48, 48);
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("images/") + "/Storage/upload/" + id + "_big_1.jpg", 210, 150);
            }
            if (FileUpload2.FileName != "")
            {
                string filepath = Server.MapPath("images/") + "/Storage/upload/old/" + id + "_2.jpg";
                FileUpload2.SaveAs(filepath);
                ThumbnailImage thumbnailimage = new ThumbnailImage();
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("images/") + "/Storage/upload/" + id + "_2.jpg", 48, 48);
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("images/") + "/Storage/upload/" + id + "_big_2.jpg", 210, 150);
            }
            if (FileUpload3.FileName != "")
            {
                string filepath = Server.MapPath("images/") + "/Storage/upload/old/" + id + "_3.jpg";
                FileUpload3.SaveAs(filepath);
                ThumbnailImage thumbnailimage = new ThumbnailImage();
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("images/") + "/Storage/upload/" + id + "_3.jpg", 48, 48);
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("images/") + "/Storage/upload/" + id + "_big_3.jpg", 210, 150);
            }
            //if (FileUpload4.FileName != "")
            //{
            //    string filepath = Server.MapPath("images/") + "/Storage/upload/old/" + id + "_4.jpg";
            //    FileUpload4.SaveAs(filepath);
            //    ThumbnailImage thumbnailimage = new ThumbnailImage();
            //    thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("images/") + "/Storage/upload/" + id + "_4.jpg", 48, 48);
            //    thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("images/") + "/Storage/upload/" + id + "_big_4.jpg", 210, 150);
            //}
            //if (FileUpload5.FileName != "")
            //{
            //    string filepath = Server.MapPath("images/") + "/Storage/upload/old/" + id + "_5.jpg";
            //    FileUpload5.SaveAs(filepath);
            //    ThumbnailImage thumbnailimage = new ThumbnailImage();
            //    thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("images/") + "/Storage/upload/" + id + "_5.jpg", 48, 48);
            //    thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("images/") + "/Storage/upload/" + id + "_big_5.jpg", 210, 150);
            //}

            this.Response.Redirect("Storage.aspx");
        }
        else
        {
            MessageBox("", "*必填");
        }
    }
Ejemplo n.º 5
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        check ck = new check();

        if (!(sex_2.Checked || sex_1.Checked))
        {
            MessageBox("opfail", "性别为空");
        }
        //else if (Phone.Value == "")
        //{
        //    MessageBox("opfail", "电话为空");
        //}
        else if (CompanyType.Value == "0")
        {
            MessageBox("opfail", "公司类型为空");
        }
        else if (ddlcity1.SelectedValue == "0" || ddlcity2.SelectedValue == "0")
        {
            MessageBox("opfail", "公司所在地为空");
        }
        else
        {
            string sql = "";
            sql = sql + "UPDATE ";
            sql = sql + "TB_User ";
            sql = sql + "SET ";
            if (sex_1.Checked)
            {
                sql = sql + "Sex = 0,";
            }
            else
            {
                sql = sql + "Sex = 1,";
            }
            sql = sql + "WPosition = '" + ck.CheckInput(Position.Value) + "',";

            //sql = sql + "Phone = '" + ck.CheckInput(Phone.Value) + "',";
            //sql = sql + "Phone2 = '" + ck.CheckInput(Phone2.Value) + "',";
            sql = sql + "Fax = '" + ck.CheckInput(Fax.Value) + "',";
            sql = sql + "MovePhone = '" + ck.CheckInput(MovePhone.Value) + "',";
            sql = sql + "Usermsn = '" + ck.CheckInput(Msn.Value) + "',";
            sql = sql + "Userqq = '" + ck.CheckInput(QQ.Value) + "',";
            sql = sql + "sign = '" + ck.CheckInput(sign.Value) + "',";

            if (Portrait.FileName.ToString() != "")
            {
                string filepath;
                filepath = Server.MapPath("/member/Head/") + Request.Cookies["user_id"].Value.ToString() + "(old).jpg";
                Portrait.SaveAs(filepath);
                ThumbnailImage thumbnailimage = new ThumbnailImage();
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("/member/Head/") + Request.Cookies["user_id"].Value.ToString() + ".jpg", 70, 70);
                sql = sql + "HeadURL = 1,";
            }

            //sql = sql + "CompanyName = '" + ck.CheckInput(Company.Value) + "',";
            sql = sql + "CompanyType = '" + ck.CheckInput(CompanyType.Value) + "',";
            sql = sql + "Login2_Locus1 = '" + ck.CheckInput(ddlcity1.SelectedItem.Text) + "', ";
            sql = sql + "Login2_Locus2 = '" + ck.CheckInput(ddlcity2.SelectedItem.Text) + "', ";
            sql = sql + "Address = '" + ck.CheckInput(Address.Value) + "',";
            sql = sql + "PostNumber = '" + ck.CheckInput(PostNumber.Value) + "',";
            sql = sql + "introduction = '" + ck.CheckInput(introduction.Value) + "',";
            //if (CoPortrait.FileName.ToString() != "")
            //{
            //    string filepath;
            //    filepath = Server.MapPath("/member/companyhead/") + Request.Cookies["user_id"].Value.ToString() + "(old).jpg";
            //    CoPortrait.SaveAs(filepath);
            //    ThumbnailImage thumbnailimage = new ThumbnailImage();
            //    thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("/member/companyhead/") + Request.Cookies["user_id"].Value.ToString() + ".jpg", 256, 256);
            //    sql = sql + "Login2_Head = 1,";
            //}
            sql = sql + "User_Level = 1 ";

            sql = sql + "WHERE UserID = " + Request.Cookies["user_id"].Value.ToString();

            data_conn cn = new data_conn();
            cn.mdb_exe(sql);

            string Login2_Adventage_Type_fcl, Login2_Adventage_Type_lcl, Login2_Adventage_Type_air, Login2_Adventage_Type_input, Login2_Adventage_Type_particular, Login2_Adventage_Type_cold, Login2_Adventage_Type_dangerous, Login2_Adventage_Type_tank, Login2_Adventage_Type_BULK, Login2_Adventage_type, Login2_Adventage_Line, Login2_Adventage_Line2, Login2_Adventage_Shipper, Login2_introduction;

            Login2_Adventage_Type_fcl = "0";
            Login2_Adventage_Type_lcl = "0";
            Login2_Adventage_Type_air = "0";
            Login2_Adventage_Type_input = "0";
            Login2_Adventage_Type_particular = "0";
            Login2_Adventage_Type_cold = "0";
            Login2_Adventage_Type_dangerous = "0";
            Login2_Adventage_Type_tank = "0";
            Login2_Adventage_Type_BULK = "0";
            if (checkall.Checked == true)
            {
                Login2_Adventage_Type_fcl = "1";
                Login2_Adventage_Type_lcl = "1";
                Login2_Adventage_Type_air = "1";

            }
            if (checkfcl.Checked == true)
            {
                Login2_Adventage_Type_fcl = "1";
            }
            if (checklcl.Checked == true)
            {
                Login2_Adventage_Type_lcl = "1";
            }
            if (checkair.Checked == true)
            {
                Login2_Adventage_Type_air = "1";
            }
            if (checkinput.Checked == true)
            {
                Login2_Adventage_Type_input = "1";
            }
            if (checkparticular.Checked == true)
            {
                Login2_Adventage_Type_particular = "1";
            }
            if (checkcold.Checked == true)
            {
                Login2_Adventage_Type_cold = "1";
            }
            if (checkdangerous.Checked == true)
            {
                Login2_Adventage_Type_dangerous = "1";
            }
            if (checktank.Checked == true)
            {
                Login2_Adventage_Type_tank = "1";
            }
            if (checkBULK.Checked == true)
            {
                Login2_Adventage_Type_BULK = "1";
            }
            //if (Login2_Adventage_Type_fcl == "0" && Login2_Adventage_Type_lcl == "0" && Login2_Adventage_Type_air == "0")
            //{
            //    MessageBox("经营类型不能为空", "经营类型不能为空");
            //    return;
            //}

            Login2_Adventage_Line = "";
            Login2_Adventage_Line2 = "";

            if ((chk_ship_Europe.Checked == true))
            {
                Login2_Adventage_Line += chk_ship_Europe.Value + "|";
            }

            if ((chk_ship_SOUTH_AMERICA.Checked == true))
            {
                Login2_Adventage_Line += chk_ship_SOUTH_AMERICA.Value + "|";
            }

            if ((chk_ship_Australia.Checked == true))
            {
                Login2_Adventage_Line += chk_ship_Australia.Value + "|";
            }

            if ((chk_ship_Caribbean.Checked == true))
            {
                Login2_Adventage_Line += chk_ship_Caribbean.Value + "|";
            }

            if ((chk_ship_offing.Checked == true))
            {
                Login2_Adventage_Line += chk_ship_offing.Value + "|";
            }

            if ((chk_ship_Japan_Korea.Checked == true))
            {
                Login2_Adventage_Line += chk_ship_Japan_Korea.Value + "|";
            }

            if ((chk_ship_CIMEX.Checked == true))
            {
                Login2_Adventage_Line += chk_ship_CIMEX.Value + "|";
            }

            if ((chk_ship_Red_Sea.Checked == true))
            {
                Login2_Adventage_Line += chk_ship_Red_Sea.Value + "|";
            }

            if ((chk_ship_Africa.Checked == true))
            {
                Login2_Adventage_Line += chk_ship_Africa.Value + "|";
            }

            if ((chk_air_North_America.Checked == true))
            {
                Login2_Adventage_Line2 += chk_air_North_America.Value + "|";
            }

            if ((chk_air_Europe.Checked == true))
            {
                Login2_Adventage_Line2 += chk_air_Europe.Value + "|";
            }

            if ((chk_air_poncho.Checked == true))
            {
                Login2_Adventage_Line2 += chk_air_poncho.Value + "|";
            }

            if ((chk_air_Asia.Checked == true))
            {
                Login2_Adventage_Line2 += chk_air_Asia.Value + "|";
            }

            if ((chk_air_Africa.Checked == true))
            {
                Login2_Adventage_Line2 += chk_air_Africa.Value + "|";
            }

            if ((chk_air_Australia.Checked == true))
            {
                Login2_Adventage_Line2 += chk_air_Australia.Value + "|";
            }

            if ((chk_air_internal.Checked == true))
            {
                Login2_Adventage_Line2 += chk_air_internal.Value + "|";
            }

            if ((string.IsNullOrEmpty(Login2_Adventage_Line)) && (string.IsNullOrEmpty(Login2_Adventage_Line2)))
            {
                //MessageBox("优势航线不能为空", "优势航线不能为空");
                //return;
            }
            else
            {
                if (Login2_Adventage_Line.Length != 0)
                {
                    Login2_Adventage_Line = Login2_Adventage_Line.Substring(0, Login2_Adventage_Line.Length - 1);
                }
            }

            Login2_Adventage_Shipper = Hidtypes.Value;

            if ((!string.IsNullOrEmpty(othershipper.Text)))
            {
                Login2_Adventage_Shipper += othershipper.Text;
            }

            sql = "update TB_User set Login2_Adventage_Type_fcl=" + Login2_Adventage_Type_fcl + ",Login2_Adventage_Type_lcl=" + Login2_Adventage_Type_lcl + ",Login2_Adventage_Type_air=" + Login2_Adventage_Type_air + ",Login2_Adventage_Type_input=" + Login2_Adventage_Type_input + ",Login2_Adventage_Type_particular=" + Login2_Adventage_Type_particular + ",Login2_Adventage_Type_dangerous=" + Login2_Adventage_Type_dangerous + ",Login2_Adventage_Type_cold=" + Login2_Adventage_Type_cold + ",Login2_Adventage_Type_tank=" + Login2_Adventage_Type_tank + ",Login2_Adventage_Type_BULK=" + Login2_Adventage_Type_BULK + ",Login2_Adventage_Line='" + ck.CheckInput(Login2_Adventage_Line) + "',Login2_Adventage_Line2='" + ck.CheckInput(Login2_Adventage_Line2) + "',Login2_Adventage_Shipper='" + ck.CheckInput(Login2_Adventage_Shipper) + "',User_Level=1 where UserID=" + this.Request.Cookies["user_id"].Value.ToString();

            cn.mdb_exe(sql);

            if (CompanyType.Value == "1")
            {
                Response.Redirect("/accounts/login4.aspx");
            }
            else if (CompanyType.Value == "2")
            {
                Response.Redirect("/accounts/login3.aspx");
            }
            else
            {
                Response.Redirect("/accounts/regsuccess.aspx");
            }

        }
    }
Ejemplo n.º 6
0
    protected void ImageButton1_Click1(object sender, ImageClickEventArgs e)
    {
        check ck = new check();
        if (Request.Cookies["user_id"] != null)
        {
            if (Request.Cookies["user_id"].Value.ToString() != "")
            {

                if (CompanyType.Value == "0")
                {
                    MessageBox("opfail", "公司类型为空");
                }
                else if (ddlcity1.SelectedValue == "0" || ddlcity2.SelectedValue == "0")
                {
                    MessageBox("opfail", "公司所在地为空");
                }
                else if (introduction.Value == "")
                {
                    MessageBox("opfail", "公司介绍为空");
                }
                else if (Address.Value.Length > 50)
                {
                    MessageBox("opfail", "联系地址不能大于50个字符");
                }
                else if (PostNumber.Value.Length > 50)
                {
                    MessageBox("opfail", "邮政编码不能大于50个字符");
                }
                else if (Position.Value.Length > 20)
                {
                    MessageBox("opfail", "职位不能大于20个字符");
                }
                else if (Fax.Value.Length > 50)
                {
                    MessageBox("opfail", "传真不能大于50个字符");
                }
                else if (MovePhone.Value.Length > 50)
                {
                    MessageBox("opfail", "手机不能大于50个字符");
                }
                else if (Msn.Value.Length > 50)
                {
                    MessageBox("opfail", "MSN不能大于50个字符");
                }
                else if (QQ.Value.Length > 50)
                {
                    MessageBox("opfail", "QQ不能大于50个字符");
                }
                else if (sign.Value.Length > 200)
                {
                    MessageBox("opfail", "个性签名不能大于200个字符");
                }
                else if (introduction.Value.Length > 800)
                {
                    MessageBox("opfail", "公司介绍不能大于800个字符");
                }
                else
                {
                    string sql = "";
                    sql = sql + "UPDATE ";
                    sql = sql + "TB_User ";
                    sql = sql + "SET ";

                    sql = sql + "Sex = " + RadioButtonList1.SelectedValue + ",";

                    sql = sql + "WPosition = '" + ck.CheckInput(Position.Value) + "',";

                    //sql = sql + "Phone = '" + ck.CheckInput(Phone.Value) + "',";
                    //sql = sql + "Phone2 = '" + ck.CheckInput(Phone2.Value) + "',";
                    sql = sql + "Fax = '" + ck.CheckInput(Fax.Value) + "',";
                    sql = sql + "MovePhone = '" + ck.CheckInput(MovePhone.Value) + "',";
                    sql = sql + "Usermsn = '" + ck.CheckInput(Msn.Value) + "',";
                    sql = sql + "Userqq = '" + ck.CheckInput(QQ.Value) + "',";
                    sql = sql + "sign = '" + ck.CheckInput(sign.Value) + "',";

                    if (Portrait.FileName.ToString() != "")
                    {
                        string filepath;
                        filepath = Server.MapPath("/member/Head/") + Request.Cookies["user_id"].Value.ToString() + "(old).jpg";
                        Portrait.SaveAs(filepath);
                        ThumbnailImage thumbnailimage = new ThumbnailImage();
                        thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("/member/Head/") + Request.Cookies["user_id"].Value.ToString() + ".jpg", 70, 70);
                        sql = sql + "HeadURL = 1,";
                    }

                    sql = sql + "CompanyType = '" + ck.CheckInput(CompanyType.Value) + "',";
                    sql = sql + "Login2_Locus1 = '" + ck.CheckInput(ddlcity1.SelectedItem.Text) + "', ";
                    sql = sql + "Login2_Locus2 = '" + ck.CheckInput(ddlcity2.SelectedItem.Text) + "', ";
                    sql = sql + "Address = '" + ck.CheckInput(Address.Value) + "',";
                    sql = sql + "PostNumber = '" + ck.CheckInput(PostNumber.Value) + "',";
                    sql = sql + "introduction = '" + ck.CheckInput(introduction.Value) + "',";
                    sql = sql + "User_Level = 1 ";
                    sql = sql + "WHERE UserID = " + Request.Cookies["user_id"].Value.ToString();

                    data_conn cn = new data_conn();
                    cn.mdb_exe(sql);

                    if (CompanyType.Value == "1")
                    {
                        Response.Redirect("/accounts/login4.aspx");
                    }
                    else if (CompanyType.Value == "2")
                    {
                        Response.Redirect("/accounts/login3.aspx");
                    }
                    else
                    {
                        Response.Redirect("/accounts/regsuccess.aspx");
                    }
                }
            }
            else
            {
                Response.Redirect("/accounts/refill.aspx");
            }
        }
        else
        {
            Response.Redirect("/accounts/refill.aspx");
        }
    }
Ejemplo n.º 7
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        if (txtStorage.Value != "" && txtCity.Value != "" && txtStoragearea.Value != "" && txtFieldarea.Value != "" && txtAddress.Value != "" && txtIntro.Value != "" && txtValue.Value != "")
        {
            string check;
            if (CheckBox1.Checked)
            {
                check = "1";
            }
            else
            {
                check = "0";
            }

            string id = this.Request["id"].ToString();

            check ck = new check();
            string sql = "update TB_Storage set StorageName='" + txtStorage.Value + "',City='" + txtCity.Value + "',TypeName='" + DropDownList1.SelectedItem.Text + "',Storage_area=" + txtStoragearea.Value + ",Field_area=" + txtFieldarea.Value + ",Address='" + txtAddress.Value + "',intro='" + txtIntro.Value + "',inbuiltValue='" + txtValue.Value + "',Company='" + txtCompany.Value + "',linkmen='" + txtlinkmen.Value + "',Phone='" + txtPhone.Value + "',state=" + check + " where id=" + this.Request["id"].ToString();

            data_conn cn = new data_conn();
            cn.mdb_exe(sql);

            //string sql = "insert into TB_Storage (StorageName,City,TypeName,Storage_area,Field_area,Address,intro,inbuiltValue,Company,linkmen,Phone,Postdate) values ";
            //sql += "('" + ck.CheckInput(txtStorage.Value) + "','" + ck.CheckInput(txtCity.Value) + "','" + ck.CheckInput(DropDownList1.SelectedItem.Text) + "'," + ck.CheckInput(txtStoragearea.Value) + "," + ck.CheckInput(txtFieldarea.Value) + ",'" + ck.CheckInput(txtAddress.Value) + "','" + ck.CheckInput(txtIntro.Value) + "','" + ck.CheckInput(value) + "','" + ck.CheckInput(txtCompany.Value) + "','" + ck.CheckInput(txtlinkmen.Value) + "','" + ck.CheckInput(txtPhone.Value) + "',getdate())";
            //string id = mdb_exe_return(sql);

            if (FileUpload1.FileName != "")
            {
                string filepath = Server.MapPath("../../bis/images/") + "/Storage/upload/old/" + id + "_1.jpg";
                FileUpload1.SaveAs(filepath);
                ThumbnailImage thumbnailimage = new ThumbnailImage();
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("../../bis/images/") + "/Storage/upload/" + id + "_1.jpg", 48, 48);
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("../../bis/images/") + "/Storage/upload/" + id + "_big_1.jpg", 210, 150);
            }
            if (FileUpload2.FileName != "")
            {
                string filepath = Server.MapPath("../../bis/images/") + "/Storage/upload/old/" + id + "_2.jpg";
                FileUpload2.SaveAs(filepath);
                ThumbnailImage thumbnailimage = new ThumbnailImage();
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("../../bis/images/") + "/Storage/upload/" + id + "_2.jpg", 48, 48);
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("../../bis/images/") + "/Storage/upload/" + id + "_big_2.jpg", 210, 150);
            }
            if (FileUpload3.FileName != "")
            {
                string filepath = Server.MapPath("../../bis/images/") + "/Storage/upload/old/" + id + "_3.jpg";
                FileUpload3.SaveAs(filepath);
                ThumbnailImage thumbnailimage = new ThumbnailImage();
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("../../bis/images/") + "/Storage/upload/" + id + "_3.jpg", 48, 48);
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("../../bis/images/") + "/Storage/upload/" + id + "_big_3.jpg", 210, 150);
            }
            if (FileUpload4.FileName != "")
            {
                string filepath = Server.MapPath("../../bis/images/") + "/Storage/upload/old/" + id + "_4.jpg";
                FileUpload4.SaveAs(filepath);
                ThumbnailImage thumbnailimage = new ThumbnailImage();
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("../../bis/images/") + "/Storage/upload/" + id + "_4.jpg", 48, 48);
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("../../bis/images/") + "/Storage/upload/" + id + "_big_4.jpg", 210, 150);
            }
            if (FileUpload5.FileName != "")
            {
                string filepath = Server.MapPath("../../bis/images/") + "/Storage/upload/old/" + id + "_5.jpg";
                FileUpload5.SaveAs(filepath);
                ThumbnailImage thumbnailimage = new ThumbnailImage();
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("../../bis/images/") + "/Storage/upload/" + id + "_5.jpg", 48, 48);
                thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("../../bis/images/") + "/Storage/upload/" + id + "_big_5.jpg", 210, 150);
            }

            this.Response.Redirect("Storagelist.aspx");
        }
        else
        {
            MessageBox("", "*必填");
        }
    }