private void CommissionLineEditExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     int id = e.Parameter is int ? (int) e.Parameter : 0;
     if (id != 0)
     {
         var cld = new CommissionLineDetail(id, PageMode.EditMode, VM.AllCommissionLineList,
                                            VM.AddCommissionLineList, VM.UpdateCommissionLineList,
                                            VM.IsDefault, VM.SelectInternalCustomerID, 0);
         cld.ShowDialog();
         Refresh();
     }
 }
 private void Button1Click(object sender, RoutedEventArgs e)
 {
     if (VM.ValidateAdd())
     {
         var cld = new CommissionLineDetail(PageMode.AddMode, VM.AllCommissionLineList,
                                            VM.AddCommissionLineList, VM.IsDefault,
                                            VM.SelectInternalCustomerID, 0);
         cld.ShowDialog();
         Refresh();
     }
 }
 private void Button1Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (CDVM.ValidateAdd())
         {
             var cld = new CommissionLineDetail(PageMode.AddMode, CDVM.AllCommissionLineList,
                                                CDVM.AddCommissionLineList, CDVM.IsDefault,
                                                CDVM.SelectInternalCustomerID, CDVM.CustomerID);
             cld.ShowDialog();
             Refresh();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ErrorMsgManager.GetClientErrMsg(ex, CultureManager.UICulture));
     }
 }