Exemplo n.º 1
0
 protected void gvQuotation_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "EditQuotation")
     {
         ID = Convert.ToInt32(e.CommandArgument);
         try
         {
             BindQuotationToUpdate();
         }
         catch (Exception exc)
         {
             ShowMessage(ref lblMessage, MessageType.Danger, exc.Message);
             lblMessage.Visible = true;
         }
     }
     if (e.CommandName == "DeleteQuotation")
     {
         client.DeleteQuotation(Convert.ToInt32(e.CommandArgument), UserName);
         bindQoutationList();
     }
     if (e.CommandName == "PrintQuotation")
     {
         ID = Convert.ToInt32(e.CommandArgument);
         try
         {
             PrintQuotation();
         }
         catch (Exception exc)
         {
             ShowMessage(ref lblMessage, MessageType.Danger, exc.Message);
             lblMessage.Visible = true;
         }
     }
 }