public override void SaveRecord(SavingParemeter Paras) { DAL.tblEmployeeWIBAClass SaveModel = null; if (Paras.SavingInterface == SavingParemeter.eSavingInterface.AddNew || EditRecordDataSource == null) { SaveModel = new DAL.tblEmployeeWIBAClass(); } else { SaveModel = DALObject.FindSaveModelByPrimeKey(((EmployeeWIBAClassEditListModel)EditRecordDataSource).EmployeeWIBAClassID); if (SaveModel == null) { Paras.SavingResult = new SavingResult(); Paras.SavingResult.ExecutionResult = eExecutionResult.ValidationError; Paras.SavingResult.ValidationError = "Can not edit. Selected record not found, it may be deleted by another user."; return; } } SaveModel.EmployeeWIBAClassName = txtEmployeeWIBAClassName.Text; //SaveModel.ISDCode = txtISDCode.Text; Paras.SavingResult = DALObject.SaveNewRecord(SaveModel); base.SaveRecord(Paras); }
public override void FillSelectedRecordInContent(object RecordToFill) { EmployeeWIBAClassEditListModel EditingRecord = (EmployeeWIBAClassEditListModel)RecordToFill; DAL.tblEmployeeWIBAClass SaveModel = DALObject.FindSaveModelByPrimeKey(EditingRecord.EmployeeWIBAClassID); if (SaveModel == null) { return; } txtEmployeeWIBAClassName.Text = SaveModel.EmployeeWIBAClassName; }