void GetFileLibrary2(string order) { if (!igid.Equals("")) { ddlCateSearch.SelectedValue = igid; condition = GroupsItemsTSql.GetItemsInGroupCondition(ddlCateSearch.SelectedValue, ""); } else { condition = DataExtension.AndConditon( "VGAPP = '" + app + "'", GroupsTSql.GetGroupsByVglang(language)); } condition += " AND IIENABLE <> '2' "; if (tbKeySearch.Text.Length > 0) { condition += " AND " + SearchTSql.GetSearchMathedCondition(tbKeySearch.Text, ItemsColumns.VikeyColumn); } if (tbTitleSearch.Text.Length > 0) { condition += " AND " + SearchTSql.GetSearchMathedCondition(tbTitleSearch.Text, ItemsColumns.VititleColumn); } if (order.Length > 0) { orderBy = order; } else { orderBy = CookieExtension.GetCookiesSort(sortCookiesName); if (orderBy.Length < 1) { orderBy = " DCREATEDATE DESC "; } } DataSet ds = new DataSet(); ds = GroupsItems.GetAllDataPagging(p, DdlListShowItem.SelectedValue, condition, orderBy); DataTable dt = new DataTable(); dt = ds.Tables[1]; string key = tbKeySearch.Text + "&name=" + tbTitleSearch.Text; LtPagging.Text = PagingExtension.SpilitPages(Convert.ToInt32(dt.Rows[0]["TotalRows"]), Convert.ToInt16(DdlListShowItem.SelectedValue), Convert.ToInt32(p), LinkAdmin.UrlAdmin(CodeApplications.FileLibrary2, TypePage.Item, ddlCateSearch.SelectedValue, key, NumberShowItem), "currentPS", "otherPS", "firstPS", "lastPS", "previewPS", "nextPS"); LtPaggingTop.Text = LtPagging.Text; rp_mn_users.DataSource = ds.Tables[0]; rp_mn_users.DataBind(); }
private void InsertProperty(string igid, string iid) { string condition = DataExtension.AndConditon(GroupsItemsTSql.GetByIgid(igid), GroupsItemsTSql.GetByIid(iid)); DataTable dt = GroupsItems.GetGroupsItems("1", GroupsItemsColumns.IgiidColumn, condition, ""); if (dt.Rows.Count == 0) { GroupsItems.InsertGroupsItems(igid, iid, "", DateTime.Now.ToString(), DateTime.Now.ToString(), DateTime.Now.ToString(), ""); } }
protected void TextChanged(object sender, EventArgs e) { TextBox textbox = sender as TextBox; string[] fields = { "IORDER" }; string[] values = { textbox.Text }; string condition = " IGIID = '" + textbox.ToolTip + "' "; GroupsItems.UpdateGroupsItemsCondition(DataExtension.UpdateTransfer(fields, values), condition); GetService(""); }
private string GetIid() { condition = ItemsTSql.GetItemsByViapp(app); DataTable dt = new DataTable(); dt = GroupsItems.GetAllData("1", "Items.iid", condition, ItemsColumns.IidColumn + " desc"); if (dt.Rows.Count > 0) { return(dt.Rows[0][ItemsColumns.IidColumn].ToString()); } return(""); }
void GetPhotoAlbum(string order) { DdlListShowItem.SelectedValue = NumberShowItem; if (!igid.Equals("")) { ddl_group_ontab.SelectedValue = igid; conditionItems = GroupsItemsTSql.GetItemsInGroupCondition(ddl_group_ontab.SelectedValue, ""); } else { conditionItems = DataExtension.AndConditon( "VGAPP = '" + app + "'", GroupsTSql.GetGroupsByVglang(language)); } conditionItems = DataExtension.AndConditon(conditionItems, ItemsTSql.GetItemsByViapp(app)); conditionItems += " AND IIENABLE = '2' "; if (txt_key.Text.Length > 0 && !txt_key.Text.Equals(strdisplay)) { SearchCondition = " AND " + SearchTSql.GetSearchMathedCondition(txt_key.Text, ItemsColumns.VititleColumn); } if (txt_key.Text.Equals(strdisplay)) { txt_key.Text = ""; } if (order.Length > 0) { orderBy = order; } else { orderBy = CookieExtension.GetCookiesSort(sortCookiesName); if (orderBy.Length < 1) { orderBy = " DCREATEDATE DESC "; } } DataSet ds = new DataSet(); ds = GroupsItems.GetAllDataPagging(p, NumberShowItem, conditionItems + SearchCondition, orderBy); DataTable dt = new DataTable(); dt = ds.Tables[1]; LtPagging.Text = PagingExtension.SpilitPages(Convert.ToInt32(dt.Rows[0]["TotalRows"]), Convert.ToInt16(NumberShowItem), Convert.ToInt32(p), LinkAdmin.UrlAdmin(CodeApplications.PhotoAlbum, TypePage.RecycleItem, ddl_group_ontab.SelectedValue, txt_key.Text, NumberShowItem), "currentPS", "otherPS", "firstPS", "lastPS", "previewPS", "nextPS"); rp_mn_users.DataSource = ds.Tables[0]; rp_mn_users.DataBind(); }
void GetTotalPost() { string condition = DataExtension.AndConditon( DataExtension.OrConditon( GroupsTSql.GetGroupsByVgapp(TatThanhJsc.AboutUsModul.CodeApplications.AboutUs), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.AdvertisingModul.CodeApplications.Advertising), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.ProductModul.CodeApplications.Product), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.DealModul.CodeApplications.Deal), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.FileLibraryModul.CodeApplications.FileLibrary), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.ServiceModul.CodeApplications.Service), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.NewsModul.CodeApplications.News), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.PhotoAlbumModul.CodeApplications.PhotoAlbum), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.VideoModul.CodeApplications.Video), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.QAModul.CodeApplications.QA), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.CustomerReviewsModul.CodeApplications.CustomerReviews) ), GroupsTSql.GetGroupsByVglang(language)); #region Hiển thị bài đã duyệt theo trạng thái phân quyền string userRole = CookieExtension.GetCookies("RolesUser"); if (HorizaMenuConfig.ShowDuyetTin2) { if (StringExtension.RoleInListRoles(PhanQuyen.DuyetTin.Cap2, userRole)) { #region Với tài khoản cấp 2 (trưởng ban biên tập) condition += " AND IIENABLE = '" + PhanQuyen.DuyetTin.Cap1 + "' "; #endregion } else if (StringExtension.RoleInListRoles(PhanQuyen.DuyetTin.Cap3, userRole)) { #region Với tài khoản cấp 3 (tổng biên tập) condition += " AND IIENABLE = '" + PhanQuyen.DuyetTin.Cap2 + "' "; #endregion } } else if (HorizaMenuConfig.ShowDuyetTin1) { if (StringExtension.RoleInListRoles(PhanQuyen.DuyetTin.Cap3, userRole)) { #region Với tài khoản cấp 3 (tổng biên tập) condition += " AND IIENABLE = '" + PhanQuyen.DuyetTin.Cap2 + "' "; #endregion } } #endregion string orderBy = " DCREATEDATE DESC "; DataTable dt = GroupsItems.GetAllData("", "*", condition, orderBy); if (dt.Rows.Count > 0) { totalPost.Text = " (" + dt.Rows.Count + ")"; } }
private void Booking() { string s = "Success"; #region Lấy thông tin string name = Request.Params["name"]; string phone = Request.Params["phone"]; string email = Request.Params["email"]; string nationality = Request.Params["nationality"]; string service = Request.Params["service"]; string content = Request.Params["content"]; string thongtinkhac = StringExtension.GhepChuoi("", phone, email, nationality); string igid = GetFirstCateId(); #endregion GroupsItems.InsertItemsGroupsItems(lang, "QLDDDV", "", service, "", content, "", "", name, "", "", "", "", "", "", "", "", thongtinkhac, "0", "0", "", "", DateTime.Now.ToString(), DateTime.Now.ToString(), DateTime.Now.ToString(), "", igid, DateTime.Now.ToString(), DateTime.Now.ToString(), DateTime.Now.ToString(), "", "0"); #region Gửi email thông báo đến string emailhethong = SettingsExtension.GetSettingKey(SettingsExtension.KeyMailWebsite, lang); string emailkhac = SettingsExtension.GetSettingKey(SettingsExtension.KeyEmailPhu, lang); string[] listemail = emailkhac.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); string date = DateTime.Now.ToString(); string subject = LanguageItemExtension.GetnLanguageItemTitleByName("Thông báo từ") + " " + UrlExtension.WebisteUrl + " " + date; string body = @" <div style='font:bold 14px Arial;padding-bottom:15px'>" + LanguageItemExtension.GetnLanguageItemTitleByName("Xin chào! Bạn có một đơn đặt dịch vụ từ") + @" " + UrlExtension.WebisteUrl + @"</div> <div style='font:bold 12px Arial;padding-bottom:10px'>" + LanguageItemExtension.GetnLanguageItemTitleByName("Chi tiết") + @":</div> <ul> <li>" + LanguageItemExtension.GetnLanguageItemTitleByName("Họ tên") + @": " + name + @"</li> <li>" + LanguageItemExtension.GetnLanguageItemTitleByName("Điện thoại") + @": " + phone + @"</li> <li>" + LanguageItemExtension.GetnLanguageItemTitleByName("Email") + @": " + email + @"</li> <li>" + LanguageItemExtension.GetnLanguageItemTitleByName("Quốc tích") + @": " + nationality + @"</li> <li>" + LanguageItemExtension.GetnLanguageItemTitleByName("Gửi lúc") + @": " + DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss tt") + @"</li> <li>" + LanguageItemExtension.GetnLanguageItemTitleByName("Dịch vụ đăng ký") + @": " + service + @"</li> <li>" + LanguageItemExtension.GetnLanguageItemTitleByName("Nội dung") + @": " + content + @"</li> </ul>"; EmailExtension.SendEmail(emailhethong, subject, body, listemail); #endregion string[] strArrayReturn = { s }; Response.Write(js.Serialize(strArrayReturn)); }
private string GetListAdv(string igid, string cssImage) { string s = ""; DataTable dt = new DataTable(); dt = GroupsItems.GetAllData("", " * ", GroupsItemsTSql.GetItemsInGroupCondition( igid, ItemsTSql.GetItemsByIienable("1")), GroupsItemsColumns.IorderColumn); string href = ""; string target = ""; for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i][ItemsColumns.ViUrl].ToString() != "") { href = dt.Rows[i][ItemsColumns.ViUrl].ToString(); } else { href = "javascript://"; } if (dt.Rows[i][ItemsColumns.ViParams].ToString() == "1") { target = "target='_blank'"; } else { target = ""; } s += @" <div class='intro-head__img img fade-up'> <span class='img__crop'> <img alt='" + dt.Rows[i][ItemsColumns.ViTitle] + @"' src='" + UrlExtension.WebisteUrl + pic + "/" + dt.Rows[i][ItemsColumns.ViImage] + @"' /> </span> </div> <div class='intro-head__content fade-up '> <h3 class='ttl-comp02'> <span> " + dt.Rows[i][ItemsColumns.ViTitle] + @" </span> </h3> <p class='txtBase'> " + dt.Rows[i][ItemsColumns.ViSeoTitle] + @"</p> <a href='" + href + @"' " + target + @" title='" + dt.Rows[i][ItemsColumns.ViTitle] + @"' class='btn'>Xem thêm</a> </div>"; } return(s); }
void GetList() { condition = DataExtension.AndConditon ( GroupsItemsTSql.GetItemsInGroupCondition(igid, ItemsColumns.IienableColumn + "<>2"), ItemsTSql.GetItemsByViapp(app) ); orderby = ItemsColumns.IiorderColumn; DataTable dt = new DataTable(); dt = GroupsItems.GetAllData("", "*", condition, orderby); rptList.DataSource = dt; rptList.DataBind(); }
void GetNews(string order) { DdlListShowItem.SelectedValue = NumberShowItem; condition = DataExtension.AndConditon( "VIAPP = 'QLDDDV'", ItemsTSql.GetByLang(language)); condition += " AND IIENABLE <> '2' "; if (tbKeySearch.Text.Length > 0) { condition += " AND " + SearchTSql.GetSearchMathedCondition(tbKeySearch.Text, ItemsColumns.ViauthorColumn); } if (tbTitleSearch.Text.Length > 0) { condition += " AND " + SearchTSql.GetSearchMathedCondition(tbTitleSearch.Text, ItemsColumns.VititleColumn); } if (order.Length > 0) { orderBy = order; } else { orderBy = CookieExtension.GetCookiesSort(sortCookiesName); if (orderBy.Length < 1) { orderBy = " DCREATEDATE DESC "; } } DataSet ds = new DataSet(); ds = GroupsItems.GetAllDataPagging(p, DdlListShowItem.SelectedValue, condition, orderBy); DataTable dt = new DataTable(); dt = ds.Tables[1]; string key = tbKeySearch.Text + "&name=" + tbTitleSearch.Text; LtPagging.Text = PagingExtension.SpilitPages(Convert.ToInt32(dt.Rows[0]["TotalRows"]), Convert.ToInt16(NumberShowItem), Convert.ToInt32(p), LinkAdmin.UrlAdmin(CodeApplications.Service, "QuanLyDonDatDichVu", "", key, NumberShowItem), "currentPS", "otherPS", "firstPS", "lastPS", "previewPS", "nextPS"); LtPaggingTop.Text = LtPagging.Text; rp_mn_users.DataSource = ds.Tables[0]; rp_mn_users.DataBind(); }
private static string GetCateOfBlog(string iid) { string condition = DataExtension.AndConditon( GroupsTSql.GetByApp(TatThanhJsc.BlogModul.CodeApplications.Blog), ItemsTSql.GetById(iid) ); DataTable dt = GroupsItems.GetAllData("1", "*", condition, ""); if (dt.Rows.Count > 0) { return("<a href='" + (UrlExtension.WebisteUrl + dt.Rows[0][GroupsColumns.VGSEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower() + @"' title='" + dt.Rows[0][GroupsColumns.VgnameColumn] + @"'>" + dt.Rows[0][GroupsColumns.VgnameColumn] + @"</a>"); } return(""); }
void GetVotes() { top = ""; fields = " * "; condition = DataExtension.AndConditon("VGAPP = '" + app + "'", GroupsTSql.GetGroupsByVglang(language)); orderBy = " DCREATEDATE DESC "; DataTable dt = new DataTable(); dt = GroupsItems.GetAllData(top, fields, condition, orderBy); rp_mn_users.DataSource = dt; rp_mn_users.DataBind(); }
private string GetList(string igid, string maxRow) { string condition = DataExtension.AndConditon( ItemsTSql.GetItemsByIienable("1"), ItemsTSql.GetItemsByViapp(app), ItemsTSql.GetItemsByVilang(lang), GroupsItemsTSql.GetItemsInGroupCondition(igid, "") ); string orderby = ItemsColumns.IiorderColumn + "," + ItemsColumns.DicreatedateColumn + " desc "; DataTable dt = GroupsItems.GetAllData(maxRow, "*", condition, orderby); return(BindItemsToHTML(dt)); }
void GetTitleItem() { fields = TatThanhJsc.Extension.DataExtension.GetListColumns(TatThanhJsc.Columns.ItemsColumns.VititleColumn, TatThanhJsc.Columns.ItemsColumns.DicreatedateColumn); condition = ItemsTSql.GetItemsByIid(iid); DataTable dt = new DataTable(); dt = GroupsItems.GetAllData(top, fields, condition, orderBy); if (dt.Rows.Count > 0) { LtTitlePage.Text = dt.Rows[0]["VITITLE"].ToString(); lt_cate_name.Text = @" <div class='TitleItem'>Tên album: " + dt.Rows[0]["VITITLE"].ToString() + @"</div> <div>Ngày đăng: " + TatThanhJsc.Extension.TimeExtension.FormatTime(dt.Rows[0][TatThanhJsc.Columns.ItemsColumns.DicreatedateColumn], "dd/MM/yyyy") + @"</div>"; } }
private string GetListAdv(string igid, string cssImage) { string s = ""; DataTable dt = new DataTable(); dt = GroupsItems.GetAllData("", " * ", GroupsItemsTSql.GetItemsInGroupCondition( igid, ItemsTSql.GetItemsByIienable("1")), GroupsItemsColumns.IorderColumn); string href = ""; string target = ""; for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i][ItemsColumns.ViUrl].ToString() != "") { href = dt.Rows[i][ItemsColumns.ViUrl].ToString(); } else { href = "javascript://"; } if (dt.Rows[i][ItemsColumns.ViParams].ToString() == "1") { target = "target='_blank'"; } else { target = ""; } s += @" <div class='list-foods__item fade-up " + (i > 7?"hide":"") + @"'> <div class='img'> <a href='" + href + @"' " + target + @" title='" + dt.Rows[i][ItemsColumns.ViTitle] + @"' class='img__crop'> <img alt='" + dt.Rows[i][ItemsColumns.ViTitle] + @"' src='" + UrlExtension.WebisteUrl + pic + "/" + dt.Rows[i][ItemsColumns.ViImage] + @"' /> </a> </div> <h3 class='list-foods__ttl'> <a href='" + href + @"' " + target + @" title='" + dt.Rows[i][ItemsColumns.ViTitle] + @"'>" + dt.Rows[i][ItemsColumns.ViTitle] + @"</a> </h3> </div>"; } return(s); }
protected void rp_mn_users_ItemCommand(object source, RepeaterCommandEventArgs e) { string c = e.CommandName.Trim(); string p = e.CommandArgument.ToString().Trim(); fields = "*"; condition = ItemsTSql.GetItemsCondition(p, app); switch (c) { #region Delete case "delete": string[] fieldsDelItem = { "IIENABLE", ItemsColumns.DiupdateColumn }; string[] valuesDelItem = { "2", "'" + DateTime.Now.ToString() + "'" }; Items.UpdateItems(DataExtension.UpdateTransfer(fieldsDelItem, valuesDelItem), condition); GetService(""); break; #endregion #region Edit Enable case "EditEnable": DataTable dt = new DataTable(); dt = GroupsItems.GetAllData(top, fields, condition, orderBy); string[] fieldsEnable = { "IIENABLE" }; string[] valuesEnable = { "" }; if (dt.Rows[0]["IIENABLE"].ToString().Equals("0")) { valuesEnable[0] = "1"; Items.UpdateItems(DataExtension.UpdateTransfer(fieldsEnable, valuesEnable), condition); } else { valuesEnable[0] = "0"; Items.UpdateItems(DataExtension.UpdateTransfer(fieldsEnable, valuesEnable), condition); } GetService(""); break; #endregion #region Edit case "edit": Response.Redirect(LinkUpdate(p)); break; #endregion } }
protected void btnadd_Click(object sender, EventArgs e) { int[] iidArry = new int[lstnotadded.Rows + 1]; iidArry = lstnotadded.GetSelectedIndices(); if (iidArry.Length > 0) { for (int i = 0; i < iidArry.Length; i++) { GroupsItems.InsertGroupsItems(igid, lstnotadded.Items[iidArry[i]].Value, "", DateTime.Now.ToString(), DateTime.Now.ToString(), DateTime.Now.ToString(), ""); } lstnotadded.Items.Clear(); lstadded.Items.Clear(); GetListItem(ddlTagModul.SelectedValue); } }
private void GetGroupsInfoByItemId(string iid, string viapp) { string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVgapp(viapp), GroupsTSql.GetGroupsByVglang(lang), ItemsTSql.GetItemsByIid(iid) ); DataTable dt = GroupsItems.GetAllData("1", "groups.*", condition, ""); if (dt.Rows.Count > 0) { Session["dataByTitle_Cate"] = dt; Session["igid"] = dt.Rows[0][GroupsColumns.IgidColumn].ToString(); } }
void GetItems() { top = "10"; fields = "*"; condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app) + " AND IGENABLE <> '2' AND IIENABLE <> '2' ", ItemsTSql.GetItemsByVilang(language)); orderBy = ItemsColumns.IitotalviewColumn + " desc"; DataTable dt = new DataTable(); dt = GroupsItems.GetAllData(top, fields, condition, orderBy); if (dt.Rows.Count > 0) { RpItems.DataSource = dt; RpItems.DataBind(); } }
protected void btnadd_Click(object sender, EventArgs e) { if (lstadded.SelectedValue.Equals("")) { LtMes.Visible = false; GroupsItems.InsertGroupsItems(lstnotadded.SelectedValue, iid, "", DateTime.Now.ToString(), DateTime.Now.ToString(), DateTime.Now.ToString(), ""); lstnotadded.Items.Clear(); lstadded.Items.Clear(); GetGroupsPhotoAlbum(); } else { LtMes.Visible = true; LtMes.Text = "<div class='MesText'>Album đã trong nhóm <b>" + GroupsExtension.GetNameCategoryById(lstadded.SelectedValue) + "</b></div>"; return; } }
private string GetList(string id, string top) { var s = string.Empty; string fields = "*", condition = "", orderby = ""; int rows = 6; try { rows = int.Parse(top); } catch { } condition = DataExtension.AndConditon( ItemsTSql.GetByEnable("1"), ItemsTSql.GetByApp(app) ); condition = GroupsItemsTSql.GetItemsInGroupCondition(id, condition); orderby = GroupsItemsColumns.IorderColumn; DataTable dt = GroupsItems.GetAllData(rows.ToString(), fields, condition, orderby); if (dt.Rows.Count > 0) { s = ""; string link = "", titleItem = "", desc = "", img = "", dateIT = "", countView = "", listOrther = ""; for (int i = 0; i < dt.Rows.Count; i++) { link = (UrlExtension.WebisteUrl + dt.Rows[i][ItemsColumns.VISEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower(); titleItem = dt.Rows[i][ItemsColumns.VititleColumn].ToString(); img = ImagesExtension.GetImage(pic, dt.Rows[i][ItemsColumns.ViimageColumn].ToString(), titleItem, "", true, false, "", false); desc = dt.Rows[i][ItemsColumns.VidescColumn].ToString(); dateIT = ((DateTime)dt.Rows[i][ItemsColumns.DicreatedateColumn]).ToString("dd/MM/yyyy"); countView = NumberExtension.FormatNumber((int.Parse(dt.Rows[i][ItemsColumns.IitotalviewColumn].ToString())).ToString()); s += @" <div class='list-news03__item fade-up'> <div class='list-news03__img img'> <a class='img__crop' href='" + link + "' title='" + titleItem + @"'> " + img + @"</a> </div> <div class='list-news03__content'> <h3 class='list-news03__ttl'><a href='" + link + "' title='" + titleItem + @"'>" + titleItem + @"</a></h3> </div> </div>"; } } return(s); }
void GetProductGroups(string IgidInDll) { string iid_inListAdded = ""; fields = " * "; condition = GroupsItemsTSql.GetGroupsItemsByIgid(igid); DataTable dtProductInCate = new DataTable(); dtProductInCate = GroupsItems.GetAllData(top, fields, condition, " IORDER ASC, DCREATEDATE DESC "); if (dtProductInCate.Rows.Count > 0) { for (int i = 0; i < dtProductInCate.Rows.Count; i++) { lstadded.Items.Add(new ListItem(dtProductInCate.Rows[i]["VITITLE"].ToString(), dtProductInCate.Rows[i]["IID"].ToString())); iid_inListAdded += dtProductInCate.Rows[i]["IID"].ToString(); if (i != (dtProductInCate.Rows.Count - 1)) { iid_inListAdded += ","; } } } DataTable dt = new DataTable(); string conditionItem = ""; conditionItem = DataExtension.AndConditon(GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(Modul), ItemsTSql.GetItemsByViapp(Modul)); if (!iid_inListAdded.Equals("")) { conditionItem += "and ITEMS.IID not in(" + iid_inListAdded + ")"; } if (!IgidInDll.Equals("")) { conditionItem += " AND " + GroupsItemsTSql.GetItemsInGroupCondition(IgidInDll, "") + " "; } //conditionItem += " AND IGENABLE <> '2' AND IIENABLE <> '2' "; conditionItem += " AND IGENABLE <> '2' AND (IIENABLE = '1' OR IIENABLE = '0') "; dt = GroupsItems.GetAllData("", "*", conditionItem, " IORDER ASC, DCREATEDATE DESC "); for (int i = 0; i < dt.Rows.Count; i++) { lstnotadded.Items.Add(new ListItem(dt.Rows[i]["VITITLE"].ToString(), dt.Rows[i]["IID"].ToString())); } }
protected void btnremove_Click(object sender, EventArgs e) { if (lstnotadded.SelectedValue.Equals("")) { LtMes.Visible = false; condition = " IGID = " + lstadded.SelectedValue + " AND IID = " + iid + " "; GroupsItems.DeleteGroupsItems(condition); lstnotadded.Items.Clear(); lstadded.Items.Clear(); GetGroupsPhotoAlbum(); } else { LtMes.Visible = true; LtMes.Text = "<div class='MesText'>Album này chưa trong nhóm <b>" + GroupsExtension.GetNameCategoryById(lstnotadded.SelectedValue) + "</b></div>"; return; } }
void GetNicks() { if (DealConfig.KeyHienThiAddNickChoDeal) { fields = "*"; condition = DataExtension.AndConditon ( GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.OtherModul.CodeApplications.SupportOnline), ItemsTSql.GetItemsByIienable("1") ); orderBy = " Groups.igid asc, " + GroupsItemsColumns.IorderColumn + " asc "; DataTable dt = new DataTable(); dt = GroupsItems.GetAllData("", fields, condition, orderBy); rptNicks.DataSource = dt; rptNicks.DataBind(); } }
/// <summary> /// Hiện thị các tag cho 1 blog /// </summary> /// <param name="iid"></param> /// <returns></returns> private static string ShowTags(string iid) { string s = ""; string condition = DataExtension.AndConditon( GroupsItemsTSql.GetGroupsItemsByIid(iid), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.OtherModul.CodeApplications.Tag)); DataTable dt = GroupsItems.GetAllData("", "groups.*", condition, GroupsColumns.IgorderColumn); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { s += "<a href='" + (UrlExtension.WebisteUrl + RewriteExtension.Tag + "/" + dt.Rows[i][GroupsColumns.VGSEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower() + "' title='" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"'>" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"</a>, "; } s = s.Remove(s.Length - ", ".Length); } return(s); }
private string GetListAdv(string igid, string cssImage) { string s = ""; DataTable dt = new DataTable(); dt = GroupsItems.GetAllData("", " * ", GroupsItemsTSql.GetItemsInGroupCondition( igid, ItemsTSql.GetItemsByIienable("1")), GroupsItemsColumns.IorderColumn); string href = ""; string target = ""; for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i][ItemsColumns.ViUrl].ToString() != "") { href = dt.Rows[i][ItemsColumns.ViUrl].ToString(); } else { href = "javascript://"; } if (dt.Rows[i][ItemsColumns.ViParams].ToString() == "1") { target = "target='_blank'"; } else { target = ""; } s += @" <li class='img'> <span class='img__crop'> <img alt='" + dt.Rows[i][ItemsColumns.ViTitle] + @"' src='" + UrlExtension.WebisteUrl + pic + "/" + dt.Rows[i][ItemsColumns.ViImage] + @"' /> </span> </li>"; } return(s); }
private void CheckOtherIgid(string iid) { DataTable dt = GroupsItems.GetGroupsItems("", GroupsItemsColumns.IgidColumn, GroupsItemsTSql.GetGroupsItemsByIid(iid), ""); string listigid = ","; for (int i = 0; i < dt.Rows.Count; i++) { listigid += dt.Rows[i][GroupsColumns.IgidColumn].ToString() + ","; } //hdIgid.Value = listigid; foreach (ListItem item in cbListCates.Items) { if (listigid.IndexOf("," + item.Value + ",") > -1) { item.Selected = true; } } }
private void LoadList() { lbListItem.Items.Clear(); DataTable dt = new DataTable(); if (ddlCateSource.SelectedValue.Length > 0) { condition = DataExtension.AndConditon( GroupsItemsTSql.GetItemsInGroupCondition(ddlCateSource.SelectedValue, ItemsTSql.GetItemsByIienable("1"), ddlWebSource.SelectedValue), ItemsTSql.GetItemsByViapp(ddlModulSource.SelectedValue) ); dt = GroupsItems.GetAllData("", "*", condition, ItemsColumns.VititleColumn, ddlWebSource.SelectedValue); } for (int i = 0; i < dt.Rows.Count; i++) { lbListItem.Items.Add(new ListItem(dt.Rows[i][ItemsColumns.VititleColumn].ToString(), dt.Rows[i][ItemsColumns.IidColumn].ToString())); } }
void LayDanhSachTour(string igid, string iid) { string condition = DataExtension.AndConditon( GroupsItemsTSql.GetItemsInGroupCondition(igid, ""), GroupsTSql.GetGroupsByVglang(lang), GroupsTSql.GetGroupsByIgenable("1"), ItemsTSql.GetItemsByIienable("1"), ItemsTSql.GetItemsByViapp(TatThanhJsc.TourModul.CodeApplications.Tour)); string orderby = ItemsColumns.IiorderColumn + "," + ItemsColumns.DicreatedateColumn + " desc "; DataTable dt = GroupsItems.GetAllData("", " * ", condition, orderby); for (int i = 0; i < dt.Rows.Count; i++) { ddlChuyenDi.Items.Add(new ListItem(dt.Rows[i][ItemsColumns.VititleColumn].ToString(), dt.Rows[i][ItemsColumns.IidColumn].ToString())); } ddlChuyenDi.SelectedValue = iid; }
protected void btnremove_Click(object sender, EventArgs e) { int[] iidArry = new int[lstadded.Rows + 1]; iidArry = lstadded.GetSelectedIndices(); if (iidArry.Length > 0) { string listIID = ""; for (int i = 0; i < iidArry.Length; i++) { listIID += lstadded.Items[iidArry[i]].Value + ","; } listIID = listIID.Substring(0, listIID.Length - 1); condition = "IGID = '" + igid + "' AND IID in (" + listIID + ") "; GroupsItems.DeleteGroupsItems(condition); lstnotadded.Items.Clear(); lstadded.Items.Clear(); GetListItem(ddlTagModul.SelectedValue); } }