/// <summary> /// get data child for insert update /// </summary> /// <param name="contdescObj"></param> /// <returns></returns> private PNK_ContentStaticDesc GetDataObjectChild(PNK_ContentStaticDesc productcatdescObj, int lang) { switch (lang) { case 1: productcatdescObj.MainId = this.productcategoryId; productcatdescObj.LangId = Constant.DB.LangId; //string str = SanitizeHtml.Sanitize(txtName.Value); productcatdescObj.Title = SanitizeHtml.Sanitize(txtName.Value); productcatdescObj.Brief = txtIntro.Text; productcatdescObj.Detail = editBriefVi.Text; break; case 2: productcatdescObj.MainId = this.productcategoryId; productcatdescObj.LangId = Constant.DB.LangId_En; productcatdescObj.Title = string.IsNullOrEmpty(txtNameEng.Value) ? SanitizeHtml.Sanitize(txtName.Value) : SanitizeHtml.Sanitize(txtNameEng.Value); productcatdescObj.Brief = string.IsNullOrEmpty(txtIntroEn.Text) ? txtIntro.Text : txtIntroEn.Text; productcatdescObj.Detail = string.IsNullOrEmpty(editBriefEn.Text) ? editBriefVi.Text : editBriefEn.Text; break; } return(productcatdescObj); }
/// <summary> /// get data child for insert update /// </summary> /// <param name="contdescObj"></param> /// <returns></returns> private PNK_ProductDesc GetDataObjectChild(PNK_ProductDesc productcatdescObj, int lang) { switch (lang) { case 1: productcatdescObj.MainId = this.productcategoryId; productcatdescObj.LangId = Constant.DB.LangId; productcatdescObj.Title = SanitizeHtml.Sanitize(txtName.Value); productcatdescObj.TitleUrl = Utils.RemoveUnicode(SanitizeHtml.Sanitize(txtName.Value)); productcatdescObj.Brief = txtIntro.Text; productcatdescObj.Detail = txtDetailVi.Text; productcatdescObj.Position = txtPositionVi.Text; productcatdescObj.Utility = txtUtilityVi.Text; productcatdescObj.Pictures = txtPicturesVi.Text; productcatdescObj.Design = txtDesignVi.Text; productcatdescObj.Payment = txtPaymentVi.Text; productcatdescObj.Contact = txtContactVi.Text; productcatdescObj.WorkCarried = txtWorkCarriedVi.Text; productcatdescObj.TimeCarried = txtTimeCarriedVi.Text; productcatdescObj.Other = txtOtherVi.Text; productcatdescObj.MetaTitle = txtMetaTitle.Text; productcatdescObj.Metadescription = txtMetaDescription.Text; productcatdescObj.MetaKeyword = txtMetaKeyword.Text; productcatdescObj.H1 = txtH1.Text; productcatdescObj.H2 = txtH2.Text; productcatdescObj.H3 = txtH3.Text; break; case 2: productcatdescObj.MainId = this.productcategoryId; productcatdescObj.LangId = Constant.DB.LangId_En; string title = string.IsNullOrEmpty(txtNameEng.Value) ? SanitizeHtml.Sanitize(txtName.Value) : SanitizeHtml.Sanitize(txtNameEng.Value); productcatdescObj.Title = title; productcatdescObj.TitleUrl = Utils.RemoveUnicode(title); productcatdescObj.Brief = string.IsNullOrEmpty(txtIntroEng.Text) ? txtIntro.Text : txtIntroEng.Text; productcatdescObj.Detail = string.IsNullOrEmpty(txtDetailVi.Text) ? txtDetailVi.Text : txtDetailEng.Text; productcatdescObj.Position = string.IsNullOrEmpty(txtPositionEng.Text) ? txtPositionVi.Text : txtPositionEng.Text; productcatdescObj.Design = string.IsNullOrEmpty(txtDesignEng.Text) ? txtDesignVi.Text : txtDesignEng.Text; productcatdescObj.Pictures = string.IsNullOrEmpty(txtPicturesEng.Text) ? txtPicturesVi.Text : txtPicturesEng.Text; productcatdescObj.Payment = string.IsNullOrEmpty(txtPaymentEng.Text) ? txtPaymentVi.Text : txtPaymentEng.Text; productcatdescObj.Contact = string.IsNullOrEmpty(txtContactEng.Text) ? txtContactVi.Text : txtContactEng.Text; productcatdescObj.WorkCarried = string.IsNullOrEmpty(txtWorkCarriedEng.Text) ? txtWorkCarriedVi.Text : txtWorkCarriedEng.Text; productcatdescObj.TimeCarried = string.IsNullOrEmpty(txtTimeCarriedEng.Text) ? txtTimeCarriedVi.Text : txtTimeCarriedEng.Text; productcatdescObj.Other = string.IsNullOrEmpty(txtOtherEng.Text) ? txtOtherVi.Text : txtOtherEng.Text; productcatdescObj.MetaTitle = string.IsNullOrEmpty(txtMetaTitleEng.Text) ? txtMetaTitle.Text : txtMetaTitleEng.Text; productcatdescObj.Metadescription = string.IsNullOrEmpty(txtMetaDescriptionEng.Text) ? txtMetaDescription.Text : txtMetaDescriptionEng.Text; productcatdescObj.MetaKeyword = string.IsNullOrEmpty(txtMetaKeywordEng.Text) ? txtMetaKeyword.Text : txtMetaKeywordEng.Text; productcatdescObj.H1 = string.IsNullOrEmpty(txtH1Eng.Text) ? txtH1.Text : txtH1Eng.Text; productcatdescObj.H2 = string.IsNullOrEmpty(txtH2Eng.Text) ? txtH2.Text : txtH2Eng.Text; productcatdescObj.H3 = string.IsNullOrEmpty(txtH3Eng.Text) ? txtH3.Text : txtH3Eng.Text; break; } return(productcatdescObj); }
/// <summary> /// get data child for insert update /// </summary> /// <param name="contdescObj"></param> /// <returns></returns> private PNK_ExchangeRateDesc GetDataObjectChild(PNK_ExchangeRateDesc productcatdescObj, int lang) { switch (lang) { case 1: productcatdescObj.MainId = this.productcategoryId; productcatdescObj.LangId = Constant.DB.LangId; productcatdescObj.Title = SanitizeHtml.Sanitize(txtName.Value); productcatdescObj.Amount = DBConvert.ParseDecimal(txtAmount.Value); productcatdescObj.FromCurrency = txtFromCurrency.Value; productcatdescObj.ToCurrency = txtToCurrency.Value; productcatdescObj.TitleUrl = Utils.RemoveUnicode(SanitizeHtml.Sanitize(txtName.Value)); productcatdescObj.Brief = txtIntro.Text; productcatdescObj.Detail = editBriefVi.Text; break; case 2: productcatdescObj.MainId = this.productcategoryId; productcatdescObj.LangId = Constant.DB.LangId_En; productcatdescObj.Title = string.IsNullOrEmpty(txtNameEng.Value) ? SanitizeHtml.Sanitize(txtName.Value) : SanitizeHtml.Sanitize(txtNameEng.Value); productcatdescObj.TitleUrl = string.IsNullOrEmpty(txtNameEng.Value) ? Utils.RemoveUnicode(SanitizeHtml.Sanitize(txtName.Value)) : Utils.RemoveUnicode(SanitizeHtml.Sanitize(txtNameEng.Value)); productcatdescObj.Brief = string.IsNullOrEmpty(txtIntroEn.Text) ? txtIntro.Text : txtIntroEn.Text; productcatdescObj.Detail = string.IsNullOrEmpty(editBriefEn.Text) ? editBriefVi.Text : editBriefEn.Text; break; } return(productcatdescObj); }
private void Search() { string strSearch = Request.Form[search.ClientID.Replace('_', '$')]; this.search.Value = strSearch; strSearch = strSearch == null ? string.Empty : SanitizeHtml.Sanitize(strSearch); GetList(DBConvert.ParseInt(drpPosition.SelectedValue), strSearch, this.currentPageIndex, 50); }
protected void btnSearchPhone_ServerClick(object sender, EventArgs e) { string strSearch = Request.Form[txtSearchPhone.ClientID.Replace('_', '$')]; strSearch = strSearch == null ? string.Empty : Utils.RemoveUnicode(SanitizeHtml.Sanitize(strSearch)); IList <PNK_Booking> lst = pcBll.GetList(1, string.Empty, DateTime.MinValue, DateTime.MinValue, 1, 9999, out total); lst = lst.Where(m => m.PhoneNumber == strSearch).ToList(); this.records = DBConvert.ParseString(lst.Count); this.pager.PageSize = DBConvert.ParseInt(ConfigurationManager.AppSettings["PageSizeAdmin"]); this.pager.ItemCount = lst.Count; this.rptResult.DataSource = lst; this.rptResult.DataBind(); }
/// <summary> /// get data child for insert update /// </summary> /// <param name="contdescObj"></param> /// <returns></returns> private PNK_BookingDesc GetDataObjectChild(PNK_BookingDesc productcatdescObj, int lang) { switch (lang) { case 1: productcatdescObj.MainId = 1; productcatdescObj.LangId = Constant.DB.LangId; productcatdescObj.Name = SanitizeHtml.Sanitize(txtFullName.Value); break; case 2: productcatdescObj.MainId = 1; productcatdescObj.LangId = Constant.DB.LangId_En; productcatdescObj.Name = SanitizeHtml.Sanitize(txtFullName.Value); break; } return(productcatdescObj); }
/// <summary> /// get data child for insert update /// </summary> /// <param name="contdescObj"></param> /// <returns></returns> private PNK_BookingDesc GetDataObjectChild(PNK_BookingDesc productcatdescObj, int lang) { switch (lang) { case 1: productcatdescObj.MainId = 1; productcatdescObj.LangId = Constant.DB.LangId; productcatdescObj.Name = SanitizeHtml.Sanitize(string.Format("{0} {1}", txtFirstName.Value, txtLastName.Value)); break; case 2: productcatdescObj.MainId = 1; productcatdescObj.LangId = Constant.DB.LangId_En; productcatdescObj.Name = SanitizeHtml.Sanitize(string.Format("{0} {1}", txtFirstName.Value, txtLastName.Value)); break; } return(productcatdescObj); }
/// <summary> /// get data child for insert update /// </summary> /// <param name="contdescObj"></param> /// <returns></returns> private PNK_ProductCategoryDesc GetDataObjectChild(PNK_ProductCategoryDesc productcatdescObj, int lang) { switch (lang) { case 1: productcatdescObj.MainId = this.productcategoryId; productcatdescObj.LangId = Constant.DB.LangId; productcatdescObj.Name = SanitizeHtml.Sanitize(txtName.Value); productcatdescObj.NameUrl = Utils.RemoveUnicode(SanitizeHtml.Sanitize(txtName.Value)); productcatdescObj.Brief = SanitizeHtml.Sanitize(txtIntro.Text); productcatdescObj.MetaTitle = txtMetaTitle.Text.Trim(); productcatdescObj.MetaKeyword = txtMetaKeyword.Text.Trim(); productcatdescObj.MetaDecription = txtMetaDescription.Text.Trim(); productcatdescObj.H1 = txtH1.Text.Trim(); productcatdescObj.H2 = txtH2.Text.Trim(); productcatdescObj.H3 = txtH3.Text.Trim(); productcatdescObj.Detail = SanitizeHtml.Sanitize(txtDetail.Text); break; case 2: productcatdescObj.MainId = this.productcategoryId; productcatdescObj.LangId = Constant.DB.LangId_En; string name = !string.IsNullOrEmpty(txtNameEng.Value) ? SanitizeHtml.Sanitize(txtNameEng.Value) : SanitizeHtml.Sanitize(txtName.Value); productcatdescObj.Name = name; productcatdescObj.NameUrl = Utils.RemoveUnicode(SanitizeHtml.Sanitize(name)); productcatdescObj.Brief = SanitizeHtml.Sanitize(txtIntroEng.Text); productcatdescObj.MetaTitle = txtMetaTitleEng.Text.Trim(); productcatdescObj.MetaKeyword = txtMetaKeywordEng.Text.Trim(); productcatdescObj.MetaDecription = txtMetaDescriptionEng.Text.Trim(); productcatdescObj.H1 = txtH1Eng.Text.Trim(); productcatdescObj.H2 = txtH2Eng.Text.Trim(); productcatdescObj.H3 = txtH3Eng.Text.Trim(); productcatdescObj.Detail = SanitizeHtml.Sanitize(txtDetailEng.Text); break; } return(productcatdescObj); }
/// <summary> /// Tìm kiếm /// </summary> private void Search() { string strSearch = Request.Form[search.ClientID.Replace('_', '$')]; this.search.Value = strSearch; strSearch = strSearch == null ? string.Empty : Utils.RemoveUnicode(SanitizeHtml.Sanitize(strSearch)); string allCategoryid = GetAllChildCategory(); GetList(1, strSearch, allCategoryid, this.currentPageIndex, DBConvert.ParseInt(ConfigurationManager.AppSettings["PageSizeAdmin"])); }
private void Search() { //Xoá cache trước khi lưu CacheHelper.ClearAll(); string strSearch = Request.Form[search.ClientID.Replace('_', '$')]; this.search.Value = strSearch; strSearch = strSearch == null ? string.Empty : Utils.RemoveUnicode(SanitizeHtml.Sanitize(strSearch)).ToLower(); GetList(1, strSearch, 1, pageSize); }
private void SearchBrand() { string strSearch = drpBrand.SelectedItem.Text; this.search.Value = strSearch; strSearch = strSearch == " " ? string.Empty : Utils.RemoveUnicode(SanitizeHtml.Sanitize(strSearch)); IList <PNK_Product> lst = pcBll.GetList(1, string.Empty, string.Empty, string.Empty, string.Empty, null, string.Empty, 1, 9999, out total); lst = strSearch != "" ? lst.Where(m => Utils.RemoveUnicode(m.ProductDesc.BrandNameDesc).ToLower() == strSearch).ToList() : lst; this.records = DBConvert.ParseString(lst.Count); this.pager.PageSize = DBConvert.ParseInt(ConfigurationManager.AppSettings["PageSizeAdmin"]); this.pager.ItemCount = lst.Count; this.rptResult.DataSource = lst; this.rptResult.DataBind(); }
private void SearchCode() { string strSearch = Request.Form[txtCode.ClientID.Replace('_', '$')]; this.search.Value = strSearch; strSearch = strSearch == null ? string.Empty : Utils.RemoveUnicode(SanitizeHtml.Sanitize(strSearch)); IList <PNK_Product> lst = pcBll.GetList(1, string.Empty, string.Empty, string.Empty, string.Empty, null, string.Empty, 1, 9999, out total); lst = lst.Where(m => m.Code == strSearch).ToList(); this.records = DBConvert.ParseString(lst.Count); this.pager.PageSize = DBConvert.ParseInt(ConfigurationManager.AppSettings["PageSizeAdmin"]); this.pager.ItemCount = lst.Count; this.rptResult.DataSource = lst; this.rptResult.DataBind(); }
private void Search() { string strSearch = Request.Form[search.ClientID.Replace('_', '$')]; this.search.Value = strSearch; this.search.Value = strSearch; strSearch = strSearch == null ? string.Empty : Utils.RemoveUnicode(SanitizeHtml.Sanitize(strSearch)).ToLower(); GetList(1, strSearch, this.currentPageIndex, 50); }