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; } }
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; } }
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 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(); } }
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 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 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; } }
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(); } }
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"); } }
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; } }
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; } }
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 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) { } }
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) { } }
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) { } }
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) { } }
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) { } }
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(); } }
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(); } }
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; } }
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 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) { } }
protected void Page_Load(object sender, EventArgs e) { OnSetLanguage(); if (!IsPostBack) { DBLL.OptionSysDBLL sys = new DBLL.OptionSysDBLL(); Panel1.Visible = true; Panel2.Visible = false; Menu1.Items[0].Selected = true; if (Session["languageGlobal"] == "en") { divIntro.InnerHtml = sys.GetOptionValue("en", "SystemSetting", "Introduction"); } else { divIntro.InnerHtml = sys.GetOptionValue("cn", "SystemSetting", "Introduction"); } } }
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 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 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(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL(); int nPageSize = 0; if (nPageRowCount <= 0) { if (int.TryParse(option.GetOptionValue("FormatSetting", "GridViewFormat", "RowsCountDefault"), out nPageSize)) { nPageRowCount = nPageSize; } else { nPageRowCount = common.GetGridViewPageCount(); } } DataPager1.PageSize = nPageRowCount; ReBindPageList(); } }