/// <summary>
    /// 修改
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void butSava_Click(object sender, EventArgs e)
    {
        SHUniversity.KPI.Model.Users u = new SHUniversity.KPI.Model.Users();
        u.ID        = int.Parse(hidid.Value);
        u.BrithDay  = SHUniversity.KPI.Common.ConvertDatetime(txt_birthday.Text.Trim());
        u.CreatDate = DateTime.Now;
        u.Email     = txt_email.Text.Trim();
        u.InDate    = Common.ConvertDatetime(txt_indate.Text.Trim());
        u.Moblie    = txt_moblie.Text.Trim();
        u.Name      = txt_name.Text.Trim();
        u.Password  = txt_pwd.Text.Trim();
        u.Ramerk    = txt_common.Text.Trim();
        u.Satat     = 1;
        u.Sex       = int.Parse(rb_sex.SelectedValue);
        u.Tel       = txt_tell.Text.Trim();
        u.UserType  = int.Parse(rb_usertype.SelectedValue);
        u.WorkID    = txt_workID.Text.Trim();
        u.Xueli     = txt_xueli.Text.Trim();
        u.Xuexiao   = txt_xuexiao.Text.Trim();
        u.Zhiwu     = txt_zhiwu.Text.Trim();

        bool result = uBll.Update(u);

        if (result)
        {
            Jscript.RedirectToFrames("UserManage.aspx");
        }
        else
        {
            Jscript.Alert("修改异常,请重试");
            Jscript.RedirectToFrames("UserManage.aspx");
        }
    }
Exemple #2
0
    protected void butSava_Click(object sender, EventArgs e)
    {
        FNEWS_TYPE dalNewsType = new FNEWS_TYPE();
        string     id          = Request.QueryString["id"];
        ENEWSType  eNewsType   = dalNewsType.GetDAL().GetModel(Convert.ToInt32(Hid.Value));

        eNewsType.TypeName = txtTypeName.Text.Trim();
        eNewsType.ParentID = Convert.ToInt32(DD_Type.SelectedValue);
        if (isfabu.Checked == true)
        {
            eNewsType.ISFabu = 1;
        }
        else
        {
            eNewsType.ISFabu = 0;
        }
        if (islimit.Checked == true)  //0全访问1会员访问
        {
            eNewsType.ISLimit = 1;
        }
        else
        {
            eNewsType.ISLimit = 0;
        }
        bool count = dalNewsType.GetDAL().Update(eNewsType);

        if (count)
        {
            Jscript.RedirectToFrames("Admin_NewsType.aspx");
        }
        else
        {
            Jscript.Alert("异常错误,请重试!");
        }
    }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         FNEWS_TYPE dalNewsType = new FNEWS_TYPE();
         string     id          = Request.QueryString["id"];
         ENEWSType  eNewsType   = dalNewsType.GetDAL().GetModel(Convert.ToInt32(id));
         if (Request.QueryString["ispub"] == "true")
         {
             if (eNewsType.ISFabu == 0)
             {
                 eNewsType.ISFabu = 1;
             }
             else
             {
                 eNewsType.ISFabu = 0;
             }
             dalNewsType.GetDAL().Update(eNewsType);
             Jscript.RedirectToFrames("Admin_NewsType.aspx");
         }
         else
         {
             txtTypeName.Text = eNewsType.TypeName;
             if (eNewsType.Lang == "cn")
             {
                 LB_language.Text = "简体中文";
             }
             else
             {
                 LB_language.Text = "English";
             }
             BindType(eNewsType.Lang, id);
             DD_Type.SelectedValue = eNewsType.ParentID.ToString();
             if (eNewsType.ISFabu == 1)
             {
                 isfabu.Checked = true;
             }
             else
             {
                 isfabu.Checked = false;
             }
             if (eNewsType.ISLimit == 1)
             {
                 islimit.Checked = true;
             }
             else
             {
                 islimit.Checked = false;
             }
             Hid.Value = id;
         }
     }
 }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id   = Request.QueryString["id"];
        string type = Request.QueryString["type"];

        if (type == "0")//文章类型
        {
            FNEWS_TYPE fnt = new FNEWS_TYPE();
            fnt.GetDAL().Delete(Convert.ToInt32(id));
            Jscript.RedirectToFrames("Admin_NewsType.aspx");
        }
        else //文章
        {
        }
    }
    /// <summary>
    /// 删除所选
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void LB_Del_Click(object sender, EventArgs e)
    {
        string sb = string.Empty;

        for (int i = 0; i < this.RP_con.Items.Count; i++)
        {
            CheckBox cb = (RP_con.Items[i].FindControl("CheckBox1_")) as CheckBox;
            if (cb.Checked == true)
            {
                sb += ((RP_con.Items[i].FindControl("HiddenField_")) as HiddenField).Value + ",";
            }
        }
        bll_fpo.GetDAL().DeleteMuli(sb);
        Jscript.RedirectToFrames("Admin_PRO.aspx");
    }
    /// <summary>
    /// 保存
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void butSava_Click(object sender, EventArgs e)
    {
        EPROType model = new EPROType();

        if (con == "edit")
        {
            model = fpt.GetDAL().GetModel(Convert.ToInt32(id));
        }

        model.TypeName = txtProTypeName.Text.Trim();
        model.ParentID = Convert.ToInt32(DD_Type.SelectedValue);
        if (CB_ispub.Checked == true)
        {
            model.ISPub = "1";
        }
        else
        {
            model.ISPub = "0";
        }
        if (CB_isLimit.Checked == true)    //0全访问1会员访问
        {
            model.ISLimit = "1";
        }
        else
        {
            model.ISLimit = "0";
        }

        bool result;

        if (con == "add")
        {
            result = fpt.GetDAL().Add(model);
        }
        else
        {
            result = fpt.GetDAL().Update(model);
        }

        if (result)
        {
            Jscript.RedirectToFrames("Admin_PROTYPE.aspx");
        }
        else
        {
            Jscript.Alert("异常错误,请重试!");
        }
    }
Exemple #7
0
 /// <summary>
 /// 保存顺序
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void OrderBy_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < this.RP_con.Items.Count; i++)
     {
         FNews  fnews   = new FNews();
         string id      = ((RP_con.Items[i].FindControl("HiddenField_")) as HiddenField).Value;
         string orderby = ((RP_con.Items[i].FindControl("txtOrderBy")) as TextBox).Text;
         if (SITED.COMMON.PageValidate.IsNumber(orderby))
         {
             SITED.NEWS.Model.ENEWS eNews = fnews.GetDAL().GetModel(Convert.ToInt32(id));
             eNews.OrderBy = orderby;
             fnews.GetDAL().Update(eNews);
         }
     }
     Jscript.RedirectToFrames("Admin_News.aspx");
 }
    /// <summary>
    /// 删除所选项
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public void LinkButton1_Click(object sender, EventArgs e)
    {
        FNEWS_TYPE news_type = new FNEWS_TYPE();
        string     sb        = string.Empty;

        for (int i = 0; i < this.RP_con.Items.Count; i++)
        {
            CheckBox cb = (RP_con.Items[i].FindControl("CheckBox1_")) as CheckBox;
            if (cb.Checked == true)
            {
                string id = ((RP_con.Items[i].FindControl("HiddenField_")) as HiddenField).Value;
                sb += id + ",";
            }
        }
        news_type.GetDAL().DeleteMuli(sb);
        Jscript.RedirectToFrames("Admin_NewsType.aspx");
    }
 /// <summary>
 /// 保存顺序
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void OrderBy_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < this.RP_con.Items.Count; i++)
     {
         string id      = ((RP_con.Items[i].FindControl("HiddenField_")) as HiddenField).Value;
         string orderby = ((RP_con.Items[i].FindControl("txtOrderBy")) as TextBox).Text;
         if (SITED.COMMON.PageValidate.IsNumber(orderby))
         {
             EPRO epo = bll_fpo.GetDAL().GetModel(Convert.ToInt32(id));
             epo.OrderBy = Convert.ToInt32(orderby);
             bll_fpo.GetDAL().Update(epo);
         }
         else
         {
             Jscript.Alert("顺序只能为数字!");
         }
     }
     Jscript.RedirectToFrames("Admin_PRO.aspx");
 }
    /// <summary>
    /// 删除所选项
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void LB_DelSelect_Click(object sender, EventArgs e)
    {
        string sb = string.Empty;

        for (int i = 0; i < this.RP_con.Items.Count; i++)
        {
            CheckBox cb = (RP_con.Items[i].FindControl("CheckBox1_")) as CheckBox;
            if (cb.Checked == true)
            {
                string dd = ((RP_con.Items[i].FindControl("HiddenField_")) as HiddenField).Value;
                sb += dd + ",";
            }
        }
        if (ubll.DeleteList(sb))
        {
            Jscript.RedirectToFrames("UserManage.aspx");
        }
        else
        {
            Jscript.Alert("删除失败,请重试!!");
        }
    }
    /// <summary>
    /// 保存
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void butSava_Click(object sender, EventArgs e)
    {
        FNEWS_TYPE news_type = new FNEWS_TYPE();
        ENEWSType  Enewtype  = new ENEWSType();

        Enewtype.TypeName = Request.Form["newstypename"];
        Enewtype.ParentID = Convert.ToInt32(DD_Type.SelectedValue);
        if (Request.Form["isfabu"] == "on")
        {
            Enewtype.ISFabu = 1;
        }
        else
        {
            Enewtype.ISFabu = 0;
        }
        if (Request.Form["islimit"] == "on")    //0全访问1会员访问
        {
            Enewtype.ISLimit = 1;
        }
        else
        {
            Enewtype.ISLimit = 0;
        }
        Enewtype.Lang = language;

        bool result = news_type.GetDAL().Add(Enewtype);

        if (result)
        {
            Jscript.RedirectToFrames("Admin_NewsType.aspx");
        }
        else
        {
            Jscript.Alert("异常错误,请重试!");
        }
    }
Exemple #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SHUniversity.KPI.Model.Users model = new SHUniversity.KPI.Model.Users();

        if (!IsPostBack)
        {
            string con = Request.QueryString["con"];
            string id  = Request.QueryString["id"];
            //发布
            if (con == "pub")
            {
                model = uBll.GetModel(Convert.ToInt32(id));
                if (model.Satat == 1)
                {
                    model.Satat = 0;
                }
                else if (model.Satat == 0)
                {
                    model.Satat = 1;
                }
                uBll.Update(model);
                Jscript.RedirectToFrames("UserManage.aspx");
            }
            //删除
            if (con == "del")
            {
                bool result = uBll.Delete(Convert.ToInt32(id));
                if (result)
                {
                    Jscript.RedirectToFrames("UserManage.aspx");
                }
                else
                {
                    Jscript.Alert("删除异常,请重试");
                    Jscript.RedirectToFrames("UserManage.aspx");
                }
            }
            //修改
            if (con == "edit")
            {
                SHUniversity.KPI.Model.Users u = uBll.GetModel(Convert.ToInt32(id));
                if (model == null)
                {
                    Jscript.Alert("账户不存在,请重试");
                    Jscript.RedirectToFrames("UserManage.aspx");
                }
                else
                {
                    hidid.Value               = id;
                    txt_birthday.Text         = string.Format("{0:yyyy-MM-dd}", u.BrithDay);
                    txt_email.Text            = u.Email;
                    txt_indate.Text           = string.Format("{0:yyyy-MM-dd}", u.InDate);
                    txt_moblie.Text           = u.Moblie;
                    txt_name.Text             = u.Name;
                    txt_pwd.Text              = u.Password;
                    txt_common.Text           = u.Ramerk;
                    rb_sex.SelectedValue      = u.Sex.ToString();
                    txt_tell.Text             = u.Tel;
                    rb_usertype.SelectedValue = u.UserType.ToString();
                    txt_workID.Text           = u.WorkID;
                    txt_xueli.Text            = u.Xueli;
                    txt_xuexiao.Text          = u.Xuexiao;
                    txt_zhiwu.Text            = u.Zhiwu;
                }
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        lang = Request.QueryString["lang"];
        if (lang == null)
        {
            lang = "cn";
        }
        string con = Request.QueryString["con"];

        cid = Request.QueryString["cid"];
        if (lang == "cn")
        {
            LB_lang.Text = "简体中文";
        }
        else if (lang == "en")
        {
            LB_lang.Text = "English";
        }
        if (!IsPostBack)
        {
            txtDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
            //编辑还是增加
            if (con == "add")
            {
                // 绑定newsType
                BindNewsType(lang);
            }
            else if (Request.QueryString["con"] == "edit")
            {
                //编辑
                ENEWS model = new ENEWS();
                model = fn.GetDAL().GetModel(Convert.ToInt32(cid));
                // 绑定newsType
                BindNewsType(model.Language);
                DL_NewsType.SelectedValue = model.News_Type.ToString();     //新闻类型
                txtTitle.Text             = model.Title;                    //标题
                txtAuthor.Text            = model.Author;                   //作者
                txtDate.Text = string.Format("{0:yyyy-MM-dd}", model.Data); //日期
                if (model.ISSEO == 1)                                       //是否seo
                {
                    ISSEO.SelectedValue = "true";                           //
                    txtKeyWord.Text     = model.SEO_KEYWORD;                //自定义seo keyWord
                }
                else
                {
                    ISSEO.SelectedValue = "false";
                }
                txtSummary.Text = model.Summary;    //简介
                txtContent.Text = model.F_Content;  //内容
            }
            else if (Request.QueryString["con"] == "del")
            {
                fn.GetDAL().Delete(Convert.ToInt32(cid));
                Jscript.RedirectToFrames("Admin_News.aspx");
            }
            else if (Request.QueryString["con"] == "ispub")
            {
                ENEWS model = fn.GetDAL().GetModel(Convert.ToInt32(cid));
                if (model.ISPublish == 1)
                {
                    model.ISPublish = 0;
                }
                else
                {
                    model.ISPublish = 1;
                }
                fn.GetDAL().Update(model);
                Jscript.RedirectToFrames("Admin_News.aspx");
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     //操作
     con      = Request.QueryString["con"];
     id       = Request.QueryString["id"];
     language = Request.QueryString["language"];
     if (!IsPostBack)
     {
         EPROType model;
         if (con == "add")    //增加类别
         {
             BindType(language, "");
         }
         else if (con == "edit")
         {
             model    = fpt.GetDAL().GetModel(Convert.ToInt32(id));
             language = model.Language;
             BindType(language, id);
             txtProTypeName.Text   = model.TypeName;
             DD_Type.SelectedValue = model.ParentID.ToString();
             if (model.ISPub == "1")
             {
                 CB_ispub.Checked = true;
             }
             else
             {
                 CB_ispub.Checked = false;
             }
             if (model.ISLimit == "1")
             {
                 CB_isLimit.Checked = true;
             }
             else
             {
                 CB_isLimit.Checked = false;
             }
         }
         else if (con == "del")
         {
             bool result = fpt.GetDAL().Delete(Convert.ToInt32(id));
             if (result)
             {
                 Jscript.RedirectToFrames("Admin_PROTYPE.aspx");
             }
             else
             {
                 Jscript.Alert("删除异常,请重试");
                 Jscript.RedirectToFrames("Admin_PROTYPE.aspx");
             }
         }
         else if (con == "pub")
         {
             model = fpt.GetDAL().GetModel(Convert.ToInt32(id));
             if (model.ISPub == "1")
             {
                 model.ISPub = "0";
             }
             else if (model.ISPub == "0")
             {
                 model.ISPub = "1";
             }
             fpt.GetDAL().Update(model);
             Jscript.RedirectToFrames("Admin_PROTYPE.aspx");
         }
     }
     if (language == "cn")
     {
         LB_language.Text = "简体中文";
     }
     else if (language == "en")
     {
         LB_language.Text = "英语";
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        //操作
        con          = Request.QueryString["con"];
        cid          = Request.QueryString["cid"];
        lang         = Request.QueryString["lang"];
        txtDate.Text = DateTime.Now.ToString();
        if (!IsPostBack)
        {
            if (con == "add")//增加类别
            {
                BindNewsType(lang);
            }
            else if (con == "edit")
            {
                EPRO model = bll.GetDAL().GetModel(Convert.ToInt32(cid));
                lang = model.Language;                                                               //语言
                BindNewsType(lang);                                                                  //获取分类

                txtProName.Text           = model.PName;                                             //产品名称
                txtDate.Text              = string.Format("{0:yyyy-MM-dd HH-mm-ss}", model.PubDate); //发布日期
                DL_prosType.SelectedValue = model.PType.ToString();                                  //产品分类
                if (model.ISRecommend == 1)
                {
                    CB_Recommend.Checked = true;
                }
                else
                {
                    CB_Recommend.Checked = false;
                }
                if (model.ISSEO == 1)
                {
                    ISSEO.SelectedValue = "true";
                    LB_KeyWord.Visible  = true;
                    txtKeyWord.Visible  = true;
                    txtKeyWord.Text     = model.SEO;
                }
                else
                {
                    ISSEO.SelectedValue = "false";
                }
                txtIntro.Text   = model.Intro;   //简介
                txtContent.Text = model.Content; //概述
                txtAgument.Text = model.Agument; //详细参数
                txtCase.Text    = model.Case;    //应用案例
                string[] pics = model.Picture.Split('@');
                if (pics.Length > 0)
                {
                    try
                    {
                        Image1.ImageUrl = "../../upload/images/" + pics[0];
                        txtimg1.Text    = "../../upload/images/" + pics[0];
                        Image2.ImageUrl = "../../upload/images/" + pics[1];
                        txtimg2.Text    = "../../upload/images/" + pics[1];
                        Image3.ImageUrl = "../../upload/images/" + pics[2];
                        txtimg3.Text    = "../../upload/images/" + pics[2];
                        Image4.ImageUrl = "../../upload/images/" + pics[3];
                        txtimg4.Text    = "../../upload/images/" + pics[3];
                    }
                    catch { };
                }
            }
            else if (con == "del")
            {
                bool result = bll.GetDAL().Delete(Convert.ToInt32(cid));
                if (result)
                {
                    Jscript.RedirectToFrames("Admin_PRO.aspx");
                }
                else
                {
                    Jscript.Alert("删除异常,请重试");
                    Jscript.RedirectToFrames("Admin_PRO.aspx");
                }
            }
            else if (con == "ispub")
            {
                EPRO model = bll.GetDAL().GetModel(Convert.ToInt32(cid));
                if (model.ISPub == 1)
                {
                    model.ISPub = 0;
                }
                else if (model.ISPub == 0)
                {
                    model.ISPub = 1;
                }
                bll.GetDAL().Update(model);
                Jscript.RedirectToFrames("Admin_PRO.aspx");
            }
        }
        if (lang == "cn")
        {
            LB_lang.Text = "简体中文";
        }
        else if (lang == "en")
        {
            LB_lang.Text = "英语";
        }
    }
    /// <summary>
    /// 添加文章
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void butSava_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            EPRO     model = new EPRO();
            string[] imgs;
            string   imgss = "";
            if (con == "edit")  //编辑
            {
                model = bll.GetDAL().GetModel(Convert.ToInt32(cid));
                imgs  = model.Picture.Split('@');
                imgss = model.Picture;


                if (upimg1.FileName.Length <= 0 && txtimg1.Text.Length <= 0)
                {
                    if (imgss.Trim().Length > 0)
                    {
                        if (imgss.Substring(imgs[0].Length + 1, 1) == "@")
                        {
                            imgss.Remove(0, imgs[0].Length + 1);
                        }
                        else
                        {
                            imgss.Remove(0, imgs[0].Length);
                        }
                    }
                }
                if (upimg2.FileName.Length <= 0 && txtimg2.Text.Length <= 0)
                {
                    try
                    {
                        if (imgss.Substring(imgs[1].Length + 1, 1) == "@")
                        {
                            imgss.Remove(0, imgs[1].Length + 1);
                        }
                        else
                        {
                            imgss.Remove(0, imgs[1].Length);
                        }
                    }
                    catch { }
                }

                if (upimg3.FileName.Length <= 0 && txtimg3.Text.Length <= 0)
                {
                    try
                    {
                        if (imgss.Substring(imgs[2].Length + 1, 1) == "@")
                        {
                            imgss.Remove(0, imgs[2].Length + 1);
                        }
                        else
                        {
                            imgss.Remove(0, imgs[2].Length);
                        }
                    }
                    catch { }
                }

                if (upimg4.FileName.Length <= 0 && txtimg4.Text.Length <= 0)
                {
                    try
                    {
                        if (imgss.Substring(imgs[3].Length + 1, 1) == "@")
                        {
                            imgss.Remove(0, imgs[3].Length + 1);
                        }
                        else
                        {
                            imgss.Remove(0, imgs[3].Length);
                        }
                    }
                    catch { }
                }
            }

            model.Language = lang;                                       //所属语言
            model.PType    = Convert.ToInt32(DL_prosType.SelectedValue); //所属分类
            model.PName    = txtProName.Text;                            //产品名
            model.PubDate  = Convert.ToDateTime(txtDate.Text);           //发布日期
            if (ISSEO.SelectedValue == "true")                           //是否单独SEO
            {
                model.ISSEO = 1;
            }
            else
            {
                model.ISSEO = 0;
            }
            if (txtKeyWord.Text.Length > 0)
            {
                model.SEO = txtKeyWord.Text;  //Seo
            }
            if (txtIntro.Text.Length > 0)
            {
                model.Intro = txtIntro.Text;     //简介
            }
            if (txtContent.Text.Length > 0)
            {
                model.Content = txtContent.Text;  //产品概述
            }
            if (txtAgument.Text.Length > 0)
            {
                model.Agument = txtAgument.Text; //详细参数
            }
            if (txtCase.Text.Length > 0)
            {
                model.Case = txtCase.Text;    //应用案例
            }
            if (CB_Recommend.Checked == true) //是否推荐产品
            {
                model.ISRecommend = 1;
            }
            else
            {
                model.ISRecommend = 0;
            }
            model.OrderBy = 0;   //顺序
            string imgssrc = "";


            //img1
            if (upimg1.FileName.Length > 0 && txtimg1.Text.Length <= 0)
            {
                string filename = upimg1.FileName;
                string dotname  = filename.Substring(filename.LastIndexOf(".") + 1);
                if (dotname.ToUpper() == "PNG" || dotname.ToUpper() == "JPG" || dotname.ToUpper() == "GIF" || dotname.ToUpper() == "BMP")
                {
                    upimg1.PostedFile.SaveAs(Server.MapPath("~/upload/images/" + upimg1.FileName));
                    imgssrc += upimg1.FileName + "@";
                }
                else
                {
                    Jscript.Alert("图片格式不对");
                    return;
                }
            }
            else if ((upimg1.FileName.Length <= 0 && txtimg1.Text.Length > 0) || (upimg1.FileName.Length > 0 && txtimg1.Text.Length > 0))
            {
                imgssrc += txtimg1.Text.Substring(txtimg1.Text.LastIndexOf("/") + 1) + "@";
            }

            //img2
            if (upimg2.FileName.Length > 0 && txtimg2.Text.Length <= 0)
            {
                string filename = upimg2.FileName;
                string dotname  = filename.Substring(filename.LastIndexOf(".") + 1);
                if (dotname.ToUpper() == "PNG" || dotname.ToUpper() == "JPG" || dotname.ToUpper() == "GIF" || dotname.ToUpper() == "BMP")
                {
                    upimg2.PostedFile.SaveAs(Server.MapPath("~/upload/images/" + upimg2.FileName));
                    imgssrc += upimg2.FileName + "@";
                }
                else
                {
                    Jscript.Alert("图片格式不对");
                    return;
                }
            }
            else if ((upimg2.FileName.Length <= 0 && txtimg2.Text.Length > 0) || (upimg2.FileName.Length > 0 && txtimg2.Text.Length > 0))
            {
                imgssrc += txtimg2.Text.Substring(txtimg2.Text.LastIndexOf("/") + 1) + "@";
            }

            //img3
            if (upimg3.FileName.Length > 0 && txtimg3.Text.Length <= 0)
            {
                string filename = upimg3.FileName;
                string dotname  = filename.Substring(filename.LastIndexOf(".") + 1);
                if (dotname.ToUpper() == "PNG" || dotname.ToUpper() == "JPG" || dotname.ToUpper() == "GIF" || dotname.ToUpper() == "BMP")
                {
                    upimg3.PostedFile.SaveAs(Server.MapPath("~/upload/images/" + upimg3.FileName));
                    imgssrc += upimg3.FileName + "@";
                }
                else
                {
                    Jscript.Alert("图片格式不对");
                    return;
                }
            }
            else if ((upimg3.FileName.Length <= 0 && txtimg3.Text.Length > 0) || (upimg3.FileName.Length > 0 && txtimg3.Text.Length > 0))
            {
                imgssrc += txtimg3.Text.Substring(txtimg3.Text.LastIndexOf("/") + 1) + "@";
            }

            //img4
            if (upimg4.FileName.Length > 0 && txtimg4.Text.Length <= 0)
            {
                string filename = upimg4.FileName;
                string dotname  = filename.Substring(filename.LastIndexOf(".") + 1);
                if (dotname.ToUpper() == "PNG" || dotname.ToUpper() == "JPG" || dotname.ToUpper() == "GIF" || dotname.ToUpper() == "BMP")
                {
                    upimg4.PostedFile.SaveAs(Server.MapPath("~/upload/images/" + upimg4.FileName));
                    imgssrc += upimg4.FileName + "@";
                }
                else
                {
                    Jscript.Alert("图片格式不对");
                    return;
                }
            }
            else if ((upimg4.FileName.Length <= 0 && txtimg4.Text.Length > 0) || (upimg4.FileName.Length > 0 && txtimg4.Text.Length > 0))
            {
                imgssrc += txtimg4.Text.Substring(txtimg4.Text.LastIndexOf("/") + 1) + "@";
            }


            model.Picture = imgssrc.Substring(0, imgssrc.Length - 1);//图片
            if (upomfile.FileName.Length > 0)
            {
                model.Att1 = upomfile.FileName;
                upomfile.PostedFile.SaveAs(Server.MapPath("~/upload/files/" + upomfile.FileName));
            }
            bool result;
            if (con == "add")
            {
                result = bll.GetDAL().Add(model);
            }
            else
            {
                result = bll.GetDAL().Update(model);
            }
            if (result)
            {
                Jscript.RedirectToFrames("Admin_PRO.aspx");
            }
        }
    }