protected void btnYes_Click(object sender, EventArgs e)
 {
     try
     {
         PipingSpecGridView.DeleteRow(PipingSpecGridView.SelectedIndex);
         Master.ShowMessage("Row deleted!");
     }
     catch (Exception ex)
     {
         Master.ShowWarn(ex.Message);
     }
 }
Exemplo n.º 2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        VIEW_PIP_FAB_SHOPTableAdapter items = new VIEW_PIP_FAB_SHOPTableAdapter();

        try
        {
            items.InsertQuery(decimal.Parse(Session["PROJECT_ID"].ToString()), decimal.Parse(txtSubconID.Text),
                              txtShopNo.Text, txtSubconName.Text, decimal.Parse(ddSubcon.SelectedValue.ToString()));
            PipingSpecGridView.DataBind();
            Master.ShowMessage("Saved!");
        }
        catch (Exception ex)
        {
            Master.ShowWarn(ex.Message);
        }
        finally
        {
            items.Dispose();
        }
    }