public void Update(HPS.BLL.StopFeeBLL.BLLStopFee_T businessObject, HPS.BLL.StopFeeBLL.BLLStopFee_TKeys businessObjectKey) { try { if (businessObject.StopFeeID_int == businessObjectKey.StopFeeID_int) { if (businessObject.IsValid(Hepsa.Core.Validation.ValidationExceptionType.Except, "UniqueStopFeeID_int") == false) { throw new Hepsa.Core.Validation.InvalidBusinessObjectException(businessObject.BrokenRulesList().ToString()); } } else { if (businessObject.IsValid() == false) { throw new Hepsa.Core.Validation.InvalidBusinessObjectException(businessObject.BrokenRulesList().ToString()); } } _dataObject.Update(businessObject, businessObjectKey); } catch (System.Exception ex) { throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this); } }
private void DeleteButton_Click(object sender, EventArgs e) { HPS.BLL.StopFeeBLL.BLLStopFee_TFactory StopFeeFactory = new HPS.BLL.StopFeeBLL.BLLStopFee_TFactory(); try { if (Hepsa.Core.Common.MessageBox.ConfirmDeleteMessage() == false) { return; } HPS.BLL.StopFeeBLL.BLLStopFee_TFactory StopFee_TFactory = new HPS.BLL.StopFeeBLL.BLLStopFee_TFactory(); HPS.BLL.StopFeeBLL.BLLStopFee_TKeys StopFeeKey = new HPS.BLL.StopFeeBLL.BLLStopFee_TKeys(); StopFeeKey.StopFeeID_int = (Int32)StopFeeGridView.CurrentRow.Cells["colStopFeeID_int"].Value; StopFeeFactory.Delete(StopFeeKey); DataRow[] dr = ((DataTable)this.StopFeeGridView.DataSource).Select(HPS.BLL.StopFeeBLL.BLLStopFee_T.StopFee_TField.StopFeeID_int.ToString() + "='" + StopFeeKey.StopFeeID_int.ToString() + "'"); if (dr.Length > 0) { dr[0].Delete(); } ((DataTable)this.StopFeeGridView.DataSource).AcceptChanges(); } catch (Exception ex) { Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message); } }
private void EditButton_Click(object sender, EventArgs e) { HPS.BLL.StopFeeBLL.BLLStopFee_TKeys StopFeeKey = new HPS.BLL.StopFeeBLL.BLLStopFee_TKeys(); StopFeeKey.StopFeeID_int = (Int32)this.StopFeeGridView.CurrentRow.Cells["colStopFeeID_int"].Value; StopFeeEntityForm StopFee = new StopFeeEntityForm(BaseEntityForm1.enmState.Edit, (DataTable)this.StopFeeGridView.DataSource, StopFeeKey); StopFee.ShowDialog(); }
public void GetBy(HPS.BLL.StopFeeBLL.BLLStopFee_TKeys keys, ref System.Data.DataTable dataTable) { try { _dataObject.SelectByPrimaryKey(keys, ref dataTable); } catch (System.Exception ex) { throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this); } }
public HPS.BLL.StopFeeBLL.BLLStopFee_T GetBy(HPS.BLL.StopFeeBLL.BLLStopFee_TKeys keys) { try { return(_dataObject.SelectByPrimaryKey(keys)); } catch (System.Exception ex) { throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this); } }
public void Delete(HPS.BLL.StopFeeBLL.BLLStopFee_TKeys keys) { try { _dataObject.Delete(keys); } catch (System.Exception ex) { throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this); } }
public StopFeeEntityForm(Hepsa.Core.PL.BaseEntityParentForm.enmState State, DataTable DataTable, HPS.BLL.StopFeeBLL.BLLStopFee_TKeys Key) : base(State, DataTable, Key) { InitializeComponent(); }