private bool Insert(aBanque pBanque) { try { return(Entities.InsertEntity <Galatee.Entity.Model.BANQUE>(Entities.ConvertObject <Galatee.Entity.Model.BANQUE, aBanque>(pBanque))); } catch (Exception e) { throw e; } }
public bool Delete(aBanque pBanque) { try { return(Entities.DeleteEntity <Galatee.Entity.Model.BANQUE>(Entities.ConvertObject <Galatee.Entity.Model.BANQUE, aBanque>(pBanque))); } catch (Exception e) { throw e; } }
private void UpdateParentList(aBanque pBanque) { try { if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Creation) { GetDataNew(); } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification) { GetDataNew(); } } catch (Exception ex) { throw ex; } }
public UcBanque(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); var categorieClient = new aBanque(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as aBanque); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <aBanque>; } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_Code.Text = ObjetSelectionnee.CODE; Txt_Libelle.Text = ObjetSelectionnee.LIBELLE; btnOk.IsEnabled = false; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.Show(ex.Message, Languages.Banque); } }
private List <aBanque> GetInformationsFromScreen() { var listObjetForInsertOrUpdate = new List <aBanque>(); try { if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Creation) { var Banque = new aBanque { CODE = Txt_Code.Text, LIBELLE = Txt_Libelle.Text, DATECREATION = DateTime.Now, USERCREATION = UserConnecte.matricule }; if (!string.IsNullOrEmpty(Txt_Code.Text) && donnesDatagrid.FirstOrDefault(p => p.CODE == Banque.CODE) != null) { throw new Exception(Languages.CetElementExisteDeja); } listObjetForInsertOrUpdate.Add(Banque); } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification) { ObjetSelectionnee.CODE = Txt_Code.Text; ObjetSelectionnee.LIBELLE = Txt_Libelle.Text; ObjetSelectionnee.DATECREATION = DateTime.Now; ObjetSelectionnee.USERCREATION = UserConnecte.matricule; listObjetForInsertOrUpdate.Add(ObjetSelectionnee); } return(listObjetForInsertOrUpdate); } catch (Exception ex) { throw ex; } }