Ejemplo n.º 1
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            tbl_WorkShop Wp = new tbl_WorkShop();

            Wp.WorkShopTitle    = txtWorkShopTitle.Text;
            Wp.WorkShopDate     = DateTime.Parse(txtWorkShopDate.Text);
            Wp.WorkShopDuration = txtWorkShopDuration.Text;
            Wp.WorkShopTopics   = txtWorkShopTopics.Text;
            WorkShopBusiness Wb = new WorkShopBusiness();
            int id = int.Parse(gridviewWorkShop.SelectedValue.ToString());

            Wb.UpdateWorkShopById(Wp, id);
            GetWorkShops();
        }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        tbl_WorkShop Wp = new tbl_WorkShop();

        Wp.WorkShopTitle    = txtWorkShopTitle.Text;
        Wp.WorkShopDate     = DateTime.Parse(txtWorkShopDate.Text);
        Wp.WorkShopTopics   = txtWorkShopTopics.Text;
        Wp.WorkShopDuration = txtWorkShopDuration.Text;

        WorkShopBusiness WB = new WorkShopBusiness();
        int id = int.Parse(GridView1.SelectedValue.ToString());

        if (WB.UpdateWorkShopById(Wp, id))
        {
            lblMessage.Text = "Updated Successfully";
            ClearData();
        }
        GetWorkShops();
    }