Exemple #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Gen_Comment_Sp   sp   = new Gen_Comment_Sp();
        Gen_Comment_Info info = new Gen_Comment_Info();

        info.Comentator   = txtcomntatr.Text;
        info.Comment_Date = DateTime.Parse(System.DateTime.Now.ToShortDateString());
        info.Comment_Text = txtcomment.Text;
        info.Comment_Time = DateTime.Parse(System.DateTime.Now.ToShortTimeString());
        if (RadioButton1.Checked == true)
        {
            info.Comment_Type = 1;
        }
        else if (RadioButton2.Checked == true)
        {
            info.Comment_Type = 2;
        }
        info.Rate = 1;


        sp.Add_Comment(info);
        txtcomment.Text      = "";
        txtcomntatr.Text     = "";
        RadioButton1.Checked = true;
    }
Exemple #2
0
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        RepeaterItem it = e.Item;

        Gen_Comment_Sp sp = new Gen_Comment_Sp();

        sp.Rate_Comment(int.Parse(e.CommandArgument.ToString()));
    }