Exemple #1
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();
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            OnSetLanguage();

            DBLL.OptionSysDBLL sys   = new DBLL.OptionSysDBLL();
            DBLL.DBcommon      dbcom = new DBLL.DBcommon();


            DBLL.clsProduct clspro    = new DBLL.clsProduct();
            DataTable       dtProduct = clspro.Select_tb_ProductBybHot(true);
            DataList1.DataSource = dtProduct;
            DataList1.DataBind();

            if (Session["languageGlobal"] == "en")
            {
                DataTable dtNews = dbcom.GetDataTable("select top 5 * from tb_News where bEnable=1 and  nLangType=1 order by nSorting desc,dCreatedTime desc");
                GridView1.DataSource = dtNews;
                GridView1.DataBind();
            }
            else
            {
                DataTable dtNews = dbcom.GetDataTable("select top 5 * from tb_News where bEnable=1 and  nLangType=0 order by nSorting desc,dCreatedTime desc");
                GridView1.DataSource = dtNews;
                GridView1.DataBind();
            }
        }
    }
    protected void lvProductList_ItemDataBound(object sender, ListViewItemEventArgs e)
    {
        try
        {

            DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
            DBLL.clsProductCategory ProductCategory = new DBLL.clsProductCategory();
            if (e.Item.ItemType == ListViewItemType.DataItem)
            {
                int nType = 0;
                Label lblnProductCategoryID = (Label)e.Item.FindControl("lblnProductCategoryID");
                if (int.TryParse(lblnProductCategoryID.Text, out nType))
                {
                    nType = int.Parse(lblnProductCategoryID.Text);
                    string sTopicName = ProductCategory.Select_tb_ProductCategoryBynProductCategoryID(nType).Rows[0]["sProductCategoryNameCN"].ToString();
                    lblnProductCategoryID.Text = sTopicName;
                }
            }
            ImageButton imgDelete = (ImageButton)e.Item.FindControl("imgDelete");
            imgDelete.OnClientClick = "javascript:if (confirm('" + option.GetOptionValue("FormatSetting", "CommandControl", "bIsDelete") + "')){$('#EntryForm').block({ message: null });}else{return false;}";

        }
        catch (Exception)
        {

        }
    }
Exemple #4
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 #5
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        DBLL.clsNews       News   = new DBLL.clsNews();
        DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
        bool _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)
        {
            string sSaveFolderFullPath = Server.MapPath(Image3.ImageUrl);
            if (File.Exists(sSaveFolderFullPath))
            {
                //如果存在则删除
                File.Delete(sSaveFolderFullPath);

                System.IO.DirectoryInfo dir  = new System.IO.DirectoryInfo(sSaveFolderFullPath.Substring(0, sSaveFolderFullPath.LastIndexOf("\\")).ToString());
                System.IO.FileInfo[]    dirs = dir.GetFiles();
                if (dirs.Length > 0)
                {
                    //有子文件夹
                }
                else
                {
                    Directory.Delete(sSaveFolderFullPath.Substring(0, sSaveFolderFullPath.LastIndexOf("\\")).ToString());
                }
            }
            lblsImagePath.Visible = true;
            MutileUploaderUserControl3.Visible = true;
            Label2.Visible  = false;
            Button1.Visible = false;
            Image3.Visible  = false;
        }
    }
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.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 #7
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        DBLL.clsProduct    clProduct = new DBLL.clsProduct();
        DBLL.OptionSysDBLL option    = new DBLL.OptionSysDBLL();
        //bool _Result = clProduct.update_tb_ProductBynProductID(int.Parse(hfID.Value), ddlProductCateTreelist21.nSelectProductCategoryID, cbbHot.Checked, "", txtsProductNameCN.Text, txtsProductNameEN.Text, CKEditorControl3.Text, CKEditorControl4.Text, CKEditorControl1.Text, CKEditorControl2.Text, Session["user"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text), "", txtsEnsitivityCN.Text, txtsEnsitivityEN.Text, txtsChannelBalanceCN.Text, txtsChannelBalanceEN.Text, txtsImpedanceCN.Text, txtsImpedanceEN.Text, txtsFrequencyCN.Text, txtsFrequencyEN.Text, txtsRatedPowerCN.Text, txtsRatedPowerEN.Text, txtsMaximumPowerCN.Text, txtsMaximumPowerEN.Text, txtsBrandNameCN.Text, txtsBrandNameEN.Text);
        bool _Result = clProduct.update_tb_ProductBynProductID(int.Parse(hfID.Value), ddlProductCateTreelist21.nSelectProductCategoryID, cbbHot.Checked, "", txtsProductNameCN.Text, txtsProductNameEN.Text, CKEditorControl3.Text, CKEditorControl4.Text, CKEditorControl1.Text, CKEditorControl2.Text, Session["user"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text), "", "", "", "", "", "", "", "", "", "", "", "", "", txtsBrandNameCN.Text, txtsBrandNameEN.Text);

        if (_Result)
        {
            string sSaveFolderFullPath = Server.MapPath(Image3.ImageUrl);
            if (File.Exists(sSaveFolderFullPath))
            {
                //如果存在则删除
                File.Delete(sSaveFolderFullPath);

                System.IO.DirectoryInfo dir  = new System.IO.DirectoryInfo(sSaveFolderFullPath.Substring(0, sSaveFolderFullPath.LastIndexOf("\\")).ToString());
                System.IO.FileInfo[]    dirs = dir.GetFiles();
                if (dirs.Length > 0)
                {
                    //有子文件夹
                }
                else
                {
                    Directory.Delete(sSaveFolderFullPath.Substring(0, sSaveFolderFullPath.LastIndexOf("\\")).ToString());
                }
            }
            lblsImagePath.Visible = true;
            MutileUploaderUserControl31.Visible = true;
            Label2.Visible  = false;
            Button1.Visible = false;
            Image3.Visible  = false;
            Image3.ImageUrl = "";
            Image4.ImageUrl = "";
        }
    }
Exemple #8
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 #9
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;
        }
    }
 protected void lvTopicCategoryList_ItemDataBound(object sender, ListViewItemEventArgs e)
 {
     try
     {
         DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
         if (e.Item.ItemType == ListViewItemType.DataItem)
         {
             DBLL.clsTopic Topic       = new DBLL.clsTopic();
             int           nType       = 0;
             Label         lblnTopicID = (Label)e.Item.FindControl("lblnTopicID");
             if (int.TryParse(lblnTopicID.Text, out nType))
             {
                 nType = int.Parse(lblnTopicID.Text);
                 string sTopicName = Topic.Select_tb_TopicBynTopicID(nType).Rows[0]["sTopicNameCN"].ToString();
                 lblnTopicID.Text = sTopicName;
             }
             Label lblsTCategoryNameCN = (Label)e.Item.FindControl("lblsTCategoryNameCN");
             if (lblsTCategoryNameCN.Text.Length > 5)
             {
                 lblsTCategoryNameCN.Text = lblsTCategoryNameCN.Text.Substring(0, 5).ToString() + "....";
             }
             Label lblsTCategoryNameEN = (Label)e.Item.FindControl("lblsTCategoryNameEN");
             if (lblsTCategoryNameEN.Text.Length > 6)
             {
                 lblsTCategoryNameEN.Text = lblsTCategoryNameEN.Text.Substring(0, 6).ToString() + "....";
             }
         }
         ImageButton imgDelete = (ImageButton)e.Item.FindControl("imgDelete");
         imgDelete.OnClientClick = "javascript:if (confirm('" + option.GetOptionValue("FormatSetting", "CommandControl", "bIsDelete") + "')){$('#EntryForm').block({ message: null });}else{return false;}";
     }
     catch (Exception)
     {
     }
 }
Exemple #11
0
 protected void lvLinkList_ItemDataBound(object sender, ListViewItemEventArgs e)
 {
     try
     {
         if (e.Item.ItemType == ListViewItemType.DataItem)
         {
             Label lblnType = (Label)e.Item.FindControl("lblnType");
             if (int.Parse(lblnType.Text) == 1)
             {
                 lblnType.Text = "MSN";
             }
             else if (int.Parse(lblnType.Text) == 2)
             {
                 lblnType.Text = "EMAIL";
             }
             else if (int.Parse(lblnType.Text) == 3)
             {
                 lblnType.Text = "Skype";
             }
             else if (int.Parse(lblnType.Text) == 4)
             {
                 lblnType.Text = "QQ";
             }
         }
         DBLL.OptionSysDBLL option    = new DBLL.OptionSysDBLL();
         ImageButton        imgDelete = (ImageButton)e.Item.FindControl("imgDelete");
         imgDelete.OnClientClick = "javascript:if (confirm('" + option.GetOptionValue("FormatSetting", "CommandControl", "bIsDelete") + "')){$('#EntryForm').block({ message: null });}else{return false;}";
     }
     catch (Exception)
     {
     }
 }
Exemple #12
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 #13
0
    protected void lvFAQList_ItemDataBound(object sender, ListViewItemEventArgs e)
    {
        try
        {
            DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();

            Label lblsQuestionEN = (Label)e.Item.FindControl("lblsQuestionEN");
            if (lblsQuestionEN.Text.Length > 4)
            {
                lblsQuestionEN.Text = lblsQuestionEN.Text.Substring(0, 4).ToString() + "....";
            }
            Label lblsQuestionCN = (Label)e.Item.FindControl("lblsQuestionCN");
            if (lblsQuestionCN.Text.Length > 4)
            {
                lblsQuestionCN.Text = lblsQuestionCN.Text.Substring(0, 4).ToString() + "....";
            }

            Label lblsAnswerCN = (Label)e.Item.FindControl("lblsAnswerCN");
            if (lblsAnswerCN.Text.Length > 4)
            {
                lblsAnswerCN.Text = lblsAnswerCN.Text.Substring(0, 4).ToString() + "....";
            }
            Label lblsAnswerEN = (Label)e.Item.FindControl("lblsAnswerEN");
            if (lblsAnswerEN.Text.Length > 4)
            {
                lblsAnswerEN.Text = lblsAnswerEN.Text.Substring(0, 4).ToString() + "....";
            }

            ImageButton imgDelete = (ImageButton)e.Item.FindControl("imgDelete");
            imgDelete.OnClientClick = "javascript:if (confirm('" + option.GetOptionValue("FormatSetting", "CommandControl", "bIsDelete") + "')){$('#EntryForm').block({ message: null });}else{return false;}";
        }
        catch (Exception)
        {
        }
    }
Exemple #14
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();
     }
 }
 protected void lvNews_ItemDataBound(object sender, ListViewItemEventArgs e)
 {
     try
     {
         DBLL.DBcommon      DBc    = new DBLL.DBcommon();
         DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
         if (e.Item.ItemType == ListViewItemType.DataItem)
         {
             Label lblsTitle = (Label)e.Item.FindControl("lblsTitle");
             if (lblsTitle.Text.Length > 10)
             {
                 lblsTitle.Text = lblsTitle.Text.Substring(0, 10).ToString() + "....";
             }
             //Label lblsProductNameEN = (Label)e.Item.FindControl("lblsProductNameEN");
             //if (lblsProductNameEN.Text.Length > 10)
             //{
             //    lblsProductNameEN.Text = lblsProductNameEN.Text.Substring(0, 10).ToString() + "....";
             //}
         }
         Button btnDelete = (Button)e.Item.FindControl("btnDelete");
         btnDelete.OnClientClick = "javascript:if (confirm('" + option.GetOptionValue("FormatSetting", "CommandControl", "bIsDelete") + "')){$('#EntryForm').block({ message: null });}else{return false;}";
     }
     catch (Exception)
     {
     }
 }
Exemple #16
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        DBLL.clsPartners   clPartners = new DBLL.clsPartners();
        DBLL.OptionSysDBLL option     = new DBLL.OptionSysDBLL();
        bool _Result = clPartners.update_tb_PartnersBynPartnersID(int.Parse(hfID.Value), txtsImageNameCN.Text, "", "", txtsImageNameEN.Text, "", Session["user"].ToString(), DateTime.Now, true, int.Parse(txtnSorting.Text));

        if (_Result)
        {
            string sSaveFolderFullPath = Server.MapPath(Image3.ImageUrl);
            if (File.Exists(sSaveFolderFullPath))
            {
                //如果存在则删除
                File.Delete(sSaveFolderFullPath);

                System.IO.DirectoryInfo dir  = new System.IO.DirectoryInfo(sSaveFolderFullPath.Substring(0, sSaveFolderFullPath.LastIndexOf("\\")).ToString());
                System.IO.FileInfo[]    dirs = dir.GetFiles();
                if (dirs.Length > 0)
                {
                    //有子文件夹
                }
                else
                {
                    Directory.Delete(sSaveFolderFullPath.Substring(0, sSaveFolderFullPath.LastIndexOf("\\")).ToString());
                }
            }
            lblsImagePath.Visible = true;
            Label2.Visible        = false;
            Button1.Visible       = false;
            Image3.Visible        = false;
        }
    }
Exemple #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
         CKEditorControl1.Text = option.GetOptionValue("cn", "SystemSetting", "Culture").ToString();
         CKEditorControl2.Text = option.GetOptionValue("en", "SystemSetting", "Culture").ToString();
     }
 }
Exemple #18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
         CKEditorControlc.Text = option.GetOptionValue("cn", "SystemSetting", "ProductCateTemplate");
         CKEditorControle.Text = option.GetOptionValue("en", "SystemSetting", "ProductCateTemplate");
     }
 }
Exemple #19
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;
     }
 }
Exemple #20
0
 protected void lvTopicList_ItemDataBound(object sender, ListViewItemEventArgs e)
 {
     try
     {
         DBLL.OptionSysDBLL option    = new DBLL.OptionSysDBLL();
         Button             btnDelete = (Button)e.Item.FindControl("btnDelete");
         btnDelete.OnClientClick = "javascript:if (confirm('" + option.GetOptionValue("FormatSetting", "CommandControl", "bIsDelete") + "')){$('#EntryForm').block({ message: null });}else{return false;}";
     }
     catch (Exception)
     {
     }
 }
Exemple #21
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.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 #22
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 #23
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;
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     OnSetLanguage();
     if (!IsPostBack)
     {
         DBLL.OptionSysDBLL sys = new DBLL.OptionSysDBLL();
         //if (Session["languageGlobal"] == "en")
         //{
         //    contactdetail.InnerHtml = sys.GetOptionValue("en", "SystemSetting", "ContactUs");
         //}
         //else
         //{
         //    contactdetail.InnerHtml = sys.GetOptionValue("cn", "SystemSetting", "ContactUs");
         //}
     }
 }
Exemple #25
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 #26
0
    protected void lvUserList_PagePropertiesChanged(object sender, EventArgs e)
    {
        DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL();
        int nPageSize             = 0;

        if (int.TryParse(option.GetOptionValue("FormatSetting", "GridViewFormat", "RowsCountDefault"), out nPageSize))
        {
            DataPager1.PageSize = nPageSize;
            DataPager1.SetPageProperties(DataPager1.StartRowIndex, nPageSize, true);
        }
        else
        {
            DataPager1.SetPageProperties(common.GetGridViewPageCount(), nPageSize, true);
        }

        lvUserList.DataSource = UserList;
        lvUserList.DataBind();
    }
Exemple #27
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 #28
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 (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;
     }
 }