void S_Update()
        {
            string req = "update reclam "
                         + " set mat_op = '" + this.CB_Op.SelectedValue + "', "
                         + " Etat = 2, "
                         + " Date_maj = GETDATE() "
                         + " where id_reclam= " + Convert.ToInt32(Session["id_reclam"]);

            Class1.Executer_Cmd(req, this.lbl_Error);
            if (this.lbl_Error.Text == "")
            {
                this.AdminPopup.Hide();
                S_Source();
            }
        }
        void S_Delete()
        {
            string req = "delete from reclam where "
                         + "id_reclam= " + Session["id_reclam"];

            Class1.Executer_Cmd(req, e_msg);
            if (e_msg.Text != "")
            {
                this.e_msg.Visible = true;
            }
            else
            {
                Alimenter_Grid();
                this.Popup.Hide();
            }
        }
示例#3
0
        void S_Update()
        {
            string titre       = this.txtTitre.Text.Replace("'", " ");
            string Description = this.txtDesc.Text.Replace("'", " ");

            string req = "update reclam "
                         + " set Titre = '" + titre + "', "
                         + " Description = '" + Description + "', "
                         + " type_prob = " + this.cbType.SelectedValue + ", "
                         + " Date_maj = GETDATE() "
                         + " where id_reclam= " + Convert.ToInt32(Session["id_reclam"]);

            Class1.Executer_Cmd(req, this.lblError);
            if (this.lblError.Text == "")
            {
                Response.Redirect("user_lst_reclamations.aspx");
            }
        }
示例#4
0
        void s_insert()
        {
            int mat_user = Convert.ToInt32(Session["mat_user"]);

            // proc_add_reclam_user (@matuser int, @Titre varchar(900), @Type_Prob int, @Desc varchar(4000))
            //string Req = "Exec proc_add_reclam_user " + mat_user + ", '" + titre + "', " + this.cbType.SelectedValue + ", '" + Desc + "'";

            string Req = "Insert into Reclam(mat_user, type_prob, titre, Description,"
                         + " Date_creation, Date_maj, Etat) "
                         + "Values (" + mat_user + ", "
                         + this.cbType.SelectedValue + ", '"
                         + this.txtTitre.Text + "' , '"
                         + this.txtDesc.Text + "' ,"
                         + "GetDate(), GetDate(), 1 )";

            Class1.Executer_Cmd(Req, this.lblError);
            if (this.lblError.Text == "")
            {
                Response.Redirect("user_lst_reclamations.aspx");
            }
        }