Exemplo n.º 1
0
		private void attach_tbl_Users(tbl_Users entity)
		{
			this.SendPropertyChanging();
			entity.tbl_Roles = this;
		}
Exemplo n.º 2
0
		private void detach_tbl_Users(tbl_Users entity)
		{
			this.SendPropertyChanging();
			entity.tbl_Roles = null;
		}
Exemplo n.º 3
0
 partial void Updatetbl_Users(tbl_Users instance);
Exemplo n.º 4
0
 partial void Deletetbl_Users(tbl_Users instance);
Exemplo n.º 5
0
 partial void Inserttbl_Users(tbl_Users instance);
Exemplo n.º 6
0
		private void detach_tbl_Users(tbl_Users entity)
		{
			this.SendPropertyChanging();
			entity.tbl_Applications = null;
		}
Exemplo n.º 7
0
 private bool Insert(UserInfo entUser)
 {
     TCRepositoryDataContext context = DataBaseUtils.GetContext();
     try
     {
         tbl_Users dbUser = new tbl_Users()
         {
             FirstName = entUser.FirstName,
             LastName = entUser.LastName,
             UserName = entUser.UserName,
             HashCode = entUser.HashCode,
             Password = entUser.Password,
             CreatedOn = DateTime.Now,
             Email = entUser.Email,
             IdCompany = entUser.EntCompany.IdCompany,
             IdStatus = entUser.EntStatus.IdStatus,
             IdRole = entUser.EntRole.IdRole,
             ModifiedOn = DateTime.Now
         };
         context.tbl_Users.InsertOnSubmit(dbUser);
         context.SubmitChanges();
         return true;
     }
     catch
     { }
     return false;
 }
Exemplo n.º 8
0
 private void AssignDataObjectToEntity(tbl_Users dbUser, ref UserInfo entUserInfo)
 {
     entUserInfo.UserCompleteName = String.Format("{0} {1}", dbUser.FirstName, dbUser.LastName);
     entUserInfo.IdUser = dbUser.IdUser;
     entUserInfo.UserName = dbUser.UserName;
     entUserInfo.FirstName = dbUser.FirstName;
     entUserInfo.LastName = dbUser.LastName;
     entUserInfo.Password = dbUser.Password;
     entUserInfo.HashCode = dbUser.HashCode;
     entUserInfo.CreatedOn = dbUser.CreatedOn;
     entUserInfo.ModifiedOn = dbUser.ModifiedOn;
     entUserInfo.EntCompany = new DataAccessLibrary.Services.CompanyService().GetByID(dbUser.IdCompany);
     entUserInfo.EntStatus = new DataAccessLibrary.Services.StatusService().GetById(dbUser.IdStatus);
     entUserInfo.EntRole = new RoleService().GetRoleByID(dbUser.IdRole);
     entUserInfo.Email = dbUser.Email;
 }
Exemplo n.º 9
0
 private void AssignDataObjectToEntity(tbl_Users dbUser, ref User entUser)
 {
     entUser.IdUser = dbUser.IdUser;
     entUser.UserName = dbUser.UserName;
     entUser.EntRole = new RoleService().GetRoleByUserID(entUser.IdUser);
     entUser.UserCompleteName = String.Format("{0} {1}", dbUser.FirstName, dbUser.LastName);
     entUser.Company = new DataAccessLibrary.Services.CompanyService().GetByID(dbUser.IdCompany);
     entUser.IdApplication = dbUser.IdApplication;
     entUser.Application = dbUser.tbl_Applications.Name;
 }