public static CsMaterielDemande GetById(CsMaterielDemande entity) { try { return(Entities.GetEntityFromQuery <CsMaterielDemande>(ParamProcedure.PARAM_MATERIEL_RETOURNEById(entity.PK_ID))); } catch (Exception ex) { throw ex; } }
public static bool Delete(CsMaterielDemande entity) { try { return(Entities.DeleteEntity <Galatee.Entity.Model.MATERIELDEVIS>(Entities.ConvertObject <Galatee.Entity.Model.MATERIELDEVIS, CsMaterielDemande>(entity))); } catch (Exception e) { throw e; } }
private void UpdateParentList(CsMaterielDemande pMateriel) { try { if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Creation) { GetDataNew(); } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification) { GetDataNew(); } } catch (Exception ex) { throw ex; } }
public UcMaterielDemande(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); this.Txt_Code.MaxLength = 1; var categorieClient = new CsMaterielDemande(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsMaterielDemande); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsMaterielDemande>; } 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; Txt_CoutFourniture.Text = ObjetSelectionnee.COUTUNITAIRE_FOURNITURE.Value.ToString(SessionObject.FormatMontant); Txt_CoutPose.Text = ObjetSelectionnee.COUTUNITAIRE_POSE.Value.ToString(SessionObject.FormatMontant);; btnOk.IsEnabled = false; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.LibelleCodePoste); } }
private List <CsMaterielDemande> GetInformationsFromScreen() { var listObjetForInsertOrUpdate = new List <CsMaterielDemande>(); try { if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Creation) { var Materiel = new CsMaterielDemande { CODE = Txt_Code.Text, LIBELLE = Txt_Libelle.Text, COUTUNITAIRE_FOURNITURE = Convert.ToDecimal(Txt_CoutFourniture.Text), COUTUNITAIRE_POSE = Convert.ToDecimal(Txt_CoutPose.Text), DATECREATION = DateTime.Now, USERCREATION = UserConnecte.matricule }; listObjetForInsertOrUpdate.Add(Materiel); } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification) { ObjetSelectionnee.CODE = Txt_Code.Text; ObjetSelectionnee.LIBELLE = Txt_Libelle.Text; ObjetSelectionnee.COUTUNITAIRE_FOURNITURE = Convert.ToDecimal(Txt_CoutFourniture.Text); ObjetSelectionnee.COUTUNITAIRE_POSE = Convert.ToDecimal(Txt_CoutPose.Text); ObjetSelectionnee.DATEMODIFICATION = DateTime.Now; ObjetSelectionnee.USERMODIFICATION = UserConnecte.matricule; listObjetForInsertOrUpdate.Add(ObjetSelectionnee); } return(listObjetForInsertOrUpdate); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.LibelleCodePoste); return(null); } }