Esempio n. 1
0
    protected string GetImageItem(string iLanguageKeyId)
    {
        top       = "1";
        fields    = LanguageItemColumns.nLanguageItemParams;;
        condition = DataExtension.AndConditon(LanguageItemTSql.GetByiLanguageKeyId(iLanguageKeyId),
                                              LanguageItemTSql.GetByiLanguageNationalId(language));
        order = "";
        DataTable dt = new DataTable();

        dt = LanguageItem.GetLanguageItem(top, fields, condition, order);
        string s = "";

        if (dt.Rows.Count > 0)
        {
            if (dt.Rows[0][LanguageItemColumns.nLanguageItemParams].ToString().Length > 0)
            {
                s = "<img src='" + UrlExtension.WebisteUrl + FolderPic.Language + "/" + dt.Rows[0][LanguageItemColumns.nLanguageItemParams].ToString() + "' class='anhtukhoa' id='img" + iLanguageKeyId + "'/>";
            }
            else
            {
                s = "<img src='" + UrlExtension.WebisteUrl + "pic/icon/no_image.gif' class='anhtukhoa' id='img" + iLanguageKeyId + "'/>";
            }
        }
        else
        {
            s = "<img src='" + UrlExtension.WebisteUrl + "pic/icon/no_image.gif' class='anhtukhoa' id='img" + iLanguageKeyId + "'/>";
        }
        return(s);
    }
Esempio n. 2
0
    private void DeleteLanguageItemImage(string iLanguageKeyId)
    {
        condition = DataExtension.AndConditon(LanguageItemTSql.GetByiLanguageKeyId(iLanguageKeyId));
        DataTable dt = new DataTable();

        dt = LanguageItem.GetLanguageItem("", LanguageItemColumns.nLanguageItemParams, condition, "");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            ImagesExtension.DeleteImageWhenDeleteItem(FolderPic.Language, dt.Rows[i][LanguageItemColumns.nLanguageItemParams].ToString());
        }
    }
Esempio n. 3
0
    string SetCountItem(string iLanguageKeyId)
    {
        top       = "1";
        fields    = " * ";
        condition = DataExtension.AndConditon(LanguageItemTSql.GetByiLanguageKeyId(iLanguageKeyId),
                                              LanguageItemTSql.GetByiLanguageNationalId(language));
        order = "";
        DataTable dt = new DataTable();

        dt = LanguageItem.GetLanguageItem(top, fields, condition, order);
        return(dt.Rows.Count.ToString());
    }
Esempio n. 4
0
    void LoadInfo()
    {
        top       = "1";
        fields    = LanguageItemColumns.nLanguageItemParams;
        condition = DataExtension.AndConditon(LanguageItemTSql.GetByiLanguageKeyId(iLanguageKeyId),
                                              LanguageItemTSql.GetByiLanguageNationalId(language));
        order = "";
        DataTable dt = new DataTable();

        dt = LanguageItem.GetLanguageItem(top, fields, condition, order);
        if (dt.Rows.Count > 0)
        {
            hdOldImage.Value = dt.Rows[0][LanguageItemColumns.nLanguageItemParams].ToString();
            hdUpdate.Value   = "1";
            ltrImage.Text    = ImagesExtension.GetImage(folderpic, hdOldImage.Value, "", "", false, false, "");
        }
    }
Esempio n. 5
0
    protected string GetWordItem(string iLanguageKeyId)
    {
        top       = "1";
        fields    = " * ";
        condition = DataExtension.AndConditon(LanguageItemTSql.GetByiLanguageKeyId(iLanguageKeyId),
                                              LanguageItemTSql.GetByiLanguageNationalId(language));
        order = "";
        DataTable dt = new DataTable();

        dt = LanguageItem.GetLanguageItem(top, fields, condition, order);
        string s = "";

        if (dt.Rows.Count > 0)
        {
            s = dt.Rows[0]["nLanguageItemTitle"].ToString();
        }
        return(s);
    }