/// <summary>
 /// 显示信息并跳转,msg为空则直接跳转
 /// </summary>
 /// <param name="msg"></param>
 /// <param name="url"></param>
 /// <param name="thisORTop"></param>
 protected void ShowMsgRedirct(string msg, string url, bool thisORTop)
 {
     if (thisORTop)
     {
         JSMsg.ShowWinRedirect(this, msg, url);
     }
     else
     {
         JSMsg.ShowTopRedirect(this, msg, url);
     }
 }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (txtAccount.Text.Trim() == "")
            {
                ShowMsg("请输入登录帐号");
                return;
            }

            if (id == 0)
            {
                if (txtPwd.Text.Trim() == "")
                {
                    ShowMsg("请输入登录密码");
                    return;
                }
            }

            if (txtPwd.Text.Trim() != txtPwdAgain.Text.Trim())
            {
                ShowMsg("两次输入密码不一致");
                return;
            }
            using (BLLAdminUser bll = new BLLAdminUser())
            {
                AdminUser admin = new AdminUser();
                if (id > 0)
                {
                    admin = bll.GetSingle(id);
                }
                admin.ID       = id;
                admin.Account  = txtAccount.Text.Trim();
                admin.TrueName = txtTrueName.Text;
                if (txtPwd.Text.Trim() != "")
                {
                    admin.PassWord = WebCommon.Md5Enctry(txtPwd.Text.Trim());
                }
                else
                {
                    admin.PassWord = admin.PassWord;
                }

                bll.Save(admin);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "wfAdminUser.aspx");
                }
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLNewsDetail bll = new BLLNewsDetail())
            {
                NewsDetail obj = new NewsDetail();
                if (id > 0)
                {
                    obj = bll.GetSingle(id);
                }
                obj.NewsTypeID  = Convert.ToInt32(ddlNewsType.SelectedValue);
                obj.NewsTitle   = txtNewsTitle.Text.ToString();
                obj.NewsContent = txtContent.Value;
                obj.Remarks     = txtRemarks.Text.ToString();
                obj.AddTime     = Convert.ToDateTime(System.DateTime.Now.ToShortDateString());
                if (txtAutoSort.Text.ToString() == "")
                {
                    obj.AutoSort = 0;
                }
                else
                {
                    obj.AutoSort = Convert.ToInt32(txtAutoSort.Text.Trim().ToString());
                }
                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "cpNewsList.aspx");
                }
            }
        }
Exemple #4
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLJobDetail bll = new BLLJobDetail())
            {
                JobDetail obj = new JobDetail();
                if (id > 0)
                {
                    obj = bll.GetSingle(id);
                }
                obj.JobTypeID     = Convert.ToInt32(ddlJobTypeID.SelectedValue);
                obj.JobName       = txtJobName.Text;
                obj.JobNumber     = txtJobNumber.Text;
                obj.JobContent    = txtContent.Value;
                obj.JobTreatment  = txtJobTreatment.Text;
                obj.Candidatesway = txtCandidatesway.Text;
                obj.Remarks       = txtRemarks.Text.ToString();
                obj.JobEndDate    = Convert.ToDateTime(txtJobEndDate.Value);
                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "cpJobList.aspx");
                }
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLMessages bll = new BLLMessages())
            {
                Messages mesg = bll.GetSingle(id);
                mesg.ID          = id;
                mesg.MesContent  = lblMesDetail.Text.Trim().ToString();
                mesg.MesName     = lblMesName.Text.Trim().ToString();
                mesg.MesTelphone = lblMesPhone.Text.Trim().ToString();
                mesg.MesQQ       = lblMesTel.Text.Trim().ToString();
                mesg.MesEmail    = lblMesEmail.Text.Trim().ToString();
                mesg.MesAddress  = lblMesAdd.Text.Trim().ToString();
                mesg.MesCompany  = lblMesReTime.Text.Trim().ToString();
                mesg.MesDate     = Convert.ToDateTime(lblMessageDate.Text.ToString());
                if (txtMesReplayDetail.Text.Trim().ToString() != "")
                {
                    mesg.IsReply = 1;
                }
                mesg.ReplyContent = txtMesReplayDetail.Text.ToString();
                AdminUser admin = Session["admin"] as AdminUser;

                mesg.ReplyName = admin.TrueName.ToString();
                mesg.RePlyDate = System.DateTime.Now;

                try
                {
                    bll.Save(mesg);
                }
                catch (Exception)
                {
                    throw;
                }

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "cpMessageList.aspx");
                }
            }
        }
Exemple #6
0
 protected void Unnamed1_Click(object sender, EventArgs e)
 {
     if (contactor.Value.Trim() == "")
     {
         JSMsg.ShowRegisterMsg(this, "请输入联系人!");
         contactor.Focus();
         return;
     }
     if (phonenumber.Value.Trim() == "")
     {
         JSMsg.ShowRegisterMsg(this, "请输入联系电话!");
         phonenumber.Focus();
         return;
     }
     if (lblAddress.Value.Trim() == "")
     {
         JSMsg.ShowRegisterMsg(this, "请输入联系地址!");
         lblAddress.Focus();
         return;
     }
     using (BLLMessages bll = new BLLMessages())
     {
         Messages obj = new Messages();
         obj.MesAddress  = lblAddress.Value.Trim();
         obj.MesName     = contactor.Value.Trim();;
         obj.MesTelphone = phonenumber.Value.Trim();
         obj.MesDate     = DateTime.Now;
         obj.IsReply     = 0;
         obj.MesEmail    = email.Value.Trim();
         obj.MesContent  = messageContent.Value.Trim();
         bll.Save(obj);
         if (bll.IsFail)
         {
             ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
         }
         else
         {
             JSMsg.ShowWinRedirect(this, "保存成功", "index.aspx");
         }
     }
 }
Exemple #7
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLSuccessStoriesType bll = new BLLSuccessStoriesType())
            {
                SuccessStoriesType obj = new SuccessStoriesType();

                if (id > 0)
                {
                    obj    = bll.GetSingle(id);
                    obj.ID = id;
                }
                obj.SSTypeName = txtSSTypeName.Text.Trim().ToString();
                obj.Remarks    = txtRemarks.Text.ToString();
                obj.AutoSort   = Convert.ToInt32(txtAutoSort.Text);
                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "cpSuccessStoriesTypeList.aspx");
                }
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails())
            {
                CompanyInformationDetails obj = new CompanyInformationDetails();
                if (id > 0)
                {
                    obj = bll.GetSingle(id);
                }
                obj.CompanyInformationTypeID = Convert.ToInt32(ddlCompanyInforType.SelectedValue);
                obj.CompanyInformationDetail = txtContent.Value;
                obj.Remarks = txtRemarks.Text.ToString();
                obj.AddTime = System.DateTime.Now;
                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "CompanyInformationList.aspx");
                }
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLCompanyInformationType bll = new BLLCompanyInformationType())
            {
                CompanyInformationType obj = new CompanyInformationType();

                if (id > 0)
                {
                    obj    = bll.GetSingle(id);
                    obj.ID = id;
                }
                obj.CompanyInformationName = txtCompanyInforTypeName.Text.Trim().ToString();
                obj.Remarks = txtRemarks.Text.ToString();
                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "CompanyInformationTypeList.aspx");
                }
            }
        }
Exemple #10
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLComBanner bll = new BLLComBanner())
            {
                ComBanner obj = new ComBanner();

                if (id > 0)
                {
                    obj    = bll.GetSingle(id);
                    obj.ID = id;
                }
                obj.ComBannerTypeID = Convert.ToInt32(ddlNewsType.SelectedValue);
                obj.BannerTitle     = txtDLName.Text.Trim().ToString();
                obj.BannerLink      = txtLink.Text.Trim().ToString();
                #region   产品图片(前台产品图片来源于此)
                try
                {
                    if (this.UploadImg.HasFile)
                    {
                        string extName = Path.GetExtension(UploadImg.FileName);
                        string virFileFullName;
                        string fileName;

                        WebCommon.GetUploadRandFileName(extName, out virFileFullName, out fileName);
                        UploadImg.SaveAs(StringPlus.MapPath(virFileFullName));

                        if (IsAllowedExtension(StringPlus.MapPath(virFileFullName)))
                        {
                            if (id > 0)
                            {//新增时无需删除
                                if (File.Exists(StringPlus.MapPath(bll.GetSingle(id).BannerPic)))
                                {
                                    File.Delete(StringPlus.MapPath(bll.GetSingle(id).BannerPic));
                                }
                            }
                            obj.BannerPic = virFileFullName;
                        }
                        else
                        {
                            if (File.Exists(StringPlus.MapPath(virFileFullName)))
                            {
                                File.Delete(StringPlus.MapPath(virFileFullName));
                            }
                            ShowMsg("请上传正确的图片(.jpg,.gif,.bmp,.png)");
                            return;
                        }
                    }
                    else
                    {
                        obj.BannerPic = Image1.ImageUrl.ToString();
                    }
                }
                catch (DevNetException ex)
                {
                    ExceptionManager.ShowErrorMsg(this, ex);
                    return;
                }
                #endregion

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "cpBannerSet.aspx");
                }
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLProductType bll = new BLLProductType())
            {
                ProductType obj = new ProductType();

                if (id > 0)
                {
                    obj    = bll.GetSingle(id);
                    obj.ID = id;
                }
                obj.ProductTypeName = txtProductTypeName.Text.Trim().ToString();
                obj.AutoSort        = Convert.ToInt32(txtAutoSort.Text);
                obj.Remarks         = txtRemarks.Text.ToString();
                #region   产品图片(前台产品图片来源于此)
                try
                {
                    if (this.UploadImg.HasFile)
                    {
                        string extName = Path.GetExtension(UploadImg.FileName);
                        string virFileFullName;
                        string fileName;

                        WebCommon.GetUploadRandFileName(extName, out virFileFullName, out fileName);
                        UploadImg.SaveAs(StringPlus.MapPath(virFileFullName));

                        if (IsAllowedExtension(StringPlus.MapPath(virFileFullName)))
                        {
                            if (id > 0)
                            {//新增时无需删除
                                if (File.Exists(StringPlus.MapPath(bll.GetSingle(id).ProductTypePic)))
                                {
                                    File.Delete(StringPlus.MapPath(bll.GetSingle(id).ProductTypePic));
                                }
                            }
                            obj.ProductTypePic = virFileFullName;
                        }
                        else
                        {
                            if (File.Exists(StringPlus.MapPath(virFileFullName)))
                            {
                                File.Delete(StringPlus.MapPath(virFileFullName));
                            }
                            ShowMsg("请上传正确的图片(.jpg,.gif,.bmp,.png)");
                            return;
                        }
                    }
                    else
                    {
                        obj.ProductTypePic = Image1.ImageUrl.ToString();
                    }
                }
                catch (DevNetException ex)
                {
                    ExceptionManager.ShowErrorMsg(this, ex);
                    return;
                }
                #endregion
                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }

                if (rbhave.Checked == true)
                {
                    obj.IsHaveSecondTpye = 1;
                }
                else if (rbno.Checked == true)
                {
                    obj.IsHaveSecondTpye = 2;
                }
                else
                {
                    ShowMsg("请是否有二级目录!");
                    return;
                }

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "cpProductTypeList.aspx");
                }
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLDownLoad bll = new BLLDownLoad())
            {
                DownLoad obj = new DownLoad();

                if (id > 0)
                {
                    obj    = bll.GetSingle(id);
                    obj.ID = id;
                }
                obj.DLName    = txtDLName.Text.Trim().ToString();
                obj.DLAddTime = Convert.ToDateTime(DateTime.Now.ToShortDateString());
                obj.Remarks   = txtRemarks.Text.ToString();
                if (Session["admin"] != null)
                {
                    AdminUser adminuser = GetAdminUser();
                    if (adminuser != null)
                    {
                        obj.DLAddName = adminuser.TrueName.ToString();
                    }
                }

                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }


                #region   产品图片(前台产品图片来源于此)
                try
                {
                    if (this.UploadDLAddress.HasFile)
                    {
                        string extName = Path.GetExtension(UploadDLAddress.FileName);
                        string virFileFullName;
                        string fileName;
                        WebCommon.GetUploadRandFileName(extName, out virFileFullName, out fileName);
                        if (UploadDLAddress.PostedFile.ContentLength < 5000000)//文件小于5M
                        {
                            UploadDLAddress.SaveAs(StringPlus.MapPath(virFileFullName));
                        }
                        else
                        {
                            ShowMsg("文件大小不能超过5M!");
                            return;
                        }
                        if (IsAllowedExtension(StringPlus.MapPath(virFileFullName)))
                        {
                            if (id > 0)
                            {//新增时无需删除
                                if (File.Exists(StringPlus.MapPath(bll.GetSingle(id).DLAddress)))
                                {
                                    File.Delete(StringPlus.MapPath(bll.GetSingle(id).DLAddress));
                                }
                            }
                            obj.DLAddress = virFileFullName;
                        }
                        else
                        {
                            if (File.Exists(StringPlus.MapPath(virFileFullName)))
                            {
                                File.Delete(StringPlus.MapPath(virFileFullName));
                            }
                            ShowMsg("此文件类型不可以上传");
                            return;
                        }
                    }
                    else
                    {
                        obj.DLAddress = lblDLAddress.Text;
                    }
                }
                catch (DevNetException ex)
                {
                    ExceptionManager.ShowErrorMsg(this, ex);
                    return;
                }
                #endregion

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "cpDownLoadList.aspx");
                }
            }
        }
Exemple #13
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            using (BLLProductDetail bll = new BLLProductDetail())
            {
                string        prourlname = "";
                ProductDetail obj        = new ProductDetail();
                if (id > 0)
                {
                    obj    = bll.GetSingle(id);
                    obj.ID = id;
                }
                else
                {
                    obj.IsFlag = 0;
                }
                obj.ProductName = txtProName.Text.ToString();
                //obj.ProductEngName = txtProEngName.Text.ToString();
                obj.ProTypeID = Convert.ToInt32(ddlProType.SelectedValue);
                if (ddlProType.SelectedValue == null || ddlProType.SelectedValue == "0")
                {
                    return;
                }
                if (IsHaveSecondType(Convert.ToInt32(ddlProType.SelectedValue)))
                {
                    obj.ProSecondTypeID = Convert.ToInt32(ddlProSecondType.SelectedValue);
                }
                obj.ProductContent = txtContent.Value;
                obj.AutoSort       = Convert.ToInt32(txtAutoSort.Text.Trim().ToString() == "" ? "0" : txtAutoSort.Text.Trim().ToString());
                obj.Remarks        = txtRemarks.Text.ToString();
                #region   产品图片(前台产品图片来源于此)
                try
                {
                    if (this.UploadImg.HasFile)
                    {
                        string extName = Path.GetExtension(UploadImg.FileName);
                        string virFileFullName;
                        string fileName;

                        WebCommon.GetUploadRandFileName(extName, out virFileFullName, out fileName);
                        #region Add Begin
                        int    ind       = fileName.IndexOf(".");
                        string ofileName = fileName.Substring(0, ind);
                        prourlname = extName;
                        #endregion
                        UploadImg.SaveAs(StringPlus.MapPath(virFileFullName));
                        #region Add Begin
                        HttpFileCollection files = Request.Files;
                        string             path  = Server.MapPath("../../Upload");
                        HttpPostedFile     file  = files[0];
                        if (file != null && file.ContentLength > 0)
                        {
                            if (rbthasPhone.Checked == true)
                            {
                                //string filename = this.UpLoadImage(file, path + "/", Convert.ToInt32(ConfigHelper.GetAppString("CompressionWidth").Trim()), Convert.ToInt32(ConfigHelper.GetAppString("CompressionHeight").Trim()), ofileName);
                                string filename = this.UpLoadImage(file, path + "/", Convert.ToInt32(imgWidth.Text.ToString()), Convert.ToInt32(imgHeight.Text.ToString()), ofileName);
                            }
                        }
                        #endregion
                        if (IsAllowedExtension(StringPlus.MapPath(virFileFullName)))
                        {
                            if (id > 0)
                            {//新增时无需删除
                                string filename = bll.GetSingle(id).ProductPic;
                                if (File.Exists(StringPlus.MapPath(bll.GetSingle(id).ProductPic)))
                                {
                                    File.Delete(StringPlus.MapPath(bll.GetSingle(id).ProductPic));
                                }
                                if (File.Exists(StringPlus.MapPath(bll.GetSingle(id).ProductPic)))
                                {
                                    File.Delete(StringPlus.MapPath(bll.GetSingle(id).ProductPic));
                                }
                            }
                            obj.ProductPic = virFileFullName;
                        }
                        else
                        {
                            if (File.Exists(StringPlus.MapPath(virFileFullName)))
                            {
                                File.Delete(StringPlus.MapPath(virFileFullName));
                            }
                            ShowMsg("请上传正确的图片(.jpg,.gif,.bmp,.png)");
                            return;
                        }
                    }
                    else
                    {
                        obj.ProductPic = Image1.ImageUrl.ToString();
                    }
                }
                catch (DevNetException ex)
                {
                    ExceptionManager.ShowErrorMsg(this, ex);
                    return;
                }
                #endregion
                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }
                bll.Save(obj);
                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "cpProductList.aspx");
                }
            }
        }
Exemple #14
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string prourlname = "";

            using (BLLSuccessStories bll = new BLLSuccessStories())
            {
                SuccessStories obj = new SuccessStories();
                if (id > 0)
                {
                    obj = bll.GetSingle(id);
                }
                obj.SSType    = Convert.ToInt32(ddlSuccessStoriesType.SelectedValue);
                obj.SSName    = txtNewsTitle.Text.ToString();
                obj.SSContent = txtContent.Value;
                obj.Remarks   = txtRemarks.Text.ToString();
                obj.AutoSort  = Convert.ToInt32(txtAutoSort.Text.Trim().ToString() == "" ? "0" : txtAutoSort.Text.Trim().ToString());
                obj.AddTime   = Convert.ToDateTime(System.DateTime.Now.ToShortDateString());
                try
                {
                    if (this.UploadImg.HasFile)
                    {
                        string extName = Path.GetExtension(UploadImg.FileName);
                        string virFileFullName;
                        string fileName;
                        WebCommon.GetUploadRandFileName(extName, out virFileFullName, out fileName);
                        UploadImg.SaveAs(StringPlus.MapPath(virFileFullName));
                        int    ind       = fileName.IndexOf(".");
                        string ofileName = fileName.Substring(0, ind);
                        prourlname = extName;
                        UploadImg.SaveAs(StringPlus.MapPath(virFileFullName));
                        HttpFileCollection files = Request.Files;
                        string             path  = Server.MapPath("../../Upload");
                        HttpPostedFile     file  = files[0];
                        if (file != null && file.ContentLength > 0)
                        {
                            if (rbthasPhone.Checked == true)
                            {
                                //string filename = this.UpLoadImage(file, path + "/", Convert.ToInt32(ConfigHelper.GetAppString("CompressionWidth").Trim()), Convert.ToInt32(ConfigHelper.GetAppString("CompressionHeight").Trim()), ofileName);
                                string filename = this.UpLoadImage(file, path + "/", Convert.ToInt32(imgWidth.Text.ToString()), Convert.ToInt32(imgHeight.Text.ToString()), ofileName);
                            }
                        }
                        if (IsAllowedExtension(StringPlus.MapPath(virFileFullName)))
                        {
                            if (id > 0)
                            {//新增时无需删除
                                if (File.Exists(StringPlus.MapPath(bll.GetSingle(id).SSPic)))
                                {
                                    File.Delete(StringPlus.MapPath(bll.GetSingle(id).SSPic));
                                }
                            }
                            obj.SSPic = virFileFullName;
                        }
                        else
                        {
                            if (File.Exists(StringPlus.MapPath(virFileFullName)))
                            {
                                File.Delete(StringPlus.MapPath(virFileFullName));
                            }
                            ShowMsg("请上传正确的图片(.jpg,.gif,.bmp,.png)");
                            return;
                        }
                    }
                    else
                    {
                        obj.SSPic = Image1.ImageUrl.ToString();
                    }
                }
                catch (DevNetException ex)
                {
                    ExceptionManager.ShowErrorMsg(this, ex);
                    return;
                }
                if (rbtnIsChinese.Checked == true)
                {
                    obj.IsEnglish = 1;
                }
                else if (rbtnIsEnglish.Checked == true)
                {
                    obj.IsEnglish = 2;
                }
                else
                {
                    ShowMsg("请选择语言类别!");
                    return;
                }

                bll.Save(obj);

                if (bll.IsFail)
                {
                    ExceptionManager.ShowErrorMsg(this, bll.DevNetException);
                }
                else
                {
                    JSMsg.ShowWinRedirect(this, "保存成功", "cpSuccessStoriesList.aspx");
                }
            }
        }