/// <summary> /// For clearing user information from controls /// </summary> public void ClearUserInfo() { try { CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); UserID = null; UserName = null; Password = null; Email = null; IsActive = null; FirstName = null; LastName = null; LastLogin = null; Phone = null; ListCustomer = ListCustomer.Select(x => new UserCustomerList { CustomerName = x.CustomerName, CustomerID = x.CustomerID, IsSelected = false }).ToList(); ListModule = ListModule.Select(x => new ModuleList { ModuleID = x.ModuleID, ModuleName = x.ModuleName, IsSelected = false, ModuleCode = x.ModuleCode }).ToList(); ListRole = ListRole.Select(x => new RoleList { RoleID = x.RoleID, RoleName = x.RoleName, Description = x.Description, IsSelected = false }).ToList(); ListGroup = ListGroup.Select(x => new GroupList { GroupID = x.GroupID, GroupName = x.GroupName, Description = x.Description, IsSelected = false }).ToList(); } catch (Exception ex) { CommonSettings.logger.LogError(this.GetType(), ex); } finally { CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); } }