// Modify default (Update all attributes of the class) public void ModifyDefault(PromotorEN promotor) { try { SessionInitializeTransaction(); PromotorEN promotorEN = (PromotorEN)session.Load(typeof(PromotorEN), promotor.Email); promotorEN.CIF = promotor.CIF; session.Update(promotorEN); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is Fight4FitGenNHibernate.Exceptions.ModelException) { throw ex; } throw new Fight4FitGenNHibernate.Exceptions.DataLayerException("Error in PromotorCAD.", ex); } finally { SessionClose(); } }
public PromotorEN ReadOIDDefault(string Email ) { PromotorEN promotorEN = null; try { SessionInitializeTransaction(); promotorEN = (PromotorEN)session.Get(typeof(PromotorEN), Email); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is Fight4FitGenNHibernate.Exceptions.ModelException) { throw ex; } throw new Fight4FitGenNHibernate.Exceptions.DataLayerException("Error in PromotorCAD.", ex); } finally { SessionClose(); } return(promotorEN); }
public string CrearUsuarioProm(PromotorEN promotor) { try { SessionInitializeTransaction(); session.Save(promotor); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is Fight4FitGenNHibernate.Exceptions.ModelException) { throw ex; } throw new Fight4FitGenNHibernate.Exceptions.DataLayerException("Error in PromotorCAD.", ex); } finally { SessionClose(); } return(promotor.Email); }
public PromotorEN ReadOID(string Email ) { PromotorEN promotorEN = null; promotorEN = _IPromotorCAD.ReadOID(Email); return(promotorEN); }
public string CrearUsuarioProm(string p_Email, String p_Password, bool p_Bloqueado, string p_CIF) { PromotorEN promotorEN = null; string oid; //Initialized PromotorEN promotorEN = new PromotorEN(); promotorEN.Email = p_Email; promotorEN.Password = Utils.Util.GetEncondeMD5(p_Password); promotorEN.Bloqueado = p_Bloqueado; promotorEN.CIF = p_CIF; //Call to PromotorCAD oid = _IPromotorCAD.CrearUsuarioProm(promotorEN); return(oid); }