Beispiel #1
0
 protected void gvBillingCodes_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         if (e.CommandName == "EditBillingCode")
         {
             hfCurrentID.Value = e.CommandArgument.ToString();
             ucEditBillingCode.Popup(e.CommandArgument.ToString());
         }
         else if (e.CommandName == "ToggleBillingCode")
         {
             hfCurrentID.Value = e.CommandArgument.ToString();
             SettingsDAL settingsDAL = new SettingsDAL();
             if (((LinkButton)e.CommandSource).Text == "Inactive")
             {
                 settingsDAL.ToggleBillingCode(int.Parse(e.CommandArgument.ToString()), true);
             }
             else
             {
                 settingsDAL.ToggleBillingCode(int.Parse(e.CommandArgument.ToString()), false);
             }
             BindBillingCodes();
         }
     }
     catch (Exception ex)
     {
         string strErrCode = ERROR_DISPLAY_MESSAGE + "," + (new Error_Log()).LogErrorIntoDB(ex, "gvBillingCodes_RowCommand");
         lblErr.Text = strErrCode;
     }
 }