Ejemplo n.º 1
0
        protected void show()
        {
            LabelNoComent.Visible = false;

            string        connectionString1 = WebConfigurationManager.ConnectionStrings["MyDbConn"].ConnectionString;
            SqlConnection SqlConnectionGL   = new SqlConnection(connectionString1);

            SqlConnectionGL.Open();

            string projectID5;

            projectID5 = getId();

            string projectname;

            projectname = getProjectName();

            LabelName.Text = "Comments on the phrase " + Session["notphrasedev"].ToString() + ", in the " + Session["notlangdev"].ToString() + " language, from the " + projectname + " project:";

            SqlCommandGL.CommandText = "SELECT * FROM tblComents WHERE Phrase = @Phrase AND TranslationLanguage = @TranslationLanguage AND ProjectID=@ProjectID ORDER BY ComentDate DESC";
            SqlCommandGL.Parameters.AddWithValue("@Phrase", Session["notphrasedev"].ToString());
            SqlCommandGL.Parameters.AddWithValue("@TranslationLanguage", Session["notlangdev"].ToString());
            SqlCommandGL.Parameters.AddWithValue("@ProjectID", projectID5);
            SqlCommandGL.Connection        = SqlConnectionGL;
            SqlDataAdapterGL.SelectCommand = SqlCommandGL;
            SqlDataAdapterGL.Fill(dataSetGL, "Coment");
            RepeaterComents.DataSource = dataSetGL;
            RepeaterComents.DataBind();

            if (dataSetGL.Tables[0].Rows.Count == 0)
            {
                LabelNoComent.Visible = true;
            }
        }
Ejemplo n.º 2
0
        protected void show()
        {
            LabelNoComent.Visible = false;

            string        connectionString1 = WebConfigurationManager.ConnectionStrings["MyDbConn"].ConnectionString;
            SqlConnection SqlConnectionGL   = new SqlConnection(connectionString1);

            SqlConnectionGL.Open();

            string projectID5;

            projectID5 = getId();

            SqlCommandGL.CommandText = "SELECT * FROM tblComents WHERE Phrase = @Phrase AND TranslationLanguage = @TranslationLanguage AND ProjectID=@ProjectID ORDER BY ComentDate DESC";
            SqlCommandGL.Parameters.AddWithValue("@Phrase", DropDownListPhrases.SelectedValue);
            SqlCommandGL.Parameters.AddWithValue("@TranslationLanguage", DropDownListTransLanguages.SelectedValue);
            SqlCommandGL.Parameters.AddWithValue("@ProjectID", projectID5);
            SqlCommandGL.Connection        = SqlConnectionGL;
            SqlDataAdapterGL.SelectCommand = SqlCommandGL;
            SqlDataAdapterGL.Fill(dataSetGL, "Coment");
            RepeaterComents.DataSource = dataSetGL;
            RepeaterComents.DataBind();

            if (dataSetGL.Tables[0].Rows.Count == 0)
            {
                LabelNoComent.Visible = true;
            }
        }