Exemple #1
0
 protected void BtnUpdate_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     try
     {
         if (ValiEdit())
         {
             DBLL.clsFAQs       FAQ    = new DBLL.clsFAQs();
             DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
             bool _Result = FAQ.update_tb_FAQsBynFAQID(int.Parse(hfFAQUpdateID.Value), txtsQuestionCN.Text, txtsQuestionEN.Text, txtsAnswerCN.Text, txtsAnswerEN.Text, Session["user"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
             if (_Result == true)
             {
                 ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
                 ShowMsg1.Show();
                 MultiView1.ActiveViewIndex = 0;
                 ReBindPageList();
             }
             else
             {
                 //失败就一条
                 ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
                 ShowMsg1.Show();
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #2
0
    protected void BtnUpdate_Click(object sender, EventArgs e)
    {
        //判断session
        if (Session["User"] == null || Session["User"].ToString().Length < 1)
        {
            Response.Redirect(Request.RawUrl);
        }
        try
        {
            if (ValiEdit())
            {
                DBLL.clsProductCategory ProductCategory = new DBLL.clsProductCategory();
                DBLL.OptionSysDBLL      option          = new DBLL.OptionSysDBLL();
                bool _Result = ProductCategory.update_tb_ProductCategoryBynProductCategoryID(int.Parse(hfProductCategoryUpdateID.Value), ddlProductCateTreelist1.nSelectProductCategoryID, txtsProductCategoryNameCN.Text, txtsProductCategoryNameEN.Text, CKEditorControl1.Text, CKEditorControl2.Text, Session["User"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));

                if (_Result == true)
                {
                    ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
                    ShowMsg1.Show();
                    MultiView1.ActiveViewIndex = 0;
                    ReBindPageList();
                }
                else
                {
                    ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
                    ShowMsg1.Show();
                }
            }
        }
        catch (Exception)
        {
            throw;
        }
    }
Exemple #3
0
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     if (ValiAdd())
     {
         DBLL.clsProductCategory ProductCategory = new DBLL.clsProductCategory();
         DBLL.OptionSysDBLL      option          = new DBLL.OptionSysDBLL();
         int _Result = ProductCategory.insert_tb_ProductCategory(ddlProductCateTreelist1.nSelectProductCategoryID, txtsProductCategoryNameCN.Text, txtsProductCategoryNameEN.Text, CKEditorControl1.Text, CKEditorControl2.Text, Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
         if (_Result > 0)
         {
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
             ShowMsg1.Show();
             Clear();
         }
         else
         {
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
             ShowMsg1.Show();
         }
     }
     else
     {
         ShowMsg1.Show();
     }
 }
Exemple #4
0
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     if (ValiAdd())
     {
         DBLL.clsFAQs       FAQ    = new DBLL.clsFAQs();
         DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
         int _Result = FAQ.insert_tb_FAQs(txtsQuestionCN.Text, txtsQuestionEN.Text, txtsAnswerCN.Text, txtsAnswerEN.Text, Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
         if (_Result > 0)
         {
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
             ShowMsg1.Show();
             Clear();
         }
         else
         {
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
             ShowMsg1.Show();
         }
     }
     else
     {
         ShowMsg1.Show();
     }
 }
Exemple #5
0
 protected void BtnUpdate_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     try
     {
         //if (ValiEdit())
         //{
         DBLL.clsContact    Contact = new DBLL.clsContact();
         DBLL.OptionSysDBLL option  = new DBLL.OptionSysDBLL();
         bool _Result = Contact.update_tb_ContactBynContactID(int.Parse(hfContactListUpdateID.Value), txtsTitle.Text, txtsName.Text, txtsCompanyName.Text, txtsAddress.Text, txtsEmail.Text, txtsFax.Text, txtsPhone.Text, txtsContents.Text, Session["user"].ToString(), DateTime.Now, true, 0, true);
         if (_Result == true)
         {
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
             ShowMsg1.Show();
             MultiView1.ActiveViewIndex = 0;
             ReBindPageList();
         }
         else
         {
             //失败就一条
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
             ShowMsg1.Show();
         }
         //}
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #6
0
 protected void BtnUpdate_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     try
     {
         //if (ValiEdit())
         //{
         DBLL.clsInquiry    Inquiry = new DBLL.clsInquiry();
         DBLL.OptionSysDBLL option  = new DBLL.OptionSysDBLL();
         bool _Result = Inquiry.update_tb_InquiryBynInquiryIDAndbCheck(int.Parse(hfInquiryUpdateID.Value), true);
         if (_Result == true)
         {
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
             ShowMsg1.Show();
             MultiView1.ActiveViewIndex = 0;
             ReBindPageList();
         }
         else
         {
             //失败就一条
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
             ShowMsg1.Show();
         }
         //}
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #7
0
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     if (ValiAdd())
     {
         DBLL.clsUser       user   = new DBLL.clsUser();
         DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
         int _Result = user.insert_tb_User(txtsUsername.Text, txtsPassword2.Text, txtsRealName.Text, int.Parse(rblnUserSex.SelectedValue), txtsUserQQ.Text, txtsUserMSN.Text, txtsUserPhone.Text, txtsUserEmail.Text, int.Parse(rblnUserType.SelectedValue), Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, 1, cbIsContact.Checked, cbIsInquiry.Checked);
         if (_Result > 0)
         {
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
             ShowMsg1.Show();
             Clear();
         }
         else
         {
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
             ShowMsg1.Show();
         }
     }
     else
     {
         ShowMsg1.Show();
     }
 }
Exemple #8
0
 protected void BtnUpdate_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     try
     {
         if (ValiEdit())
         {
             DBLL.clsNews       News   = new DBLL.clsNews();
             DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
             bool _Result = false;
             MutileUploaderUserControl3.sNewName = txtsTitle.Text;
             MutileUploaderUserControl3.SavePath();
             if (MutileUploaderUserControl3.filepathlist.Count > 0)
             {
                 for (int i = 0; i < MutileUploaderUserControl3.filepathlist.Count; i++)
                 {
                     _Result = News.update_tb_NewsBynNewsID(int.Parse(hfNewsUpdateID.Value), int.Parse(ddlnTCategoryID.SelectedValue), int.Parse(rblnLangType.SelectedValue), txtsTitle.Text, txtsAuthor.Text, MutileUploaderUserControl3.filepathlist[i].ToString(), CKEditorControl1.Text, Session["user"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
                 }
             }
             else
             {
                 if (Image3.ImageUrl != "")
                 {
                     _Result = News.update_tb_NewsBynNewsID(int.Parse(hfNewsUpdateID.Value), int.Parse(ddlnTCategoryID.SelectedValue), int.Parse(rblnLangType.SelectedValue), txtsTitle.Text, txtsAuthor.Text, Image3.ImageUrl.ToString(), CKEditorControl1.Text, Session["user"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
                 }
                 else
                 {
                     _Result = News.update_tb_NewsBynNewsID(int.Parse(hfNewsUpdateID.Value), int.Parse(ddlnTCategoryID.SelectedValue), int.Parse(rblnLangType.SelectedValue), txtsTitle.Text, txtsAuthor.Text, "", CKEditorControl1.Text, Session["user"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
                 }
             }
             if (_Result == true)
             {
                 ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
                 ShowMsg1.Show();
                 MultiView1.ActiveViewIndex = 0;
                 ReBindPageList();
             }
             else
             {
                 //失败就一条
                 ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
                 ShowMsg1.Show();
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
    protected void BtnUpdate_Click(object sender, EventArgs e)
    {
        //判断session
        if (Session["User"] == null || Session["User"].ToString().Length < 1)
        {
            Response.Redirect(Request.RawUrl);
        }
        try
        {
            if (ValiEdit())
            {
                DBLL.clsLink       Link   = new DBLL.clsLink();
                DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();

                string sThumbPath = "";
                if (int.Parse(ddlnType.SelectedValue) == 1)
                {
                    sThumbPath = "~/style/images/thumb/Msn.png";
                }
                else if (int.Parse(ddlnType.SelectedValue) == 2)
                {
                    sThumbPath = "~/style/images/thumb/Email.png";
                }
                else if (int.Parse(ddlnType.SelectedValue) == 3)
                {
                    sThumbPath = "~/style/images/thumb/Skype.png";
                }
                else if (int.Parse(ddlnType.SelectedValue) == 4)
                {
                    sThumbPath = "~/style/images/thumb/QQ.png";
                }

                bool _Result = Link.update_tb_LinkBynLinkID(int.Parse(hfLinkUpdateID.Value), ddlnType.Text, sThumbPath, txtsLink.Text, Session["user"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
                if (_Result == true)
                {
                    ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
                    ShowMsg1.Show();
                    MultiView1.ActiveViewIndex = 0;
                    ReBindPageList();
                }
                else
                {
                    //失败就一条
                    ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
                    ShowMsg1.Show();
                }
            }
        }
        catch (Exception)
        {
            throw;
        }
    }
Exemple #10
0
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        //判断session
        if (Session["User"] == null || Session["User"].ToString().Length < 1)
        {
            Response.Redirect(Request.RawUrl);
        }
        try
        {
            int nID = 0;
            if (int.TryParse(hfID.Value.ToString(), out nID) && nID > 0)
            {
                //更新
                if (ValiAdd())
                {
                    DBLL.clsPartners   clPartners = new DBLL.clsPartners();
                    DBLL.OptionSysDBLL option     = new DBLL.OptionSysDBLL();
                    bool _Result = false;
                    MutileUploaderUserControlPartners.sNewName = txtsImageNameCN.Text;
                    MutileUploaderUserControlPartners.SavePath();
                    if (MutileUploaderUserControlPartners.filepathlist.Count > 0)
                    {
                        for (int i = 0; i < MutileUploaderUserControlPartners.filepathlist.Count; i++)
                        {
                            _Result = clPartners.update_tb_PartnersBynPartnersID(nID, txtsImageNameCN.Text, "", "", txtsImageNameEN.Text, MutileUploaderUserControlPartners.filepathlist[i].ToString(), Session["user"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text));
                        }
                    }

                    if (_Result == true)
                    {
                        ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
                        ShowMsg1.Show();
                    }
                    else
                    {
                        //失败就一条
                        ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
                        ShowMsg1.Show();
                    }
                }
                else
                {
                    ShowMsg1.Show();
                }
            }
        }
        catch (Exception)
        {
            throw;
        }
    }
Exemple #11
0
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         //判断session
         if (Session["User"] == null || Session["User"].ToString().Length < 1)
         {
             Response.Redirect(Request.RawUrl);
         }
         if (ValiAdd())
         {
             DBLL.clsPartners   clPartners = new DBLL.clsPartners();
             DBLL.OptionSysDBLL option     = new DBLL.OptionSysDBLL();
             int _Result = 0;
             MutileUploaderUserControlPartners.sNewName = txtsImageNameCN.Text;
             MutileUploaderUserControlPartners.SavePath();
             if (MutileUploaderUserControlPartners.filepathlist.Count > 0)
             {
                 for (int i = 0; i < MutileUploaderUserControlPartners.filepathlist.Count; i++)
                 {
                     _Result = clPartners.insert_tb_Partners(txtsImageNameCN.Text, "", "", txtsImageNameEN.Text, MutileUploaderUserControlPartners.filepathlist[i].ToString(), Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text));
                 }
             }
             else
             {
                 _Result = clPartners.insert_tb_Partners(txtsImageNameCN.Text, "", "", txtsImageNameEN.Text, "", Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text));
             }
             if (_Result > 0)
             {
                 ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
                 ShowMsg1.Show();
                 Clear();
             }
             else
             {
                 ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
                 ShowMsg1.Show();
             }
         }
         else
         {
             ShowMsg1.Show();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #12
0
    protected void BtnAdd_Click(object sender, EventArgs e)
    {
        //判断session
        if (Session["User"] == null || Session["User"].ToString().Length < 1)
        {
            Response.Redirect(Request.RawUrl);
        }
        if (ValiAdd())
        {
            DBLL.clsLink       Link       = new DBLL.clsLink();
            DBLL.OptionSysDBLL option     = new DBLL.OptionSysDBLL();
            string             sThumbPath = "";
            if (int.Parse(ddlnType.SelectedValue) == 1)
            {
                sThumbPath = "~/style/images/thumb/Msn.png";
            }
            else if (int.Parse(ddlnType.SelectedValue) == 2)
            {
                sThumbPath = "~/style/images/thumb/Email.png";
            }
            else if (int.Parse(ddlnType.SelectedValue) == 3)
            {
                sThumbPath = "~/style/images/thumb/Skype.png";
            }
            else if (int.Parse(ddlnType.SelectedValue) == 4)
            {
                sThumbPath = "~/style/images/thumb/QQ.png";
            }

            int _Result = Link.insert_tb_Link(ddlnType.Text, sThumbPath, txtsLink.Text, Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
            if (_Result > 0)
            {
                ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
                ShowMsg1.Show();
                Clear();
            }
            else
            {
                ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
                ShowMsg1.Show();
            }
        }
        else
        {
            ShowMsg1.Show();
        }
    }
Exemple #13
0
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     if (ValiAdd())
     {
         DBLL.clsNews       News   = new DBLL.clsNews();
         DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
         int _Result = 0;
         MutileUploaderUserControl3.sNewName = txtsTitle.Text;
         MutileUploaderUserControl3.SavePath();
         if (MutileUploaderUserControl3.filepathlist.Count > 0)
         {
             for (int i = 0; i < MutileUploaderUserControl3.filepathlist.Count; i++)
             {
                 _Result = News.insert_tb_News(int.Parse(ddlnTCategoryID.SelectedValue), int.Parse(rblnLangType.SelectedValue), txtsTitle.Text, txtsAuthor.Text, MutileUploaderUserControl3.filepathlist[i].ToString(), CKEditorControl1.Text, Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
             }
         }
         else
         {
             _Result = News.insert_tb_News(int.Parse(ddlnTCategoryID.SelectedValue), int.Parse(rblnLangType.SelectedValue), txtsTitle.Text, txtsAuthor.Text, "", CKEditorControl1.Text, Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
         }
         if (_Result > 0)
         {
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
             ShowMsg1.Show();
             Clear();
         }
         else
         {
             ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
             ShowMsg1.Show();
         }
     }
     else
     {
         ShowMsg1.Show();
     }
 }
Exemple #14
0
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         //判断session
         if (Session["User"] == null || Session["User"].ToString().Length < 1)
         {
             Response.Redirect(Request.RawUrl);
         }
         DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
         option.UpdateOptionValue("cn", "SystemSetting", "Culture", CKEditorControl1.Text);
         option.UpdateOptionValue("en", "SystemSetting", "Culture", CKEditorControl2.Text);
         ShowMsg1.InnerContent = "更新成功!";
         ShowMsg1.Show();
     }
     catch (Exception)
     {
         throw;
     }
 }
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     try
     {
         int nID = 0;
         if (int.TryParse(hfID.Value.ToString(), out nID) && nID > 0)
         {
             //更新
             if (ValiEdit())
             {
                 DBLL.clsProductCategory ProductCategory = new DBLL.clsProductCategory();
                 DBLL.OptionSysDBLL      option          = new DBLL.OptionSysDBLL();
                 bool _Result = ProductCategory.update_tb_ProductCategoryBynProductCategoryID(nID, 0, txtsProductCategoryNameCN.Text, txtsProductCategoryNameEN.Text, "", "", Session["user"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text));
                 if (_Result == true)
                 {
                     ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
                     ShowMsg1.Show();
                 }
                 else
                 {
                     //失败就一条
                     ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
                     ShowMsg1.Show();
                 }
             }
             else
             {
                 ShowMsg1.Show();
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     try
     {
         int nID = 0;
         if (int.TryParse(hfID.Value.ToString(), out nID) && nID > 0)
         {
             //更新
             if (ValiEdit())
             {
                 DBLL.clsUser       user   = new DBLL.clsUser();
                 DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
                 bool _Result = user.update_tb_UserBynUserID(nID, txtsUsername.Text, txtsPassword0.Text, txtsRealName.Text, int.Parse(RadioButtonList1.SelectedValue), txtsUserQQ.Text, txtsUserMSN.Text, txtsUserPhone.Text, txtsUserEmail.Text, int.Parse(RadioButtonList2.SelectedValue), Session["user"].ToString(), DateTime.Now, true, 1, true, true);
                 if (_Result == true)
                 {
                     ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
                     ShowMsg1.Show();
                 }
                 else
                 {
                     //失败就一条
                     ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
                     ShowMsg1.Show();
                 }
             }
             else
             {
                 ShowMsg1.Show();
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     try
     {
         int nID = 0;
         if (int.TryParse(hfID.Value.ToString(), out nID) && nID > 0)
         {
             //更新
             if (ValiAdd())
             {
                 DBLL.clsJob        clJob  = new DBLL.clsJob();
                 DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
                 bool _Result = clJob.update_tb_JobBynJobID(nID, txtsJobPosition.Text, txtsJobAdr.Text, txtsJobYear.Text, txtsJobSalary.Text, txtsJobEducation.Text, txtnJobCount.Text, DateTime.Now, CKEditorControl1.Text, Session["user"].ToString(), DateTime.Now, true, 1, txtsJobPositionEN.Text, txtsJobAdrEN.Text, txtsJobYearEN.Text, txtsJobSalaryEN.Text, txtsJobEducationEN.Text, txtnJobCountEN.Text, CKEditorControl2.Text);
                 if (_Result == true)
                 {
                     ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
                     ShowMsg1.Show();
                 }
                 else
                 {
                     //失败就一条
                     ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
                     ShowMsg1.Show();
                 }
             }
             else
             {
                 ShowMsg1.Show();
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #18
0
 protected void BtnUpdate_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     try
     {
         if (ValiEdit())
         {
             DBLL.clsUser       user   = new DBLL.clsUser();
             DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
             bool _Result = user.update_tb_UserBynUserID(int.Parse(hfUserUpdateID.Value), txtsUsername.Text, txtsPassword2.Text, txtsRealName.Text, int.Parse(rblnUserSex.SelectedValue), txtsUserQQ.Text, txtsUserMSN.Text, txtsUserPhone.Text, txtsUserEmail.Text, int.Parse(rblnUserType.SelectedValue), Session["user"].ToString(), DateTime.Now, true, 1, cbIsContact.Checked, cbIsInquiry.Checked);
             if (_Result == true)
             {
                 ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
                 ShowMsg1.Show();
                 MultiView1.ActiveViewIndex = 0;
                 ReBindPageList();
             }
             else
             {
                 //失败就一条
                 ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
                 ShowMsg1.Show();
             }
         }
         else
         {
             ShowMsg1.Show();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
    protected void lvTopicCategoryList_ItemDeleting(object sender, ListViewDeleteEventArgs e)
    {
        DBLL.DBcommon dbcom  = new DBLL.DBcommon();
        Label         lblnID = (Label)lvTopicCategoryList.Items[e.ItemIndex].FindControl("lblnTCategoryID");
        int           _nID   = 0;

        if (int.TryParse(lblnID.Text.Trim(), out _nID) && _nID > 0)
        {
            hfTopicCategoryUpdateID.Value = _nID.ToString();
        }
        if (hfTopicCategoryUpdateID.Value == "18" || hfTopicCategoryUpdateID.Value == "19" || hfTopicCategoryUpdateID.Value == "20")
        {
            ShowMsg1.InnerContent = "此栏目不能删除!";
            ShowMsg1.Show();
            ReBindPageList();
        }
        else
        {
            dbcom.sp_DeleteNormalTableByID(int.Parse(hfTopicCategoryUpdateID.Value), "tb_TopicCategory");
            TopicCategoryList.Rows.RemoveAt(e.ItemIndex);
            ReBindPageList();
        }
    }
Exemple #20
0
 protected void btnLogin_Click(object sender, EventArgs e)
 {
     try
     {
         DBLL.clsUser user = new DBLL.clsUser();
         DataTable    dt   = user.Select_tb_UserBysUsernameandsPassword(txtUsername.Text, txtPassword.Text);
         if (dt != null && dt.Rows.Count > 0)
         {
             Session["UserID"] = dt.Rows[0]["nUserID"].ToString();
             Session["User"]   = dt.Rows[0]["sUsername"].ToString();
             Response.Redirect("Default.aspx");
         }
         else
         {
             ShowMsg1.InnerContent = "<p>用户名或密码错误!</p>";
             ShowMsg1.Show();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #21
0
    protected void BtnAdd_Click(object sender, EventArgs e)
    {
        //判断session
        if (Session["User"] == null || Session["User"].ToString().Length < 1)
        {
            Response.Redirect(Request.RawUrl);
        }
        if (ValiAdd())
        {
            MutileUploaderUserControl21.SavePath(ddlnTCategoryID.SelectedItem.Text);

            for (int i = 0; i < MutileUploaderUserControl21.ImageDT.Rows.Count; i++)
            {
                Response.Write(MutileUploaderUserControl21.ImageDT.Rows[i]["sFilename"].ToString());
                DBLL.clsAlbum      Album  = new DBLL.clsAlbum();
                DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
                int _Result = 0;
                _Result = Album.insert_tb_Album(int.Parse(ddlnTCategoryID.SelectedValue), MutileUploaderUserControl21.ImageDT.Rows[i]["sImageNameCN"].ToString(), MutileUploaderUserControl21.ImageDT.Rows[i]["sImageNameEN"].ToString(), MutileUploaderUserControl21.filepathlist[i].ToString(), Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));

                if (_Result > 0)
                {
                    ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
                    ShowMsg1.Show();
                }
                else
                {
                    ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
                    ShowMsg1.Show();
                }
            }
            Response.Redirect("~/manage/Album/AddAlbum.aspx");
        }
        else
        {
            ShowMsg1.Show();
        }
    }
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         //判断session
         if (Session["User"] == null || Session["User"].ToString().Length < 1)
         {
             Response.Redirect(Request.RawUrl);
         }
         if (ValiAdd())
         {
             DBLL.clsJob        clJob  = new DBLL.clsJob();
             DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
             int _Result = clJob.insert_tb_Job(txtsJobPosition.Text, txtsJobAdr.Text, txtsJobYear.Text, txtsJobSalary.Text, txtsJobEducation.Text, txtnJobCount.Text, DateTime.Now, CKEditorControl1.Text, Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, 1, txtsJobPositionEN.Text, txtsJobAdrEN.Text, txtsJobYearEN.Text, txtsJobSalaryEN.Text, txtsJobEducationEN.Text, txtnJobCountEN.Text, CKEditorControl2.Text);
             if (_Result > 0)
             {
                 ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
                 ShowMsg1.Show();
                 Clear();
             }
             else
             {
                 ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
                 ShowMsg1.Show();
             }
         }
         else
         {
             ShowMsg1.Show();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
    protected void BtnUpdate_Click(object sender, EventArgs e)
    {
        //判断session
        if (Session["User"] == null || Session["User"].ToString().Length < 1) Response.Redirect(Request.RawUrl);
        try
        {
            if (ValiEdit())
            {
                DBLL.clsProduct Product = new DBLL.clsProduct();
                DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();


                string sSavepath = "";
                //生成缩略图 
                HttpFileCollection postedFiles = Request.Files;
                if (postedFiles.Count > 0)
                {
                    if (postedFiles[0].ContentLength > 0)
                    {
                        System.Drawing.Image image, newimage; //定义image类的对象
                        string imagePath;   //图片路径
                        string imageType;   //图片类型
                        string imageName;   //图片名称
                        //提供一个回调方法,用于确定Image对象在执行生成缩略图操作时何时提前取消执行
                        //如果此方法确定 GetThumbnailImage 方法应提前停止执行,则返回 true;否则返回 false
                        System.Drawing.Image.GetThumbnailImageAbort callb = null;


                        string basepath = "~/ProductsUpload" + "/temp/" + DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() +
                            DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() +
                            DateTime.Now.Second.ToString() + "/";

                        string sSaveFolderFullPath = Server.MapPath(basepath);

                        if (!System.IO.Directory.Exists(sSaveFolderFullPath))
                        {
                            Directory.CreateDirectory(sSaveFolderFullPath);
                        }


                        string thbasepath = "~/ProductsUpload" + "/thumb/" + DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() +
                            DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() +
                            DateTime.Now.Second.ToString() + "/";

                        string thsSaveFolderFullPath = Server.MapPath(thbasepath);

                        if (!System.IO.Directory.Exists(thsSaveFolderFullPath))
                        {
                            Directory.CreateDirectory(thsSaveFolderFullPath);
                        }


                        imagePath = postedFiles[0].FileName;
                        //取得图片类型
                        imageType = imagePath.Substring(imagePath.LastIndexOf(".") + 1);
                        //取得图片名称
                        imageName = imagePath.Substring(imagePath.LastIndexOf("\\") + 1);
                        Stream imgStream = postedFiles[0].InputStream;//流文件,准备读取上载文件的内容
                        int imgLen = postedFiles[0].ContentLength;    //上载文件大小
                        //string imgName = txtImageName.Text;                   //图片名称


                        //string imgnm = txtImageName.Text;
                        byte[] imgBinaryData = new byte[imgLen];//


                        int n = imgStream.Read(imgBinaryData, 0, imgLen);



                        //保存到虚拟路径
                        postedFiles[0].SaveAs(sSaveFolderFullPath + "\\" + imageName);
                        ////显示原图
                        //imageSource.ImageUrl = "upFile/" + imageName;
                        //为上传的图片建立引用
                        image = System.Drawing.Image.FromFile(sSaveFolderFullPath + "\\" + imageName);

                        //int smallW = 100;//小图片宽
                        //int smallH = smallW * image.Height / image.Width;//小图片高

                        int smallH = 100;
                        int smallW = smallH * image.Width / image.Height;
                        //生成缩略图
                        newimage = image.GetThumbnailImage(smallW, smallH, callb, new System.IntPtr());
                        //把缩略图保存到指定的虚拟路径
                        newimage.Save(thsSaveFolderFullPath + "\\" + imageName);
                        //释放image对象占用的资源
                        image.Dispose();
                        //释放newimage对象的资源
                        newimage.Dispose();

                        sSavepath = thbasepath + imageName;
                    }
                }


                bool _Result = Product.update_tb_ProductBynProductID(int.Parse(hfProductUpdateID.Value), ddlProductCateTreelist2.nSelectProductCategoryID, cbbHot.Checked, sSavepath, txtsProductNameCN.Text, txtsProductNameEN.Text, txtsSummaryCN.Text, txtsSummaryEN.Text, txtsPlaceoforiginCN.Text, txtsPlaceoforiginEN.Text, txtsModelNoCN.Text, txtsModelNoEN.Text, txtsPriceTermsCN.Text, txtsPriceTermsEN.Text, txtsPaymentTermsCN.Text, txtsPaymentTermsEN.Text, txtsPackageCN.Text, txtsPackageEN.Text, txtsMinimumOrderCN.Text, txtsMinimumOrderEN.Text, txtsDeliveryTimeCN.Text, txtsDeliveryTimeEN.Text, txtsBrandNameCN.Text, txtsBrandNameEN.Text, CKEditorControl1.Text, CKEditorControl2.Text, Session["User"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue));
                if (_Result == true)
                {
                    int _ImageResult = 0;
                    MutileUploaderUserControl1.sNewName = txtsProductNameCN.Text;
                    MutileUploaderUserControl1.SavePath();
                    if (MutileUploaderUserControl1.filepathlist.Count > 0)
                    {
                        for (int i = 0; i < MutileUploaderUserControl1.filepathlist.Count; i++)
                        {
                            //Response.Write(MutileUploaderUserControl1.filepathlist[i]);
                            DBLL.clsProductImage ProductImage = new DBLL.clsProductImage();
                            _ImageResult = ProductImage.insert_tb_ProductImage(int.Parse(hfProductUpdateID.Value), MutileUploaderUserControl1.filenamelist[i].ToString(), txtsProductNameEN.Text, MutileUploaderUserControl1.filepathlist[i].ToString(), Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, 1);
                        }
                    }
                    else
                    {
                        _ImageResult = 1;
                    }
                    if (_ImageResult > 0)
                    {
                        ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
                        ShowMsg1.Show();
                        MultiView1.ActiveViewIndex = 0;
                        ReBindPageList();
                    }
                    else
                    {
                        ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
                        ShowMsg1.Show();
                    }
                    MultiView1.ActiveViewIndex = 0;
                    ReBindPageList();
                }
                else
                {
                    //失败就一条
                    ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
                    ShowMsg1.Show();
                }
            }
        }
        catch (Exception)
        {

            throw;
        }
    }
Exemple #24
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            DBLL.clsContact clscon = new DBLL.clsContact();
            int             result = clscon.insert_tb_Contact("", txtsName.Text, txtsCompanyName.Text, "", txtsEmail.Text, "", txtsPhone.Text, txtsContent.Text, "", DateTime.Now, "", DateTime.Now, true, 0,
                                                              false, txtsWeb.Text, txtsJob.Text);

            if (txtsVali.Text == base.strValidate)
            {
                if (result > 0)
                {
                    string xmlfilepath = ConfigurationManager.AppSettings["xmlfilepath"].ToString();
                    if (Session["languageGlobal"] != null)
                    {
                        xmlfilepath = xmlfilepath.Replace("[filename]", Session["languageGlobal"].ToString());
                    }
                    else
                    {
                        xmlfilepath = xmlfilepath.Replace("[filename]", "cn");
                    }
                    clslang langxml = new clslang(xmlfilepath);
                    langxml.XmlLoad();
                    ShowMsg1.InnerContent = langxml.getString("leaveMsg", "ShowMsg", "ShowMsgContent");

                    ShowMsg1.Show();
                    Clear();
                }
                else
                {
                    string xmlfilepath = ConfigurationManager.AppSettings["xmlfilepath"].ToString();
                    if (Session["languageGlobal"] != null)
                    {
                        xmlfilepath = xmlfilepath.Replace("[filename]", Session["languageGlobal"].ToString());
                    }
                    else
                    {
                        xmlfilepath = xmlfilepath.Replace("[filename]", "cn");
                    }
                    clslang langxml = new clslang(xmlfilepath);
                    langxml.XmlLoad();
                    ShowMsg1.InnerContent = langxml.getString("leaveMsg", "ShowMsg", "ShowMsgFAILContent");
                    ShowMsg1.Show();
                    Clear();
                }
            }
            else
            {
                string xmlfilepath = ConfigurationManager.AppSettings["xmlfilepath"].ToString();
                if (Session["languageGlobal"] != null)
                {
                    xmlfilepath = xmlfilepath.Replace("[filename]", Session["languageGlobal"].ToString());
                }
                else
                {
                    xmlfilepath = xmlfilepath.Replace("[filename]", "cn");
                }
                clslang langxml = new clslang(xmlfilepath);
                langxml.XmlLoad();
                ShowMsg1.InnerContent = langxml.getString("leaveMsg", "ShowMsg", "ShowMsgFAILVali");
                ShowMsg1.Show();
                Clear();
            }
        }
        catch (Exception)
        {
            throw;
        }
    }
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     //判断session
     if (Session["User"] == null || Session["User"].ToString().Length < 1)
     {
         Response.Redirect(Request.RawUrl);
     }
     try
     {
         int nID = 0;
         if (int.TryParse(hfID.Value.ToString(), out nID) && nID > 0)
         {
             //更新
             if (ValiEdit())
             {
                 DBLL.clsNews       clNews = new DBLL.clsNews();
                 DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
                 bool _Result = false;
                 MutileUploaderUserControl31.sNewName = txtsTitle.Text;
                 MutileUploaderUserControl31.SavePath();
                 if (MutileUploaderUserControl31.filepathlist.Count > 0)
                 {
                     for (int i = 0; i < MutileUploaderUserControl31.filepathlist.Count; i++)
                     {
                         _Result = clNews.update_tb_NewsBynNewsID(nID, 0, int.Parse(RadioButtonList2.SelectedValue), txtsTitle.Text, txtsAuthor.Text, MutileUploaderUserControl31.filepathlist[i].ToString(), CKEditorControl1.Text, Session["user"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text));
                     }
                 }
                 else
                 {
                     if (Image3.ImageUrl != "")
                     {
                         _Result = clNews.update_tb_NewsBynNewsID(nID, 0, int.Parse(RadioButtonList2.SelectedValue), txtsTitle.Text, txtsAuthor.Text, Image3.ImageUrl.ToString(), CKEditorControl1.Text, Session["user"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text));
                     }
                     else
                     {
                         _Result = clNews.update_tb_NewsBynNewsID(nID, 0, int.Parse(RadioButtonList2.SelectedValue), txtsTitle.Text, txtsAuthor.Text, "", CKEditorControl1.Text, Session["user"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text));
                     }
                 }
                 if (_Result == true)
                 {
                     ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateSuccess");
                     ShowMsg1.Show();
                 }
                 else
                 {
                     //失败就一条
                     ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "UpdateFail");
                     ShowMsg1.Show();
                 }
             }
             else
             {
                 ShowMsg1.Show();
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #26
0
    protected void BtnAdd_Click(object sender, EventArgs e)
    {
        try
        {
            //判断session
            if (Session["User"] == null || Session["User"].ToString().Length < 1)
            {
                Response.Redirect(Request.RawUrl);
            }
            if (ValiAdd())
            {
                DBLL.clsProduct    Product = new DBLL.clsProduct();
                DBLL.OptionSysDBLL option  = new DBLL.OptionSysDBLL();

                string sSavepath = "";
                //生成缩略图
                HttpFileCollection postedFiles = Request.Files;
                if (postedFiles.Count > 0)
                {
                    if (postedFiles[0].ContentLength > 0)
                    {
                        System.Drawing.Image image, newimage; //定义image类的对象
                        string imagePath;                     //图片路径
                        string imageType;                     //图片类型
                        string imageName;                     //图片名称
                        //提供一个回调方法,用于确定Image对象在执行生成缩略图操作时何时提前取消执行
                        //如果此方法确定 GetThumbnailImage 方法应提前停止执行,则返回 true;否则返回 false
                        System.Drawing.Image.GetThumbnailImageAbort callb = null;


                        string basepath = "~/ProductsUpload" + "/temp/" + DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() +
                                          DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() +
                                          DateTime.Now.Second.ToString() + "/";

                        string sSaveFolderFullPath = Server.MapPath(basepath);

                        if (!System.IO.Directory.Exists(sSaveFolderFullPath))
                        {
                            Directory.CreateDirectory(sSaveFolderFullPath);
                        }


                        string thbasepath = "~/ProductsUpload" + "/thumb/" + DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() +
                                            DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() +
                                            DateTime.Now.Second.ToString() + "/";

                        string thsSaveFolderFullPath = Server.MapPath(thbasepath);

                        if (!System.IO.Directory.Exists(thsSaveFolderFullPath))
                        {
                            Directory.CreateDirectory(thsSaveFolderFullPath);
                        }


                        imagePath = postedFiles[0].FileName;
                        //取得图片类型
                        imageType = imagePath.Substring(imagePath.LastIndexOf(".") + 1);
                        //取得图片名称
                        imageName = imagePath.Substring(imagePath.LastIndexOf("\\") + 1);
                        Stream imgStream = postedFiles[0].InputStream;   //流文件,准备读取上载文件的内容
                        int    imgLen    = postedFiles[0].ContentLength; //上载文件大小
                        //string imgName = txtImageName.Text;                   //图片名称


                        //string imgnm = txtImageName.Text;
                        byte[] imgBinaryData = new byte[imgLen];//


                        int n = imgStream.Read(imgBinaryData, 0, imgLen);



                        //保存到虚拟路径
                        postedFiles[0].SaveAs(sSaveFolderFullPath + "\\" + imageName);
                        ////显示原图
                        //imageSource.ImageUrl = "upFile/" + imageName;
                        //为上传的图片建立引用
                        image = System.Drawing.Image.FromFile(sSaveFolderFullPath + "\\" + imageName);

                        //int smallW = 100;//小图片宽
                        //int smallH = smallW * image.Height / image.Width;//小图片高

                        int smallH = 100;
                        int smallW = smallH * image.Width / image.Height;
                        //生成缩略图
                        newimage = image.GetThumbnailImage(smallW, smallH, callb, new System.IntPtr());
                        //把缩略图保存到指定的虚拟路径
                        newimage.Save(thsSaveFolderFullPath + "\\" + imageName);
                        //释放image对象占用的资源
                        image.Dispose();
                        //释放newimage对象的资源
                        newimage.Dispose();

                        sSavepath = thbasepath + imageName;
                    }
                }
                MutileUploaderUserControl31.SavePath();
                int _Result = 0;
                if (MutileUploaderUserControl31.filepathlist.Count > 0)
                {
                    _Result = Product.insert_tb_Product(ddlProductCateTreelist21.nSelectProductCategoryID, cbbHot.Checked, MutileUploaderUserControl31.filepathlist[0].ToString(), txtsProductNameCN.Text, txtsProductNameEN.Text, CKEditorControl3.Text, CKEditorControl4.Text, CKEditorControl1.Text, CKEditorControl2.Text, Session["user"].ToString(), DateTime.Now, Session["user"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text), sSavepath, "", "", "", "", "", "", "", "", "", "", "", "", txtsBrandNameCN.Text, txtsBrandNameEN.Text);
                }
                else
                {
                    _Result = Product.insert_tb_Product(ddlProductCateTreelist21.nSelectProductCategoryID, cbbHot.Checked, "", txtsProductNameCN.Text, txtsProductNameEN.Text, CKEditorControl3.Text, CKEditorControl4.Text, CKEditorControl1.Text, CKEditorControl2.Text, Session["user"].ToString(), DateTime.Now, Session["user"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text), "", "", "", "", "", "", "", "", "", "", "", "", "", txtsBrandNameCN.Text, txtsBrandNameEN.Text);
                }
                if (_Result > 0)
                {
                    ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess");
                    ShowMsg1.Show();
                    Clear();
                }
                else
                {
                    ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail");
                    ShowMsg1.Show();
                }
            }
            else
            {
                ShowMsg1.Show();
            }
        }
        catch (Exception)
        {
            throw;
        }
    }