Exemple #1
0
        // Helper method to validate record details
        private bool ValidateRecord(SupplierCl record)
        {
            string validationErrors = string.Empty;
            bool   hasErrors        = false;

            if (string.IsNullOrWhiteSpace(record.SupName))
            {
                hasErrors        = true;
                validationErrors = "Role Name must not be empty\n";
            }

            this.LastError = validationErrors;
            return(!hasErrors);
        }
Exemple #2
0
 // Utility method for copying the details of a record
 private void CopyRecord(SupplierCl source, SupplierCl destination)
 {
     destination.SupID   = source.SupID;
     destination.SupName = source.SupName;
 }
Exemple #3
0
 private void Edit()
 {
     this.oldRecord = new SupplierCl();
     this.CopyRecord(this.Current, this.oldRecord);
     this.IsEditing = true;
 }