private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            CommissionView comView = dgvCommission.SelectedItem as CommissionView;

            if (comView != null)
            {
                int id = Convert.ToInt32(comView.ID);
                if (id != 0)
                {
                    CommissionModel com = getCommissionModel(id);
                    com.ServiceTypeModel = getServiceTypeModel(Convert.ToInt32(com.ServiceTypeID));
                    com.IfEditDetails    = true;

                    CommissionDetails cd = new CommissionDetails(this, com);
                    cd.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("No record selected!");
            }
        }
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            CommissionDetails std = new CommissionDetails(this);

            std.ShowDialog();
        }