Example #1
0
        public void DeleteMainRow()
        {
            var res = MessageBox.Show("Are You To Delete SelectedRecords From Database ?", "Delete",
                                      MessageBoxButton.OKCancel);

            if (res == MessageBoxResult.OK)
            {
                if (SelectedMainRow.Iserial != 0)
                {
                    if (AllowDelete != true)
                    {
                        MessageBox.Show(strings.AllowDeleteMsg);
                        return;
                    }
                    Loading = true;
                    Glclient.DeleteTblCostCenterRouteGroupAsync(
                        (TblCostCenterRouteGroup) new TblCostCenterRouteGroup().InjectFrom(SelectedMainRow), 0, LoggedUserInfo.DatabasEname);
                }
                else
                {
                    SelectedMainRow = new TblCostCenterRouteGroupViewModel();
                }
            }
        }