protected void UploadBtn_Click(object sender, EventArgs e)
    {
        if (!(uploadF.Value == null || uploadF.Value.Equals("")))
        {
            string path    = uploadF.PostedFile.FileName;
            string fileExt = path.Substring(path.LastIndexOf('.') + 1);
            if (fileExt.ToLower().Equals("jpg") || fileExt.ToLower().Equals("png") || fileExt.ToLower().Equals("gif"))
            {
                string filePath = Server.MapPath("UpFiles") + "/mer_pic";


                string serverName = DateTime.Now.ToString("yyyyMMddHHmmss") + "." + fileExt;
                uploadF.PostedFile.SaveAs(filePath + "/" + serverName);

                MerInfoMaintDAL func   = new MerInfoMaintDAL();
                McBasicInfo     mc     = new McBasicInfo();
                int             mer_id = int.Parse(Request.QueryString["mer_id"]);
                mc.MerID      = mer_id;
                mc.MerName    = MerInfoMod_Name.Text;
                mc.MerInfo    = MerInfoMod_Introduction.Text;
                mc.MerAddr    = MerInfoMod_Address.Text;
                mc.MerPic     = "UpFiles/mer_pic/" + serverName;
                mc.MerPhone   = MerInfoMod_Telephone.Text;
                mc.MerWebsite = MerInfoMod_Website.Text;
                mc.RegEmail   = MerInfoMod_Email.Text;
                mc.RegName    = MerInfoMod_Relat.Text;

                mc.CityID = int.Parse(MerInfoMod_City.SelectedValue);


                func.UpdateMerchant(mc);
                MerInfoMod_Pic.Src = "UpFiles/mer_pic/" + serverName;
            }
            else
            {
                Response.Write("<script>alert('不被允许的文件格式');</script>");
            }
        }
        else
        {
            Response.Write("<script>alert('没有文件');</script>");
        }
    }
    protected void MerInfoMod_Submit_Click(object sender, EventArgs e)
    {
        MerInfoMaintDAL func   = new MerInfoMaintDAL();
        McBasicInfo     mc     = new McBasicInfo();
        int             mer_id = int.Parse(Request.QueryString["mer_id"]);

        mc.MerID        = mer_id;
        mc.MerName      = MerInfoMod_Name.Text;
        mc.MerInfo      = MerInfoMod_Introduction.Text;
        mc.MerPic       = MerInfoMod_Pic.ImageUrl;
        mc.MerAddr      = MerInfoMod_Address.Text;
        mc.MerPhone     = MerInfoMod_Telephone.Text;
        mc.MerWebsite   = MerInfoMod_Website.Text;
        mc.RegEmail     = MerInfoMod_Email.Text;
        mc.RegName      = MerInfoMod_Relat.Text;
        mc.MerStarLever = int.Parse(MerInfoMod_StarLevel.SelectedValue);
        mc.CityID       = 2;


        func.UpdateMerchant(mc);
        Response.Redirect("MerchantShowInfoProtect.aspx?mer_id=" + mer_id);
    }
    protected void MerInfoMod_Submit_Click(object sender, EventArgs e)
    {
        MerInfoMaintDAL func   = new MerInfoMaintDAL();
        McBasicInfo     mc     = new McBasicInfo();
        int             mer_id = int.Parse(Request.QueryString["mer_id"]);
        McBasicInfo     mc_old = func.GetMerchantInfoByID(mer_id);

        mc.MerID      = mer_id;
        mc.MerName    = MerInfoMod_Name.Text;
        mc.MerInfo    = MerInfoMod_Introduction.Text;
        mc.MerAddr    = MerInfoMod_Address.Text;
        mc.MerPic     = mc_old.MerPic;
        mc.MerPhone   = MerInfoMod_Telephone.Text;
        mc.MerWebsite = MerInfoMod_Website.Text;
        mc.RegEmail   = MerInfoMod_Email.Text;
        mc.RegName    = MerInfoMod_Relat.Text;

        mc.CityID = int.Parse(MerInfoMod_City.SelectedValue);


        func.UpdateMerchant(mc);
        Response.Redirect("MerchantManage/MerShowInfoMaintain.aspx?mer_id=" + mer_id);
    }