using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FrameworkDAL.DTO.User { public class UserDTO { #region PrivateMembers #region User private int userid; private string usercode; private string username; private string userloginname; private string userpassword; private string usergeneratedpassword; private DateTime userdob = DateTime.UtcNow; private byte usertype; //Type of user - 0. Direct User Created,1. Employee to User,2. Contact to User private byte usernature; //Nature of User - 0 - HUMAN, 1 - Services private byte usersecuritylevel; //0 to 99 Any Number private string userremarks; private byte userisemployee; private byte userispartner; private int userpartnerid = -1; //private int partneruser; private DateTime uservalidfrom = DateTime.UtcNow; private DateTime uservalidto = DateTime.UtcNow; //private Role role; private string userprimarymail; private string userprimarymobile; private string userprimaryphone; // private int userpasswordpolicy; private int passwordpolicyid = -1; private string passwordpolicycode; private string passwordpolicyname; private int userworkouid = -1; private string userworkoucode; private string userworkouname; private int userworkperiodid = -1; private int userworkpartybranchid = -1; private int userworkpartyid = -1;//Added by Vikash on 12th AUg 2020 private int userworkstoreid = -1; private DateTime userworkdate = DateTime.UtcNow; private DateTime userlastsuccessloginon = DateTime.UtcNow; private DateTime userlastfailureattempton = DateTime.UtcNow; private string userpreviouspassword1; private string userpreviouspassword2; private string userpreviouspassword3; private DateTime userpasswordchangedon = Convert.ToDateTime("01-Jan-1899"); private DateTime userpreviouslogin = DateTime.UtcNow; private int userworkregionid = -1; private int imageid = -1; private string imagename; private string imagelinkurl; #region SecurityQuestion private int securityquestionid = -1; private string securityquestionquestion; #endregion private string usersecurityanswer = "NONE"; #region Role private int roleid = -1; private string rolecode; private string rolename; #endregion #region PartnerUser private int partneruserid = -1; private string partnerusercode; private string partnerusername; private int periodgroup; #endregion #endregion #region Base private int usercreatedbyid; //Created By Person (User Id) private DateTime usercreatedon; //Created On Date private int usermodifiedbyid; //Modified By Person (User Id) private DateTime usermodifiedon; //Modified On Date private string usercreatedbyname; private string usermodifiedbyname; #endregion #region Standard private Int16 usersortorder; private byte userstatus; //0.Pending, 1.Active, 2.Deleted, 3.Amended, 4.Inactive, 5.Archived private Int16 userversion; //No Of Times Updated private byte usersourcetype; //Data From (1.Framework, 2.Devadmin, 3.Impadmin, 4.Admin, 5.User) // Was never written by SAVE_USER's INSERT despite MUSER.TENANTID being a real, load-bearing // column elsewhere (CHECK_USER_EXISTS_BY_CODE/CHECK_ADMIN_RIGHTS both filter by it) — harmless // in a traditional one-database-per-tenant deployment, but unsafe for any caller sharing one // physical database across multiple clients' MUSER rows. Always set from LoginDTO.ClientId. private int tenantid = -1; #endregion private int userscreenoperationmode = 1; //Added by Vikash on 22-08-2012 as per the correction told by VV Sir.. private byte usermodeofoperation; //Added by Vikash on 04-09-2012 for seting the Default CMSImage Id.. private string userdefaultcmsid; //Added by Vikash on 12-10-2012 for checking the DRoolEngineChecking //private bool isrulepassed= false; private int usercriteriaconfigid = -1; //Added by Parthiban D on 18Jan2013 - want to get in user level UserCriteriaConfig //Added by Vikash on 19-02-2012 by the suggestion given by VV Sir for User Entered or Generated Password. private byte userpasswordtype = 0; //Added by Vikash on 20th August 2014 private string userdateformat = "dd/MM/yyyy"; private string usercurrencyformat = "#,##,###.##"; private string usertimeformat = "HH:MM"; private string userquantityformat = "###0.00"; private string machineip; //Added by Rajan on 10th October 2018 private byte usernoofsessions; private byte userloginonworkdaysonly; private Int16 userloginfromtime; private Int16 userlogintotime; private string userloginmachine; private string userloginip; #endregion //Added by Vikash on 22nd October 2018 private string userdigitalsignedfile; private string userdigitalfilepassword; private int defaultmenuid = -1; private string defaultmenucode; private string defaultmenuname; private string userdelimiter = ","; private byte userisoutofoffice = 1; private DateTime useroutofofficefromdate = Convert.ToDateTime("01-Jan-1899"); private DateTime useroutofofficetodate = Convert.ToDateTime("01-Jan-1899"); private string useroutofofficeremarks = "NONE"; private string useresignaturecmsid = "NONE"; private int userimportlinktoemployee = 1;//0 Check with Employee and Use Same Id, 1 --Save User as it is private byte userpunchtype = 0; private byte usermfausersetting = 0;//Not Required private string usermfauseraccountid = ""; private string usermfausersecretkey = ""; private string usermfaqrcode = ""; private byte usershowqrcode = 0; private byte usernumberoffailureattempts = 0; private int departmentid = -1; private string departmentcode; private string departmentname; private int designationid = -1; private string designationcode; private string designationname; //private string validtotime; //public string ValidToTime //{ // get { return validtotime; } // set { validtotime = value; } //} #region PublicMembers #region User public int UserId { get { return userid; } set { userid = value; } } public string UserCode { get { return usercode; } set { usercode = value; } } public string UserName { get { return username; } set { username = value; } } public string UserLoginName { get { return userloginname; } set { userloginname = value; } } public string UserPassword { get { return userpassword; } set { userpassword = value; } } public string UserGeneratedPassword { get { return usergeneratedpassword; } set { usergeneratedpassword = value; } } public DateTime UserDOB { get { return userdob; } set { userdob = value; } } public byte UserType { get { return usertype; } //Type of user - 0. Direct User Created,1. Employee to User,2. Contact to User set { usertype = value; } //Type of user - 0. Direct User Created,1. Employee to User,2. Contact to User } public byte UserNature { get { return usernature; } //Nature of User - 0 - HUMAN, 1 - Services set { usernature = value; } //Nature of User - 0 - HUMAN, 1 - Services } public string UserRemarks { get { return userremarks; } set { userremarks = value; } } public byte UserIsEmployee { get { return userisemployee; } set { userisemployee = value; } } public byte UserIsPartner { get { return userispartner; } set { userispartner = value; } } public int UserPartnerId { get { return userpartnerid; } set { userpartnerid = value; } } public DateTime UserValidFrom { get { return uservalidfrom; } set { uservalidfrom = value; } } public DateTime UserValidTo { get { return uservalidto; } set { uservalidto = value; } } public string UserPrimaryMail { get { return userprimarymail; } set { userprimarymail = value; } } public string UserPrimaryMobile { get { return userprimarymobile; } set { userprimarymobile = value; } } public string UserPrimaryPhone { get { return userprimaryphone; } set { userprimaryphone = value; } } //public int UserPasswordPolicy //{ // get { return userpasswordpolicy; } // set { userpasswordpolicy = value; } //} public int PasswordPolicyId { get { return passwordpolicyid; } set { passwordpolicyid = value; } } public string PasswordPolicyCode { get { return passwordpolicycode; } set { passwordpolicycode = value; } } public string PasswordPolicyName { get { return passwordpolicyname; } set { passwordpolicyname = value; } } public int UserWorkOuId { get { return userworkouid; } set { userworkouid = value; } } public int UserWorkPeriodId { get { return userworkperiodid; } set { userworkperiodid = value; } } public int UserWorkPartyBranchId { get { return userworkpartybranchid; } set { userworkpartybranchid = value; } } public int UserWorkPartyId { get { return userworkpartyid; } set { userworkpartyid = value; } } public int UserWorkStoreId { get { return userworkstoreid; } set { userworkstoreid = value; } } public DateTime UserWorkDate { get { return userworkdate; } set { userworkdate = value; } } public DateTime UserLastSuccessLoginOn { get { return userlastsuccessloginon; } set { userlastsuccessloginon = value; } } public DateTime UserLastFailureAttemptOn { get { return userlastfailureattempton; } set { userlastfailureattempton = value; } } public string UserPreviousPassword1 { get { return userpreviouspassword1; } set { userpreviouspassword1 = value; } } public string UserPreviousPassword2 { get { return userpreviouspassword2; } set { userpreviouspassword2 = value; } } public string UserPreviousPassword3 { get { return userpreviouspassword3; } set { userpreviouspassword3 = value; } } public DateTime UserPasswordChangedOn { get { return userpasswordchangedon; } set { userpasswordchangedon = value; } } public DateTime UserPreviousLogin { get { return userpreviouslogin; } set { userpreviouslogin = value; } } public int UserWorkRegionId { get { return userworkregionid; } set { userworkregionid = value; } } public byte UserSecurityLevel { get { return usersecuritylevel; } //0 to 99 Any Number set { usersecuritylevel = value; } //0 to 99 Any Number } public int ImageId { get { return imageid; } set { imageid = value; } } public string ImageName { get { return imagename; } set { imagename = value; } } public string ImageLinkURL { get { return imagelinkurl; } set { imagelinkurl = value; } } public string UserWorkOuCode { get { return userworkoucode; } //GcmTypeModifiedByName set { userworkoucode = value; } //GcmTypeModifiedByName } public string UserWorkOuName { get { return userworkouname; } //GcmTypeModifiedByName set { userworkouname = value; } //GcmTypeModifiedByName } #region SecurityQuestion public int SecurityQuestionId { get { return securityquestionid; } set { securityquestionid = value; } } public string SecurityQuestionQuestion { get { return securityquestionquestion; } set { securityquestionquestion = value; } } #endregion #region Role public int RoleId { get { return roleid; } set { roleid = value; } } public string RoleCode { get { return rolecode; } set { rolecode = value; } } public string RoleName { get { return rolename; } set { rolename = value; } } #endregion #region PartnerUser public int PartnerUserId { get { return partneruserid; } set { partneruserid = value; } } public string PartnerUserCode { get { return partnerusercode; } set { partnerusercode = value; } } public string PartnerUserName { get { return partnerusername; } set { partnerusername = value; } } #endregion public string UserSecurityAnswer { get { return usersecurityanswer; } set { usersecurityanswer = value; } } public int PeriodGroup { get { return periodgroup; } set { periodgroup = value; } } #endregion #region Base public int UserCreatedById { get { return usercreatedbyid; } //Created By Person (User Id) set { usercreatedbyid = value; } //Created By Person (User Id) } public DateTime UserCreatedOn { get { return usercreatedon; } //Created On Date set { usercreatedon = value; } //Created On Date } public int UserModifiedById { get { return usermodifiedbyid; } //Modified By Person (User Id) set { usermodifiedbyid = value; } //Set Restricted } public DateTime UserModifiedOn { get { return usermodifiedon; } //Modified On Date set { usermodifiedon = value; } } public string UserCreatedByName { get { return usercreatedbyname; } //GcmTypeCreatedByName set { usercreatedbyname = value; } //GcmTypeCreatedByName } public string UserModifiedByName { get { return usermodifiedbyname; } //GcmTypeModifiedByName set { usermodifiedbyname = value; } //GcmTypeModifiedByName } #endregion #region Standard public Int16 UserSortOrder { get { return usersortorder; } set { usersortorder = value; } } public byte UserStatus { get { return userstatus; } //0.Pending, 1.Active, 2.Deleted, 3.Amended, 4.Inactive, 5.Archived set { userstatus = value; } } public Int16 UserVersion { get { return userversion; } //No Of Times Updated set { userversion = value; } } public byte UserSourceType { get { return usersourcetype; } //Data From (1.Framework, 2.Devadmin, 3.Impadmin, 4.Admin, 5.User) set { usersourcetype = value; } } public int TenantId { get { return tenantid; } set { tenantid = value; } } #endregion public int UserScreenOperationMode { get { return userscreenoperationmode; } set { userscreenoperationmode = value; } } //Added by Vikash on 22-08-2012 as per the correction told by VV Sir.. public byte UserModeofOperation { get { return usermodeofoperation; } set { usermodeofoperation = value; } } //Added by Vikash on 04-09-2012 as per the correction told by VV Sir.. public string UserDefaultCMSId { get { return userdefaultcmsid; } set { userdefaultcmsid = value; } } public int UserCriteriaConfigId { get { return usercriteriaconfigid; } set { usercriteriaconfigid = value; } } public byte UserPasswordType //This Field only will be in DTO Level for Logic.No need to store this in Table.. { get { return userpasswordtype; } //0-Generated,1-Manual set { userpasswordtype = value; } } #endregion public string UserDateFormat { get { return userdateformat; } set { userdateformat = value; } } public string UserCurrencyFormat { get { return usercurrencyformat; } set { usercurrencyformat = value; } } public string UserTimeFormat { get { return usertimeformat; } set { usertimeformat = value; } } public string UserQuantityFormat { get { return userquantityformat; } set { userquantityformat = value; } } //Added by Vikash For Template in User Creation private string userregistrationdate; public string UserRegistrationDate { get { return userregistrationdate; } set { userregistrationdate = value; } } #region Added by Vikash since Foret Password is hapening without Logininto software so thios value is not available on 8th Jan 2014 private string frontendurl; public string FrontEndUrl { get { return frontendurl; } set { frontendurl = value; } } #endregion public UserDTO() { // Value = _value; } public string MachineIp { get { return machineip; } set { machineip = value; } } private byte userthemeoption = 0; public byte UserThemeOption { get { return userthemeoption; } set { userthemeoption = value; } } private int checkstatus; private int checkmodeofoperation; public int CheckStatus { get { return checkstatus; } set { checkstatus = value; } } public int CheckModeofOperation { get { return checkmodeofoperation; } set { checkmodeofoperation = value; } } public byte UserNoOfSessions { get { return usernoofsessions; } set { usernoofsessions = value; } } public byte UserLoginonWorkDaysOnly { get { return userloginonworkdaysonly; } set { userloginonworkdaysonly = value; } } public Int16 UserLoginFromTime { get { return userloginfromtime; } set { userloginfromtime = value; } } public Int16 UserLoginToTime { get { return userlogintotime; } set { userlogintotime = value; } } public string UserLoginMachine { get { return userloginmachine; } set { userloginmachine = value; } } public string UserLoginIp { get { return userloginip; } set { userloginip = value; } } #region Added by Vikash For Login 11th Oct 2018 private int checkusernoofsessions; private int checkuserloginonworkdaysonly; private int checkuserloginfromtime; private int checkuserlogintotime; private int checkuserdaytype; public int CheckUserNoOfSessions { get { return checkusernoofsessions; } set { checkusernoofsessions = value; } } public int CheckUserLoginonWorkDaysOnly { get { return checkuserloginonworkdaysonly; } set { checkuserloginonworkdaysonly = value; } } public int CheckUserLoginFromTime { get { return checkuserloginfromtime; } set { checkuserloginfromtime = value; } } public int CheckUserLoginToTime { get { return checkuserlogintotime; } set { checkuserlogintotime = value; } } public int CheckUserDayType { get { return checkuserdaytype; } set { checkuserdaytype = value; } } #endregion public string UserDigitalSignedFile { get { return userdigitalsignedfile; } set { userdigitalsignedfile = value; } } public string UserDigitalFilePassword { get { return userdigitalfilepassword; } set { userdigitalfilepassword = value; } } #region Menu public int DefaultMenuId { get { return defaultmenuid; } set { defaultmenuid = value; } } public string DefaultMenuCode { get { return defaultmenucode; } set { defaultmenucode = value; } } public string DefaultMenuName { get { return defaultmenuname; } set { defaultmenuname = value; } } #endregion private int workfinancebookid = -1; private string workfinancebookname; public int WorkFinanceBookId { get { return workfinancebookid; } set { workfinancebookid = value; } } public string WorkFinanceBookName { get { return workfinancebookname; } set { workfinancebookname = value; } } #region Added by Vikash on 30th July 2019 private int timezoneid = 91; private int timezone = 330; private string timezonedisplayname; public int TimeZoneId { get { return timezoneid; } set { timezoneid = value; } } public int TimeZone { get { return timezone; } set { timezone = value; } } public string TimeZoneDisplayName { get { return timezonedisplayname; } set { timezonedisplayname = value; } } #endregion private string databasename = ""; public string DatabaseName { get { return databasename; } set { databasename = value; } } private int defaultdeviceid = -1; public int DefaultDeviceId { get { return defaultdeviceid; } set { defaultdeviceid = value; } } public string UserDelimiter { get { return userdelimiter; } set { userdelimiter = value; } } public byte UserIsOutOfOffice { get { return userisoutofoffice; } set { userisoutofoffice = value; } } public DateTime UserOutOfOfficeFromDate { get { return useroutofofficefromdate; } set { useroutofofficefromdate = value; } } public DateTime UserOutOfOfficeToDate { get { return useroutofofficetodate; } set { useroutofofficetodate = value; } } public string UserOutOfOfficeRemarks { get { return useroutofofficeremarks; } set { useroutofofficeremarks = value; } } public string UserESignaturecmsId { get { return useresignaturecmsid; } set { useresignaturecmsid = value; } } public int UserImportLinkToEmployee { get { return userimportlinktoemployee; } set { userimportlinktoemployee = value; } } public byte UserPunchType { get { return userpunchtype; } set { userpunchtype = value; } } public byte UserMFAUserSetting { get { return usermfausersetting; } set { usermfausersetting = value; } } public string UserMFAUserAccountId { get { return usermfauseraccountid; } set { usermfauseraccountid = value; } } public string UserMFAUserSecretKey { get { return usermfausersecretkey; } set { usermfausersecretkey = value; } } public string UserMFAQRCode { get { return usermfaqrcode; } set { usermfaqrcode = value; } } public byte UserShowQRCode { get { return usershowqrcode; } set { usershowqrcode = value; } } public byte UserNumberOfFailureAttempts { get { return usernumberoffailureattempts; } set { usernumberoffailureattempts = value; } } private int counteroperationid = -1; private int isencryptionrequired; private int selectlistoperationtype; private int expirytime; private int gracetime; private int isipbasedcheckingrequired; public int CounterOperationId { get { return counteroperationid; } set { counteroperationid = value; } } public int IsEncryptionRequired { get { return isencryptionrequired; } set { isencryptionrequired = value; } } public int SelectlistOperationType { get { return selectlistoperationtype; } set { selectlistoperationtype = value; } } public int ExpiryTime { get { return expirytime; } set { expirytime = value; } } public int GraceTime { get { return gracetime; } set { gracetime = value; } } public int IsIpBasedCheckingRequired { get { return isipbasedcheckingrequired; } set { isipbasedcheckingrequired = value; } } //this two fields are added since existing fields are byte type but during Login query this will give int on 26 Aug 2022 private int checkusermfausersetting; private int checkusershowqrcode; public int CheckUserMFAUserSetting { get { return checkusermfausersetting; } set { checkusermfausersetting = value; } } public int CheckUserShowQRCode { get { return checkusershowqrcode; } set { checkusershowqrcode = value; } } private int employeecodedefineid = -1;//This field is used for Mail Generation public int EmployeeCodeDefineId { get { return employeecodedefineid; } set { employeecodedefineid = value; } } private int resetuserpassword = 1;//Default value 1 public int ResetuserPassword { get { return resetuserpassword; } set { resetuserpassword = value; } } private int employeealreadyuser = 1;//Field added by Vikash to Check During Employee To User Bulk Import on 05th Sep 2023 public int EmployeeAlreadyUser { get { return employeealreadyuser; } set { employeealreadyuser = value; } } private int mmailid = -1; private string mmailmailid = ""; private string userthumbnail = ""; public int MMailId { get { return mmailid; } set { mmailid = value; } } public string MMailMailId { get { return mmailmailid; } set { mmailmailid = value; } } public string UserThumbNail { get { return userthumbnail; } set { userthumbnail = value; } } private int checkispartner = 1; private int checkisemployee = 1; public int CheckIsPartner { get { return checkispartner; } set { checkispartner = value; } } public int CheckIsEmployee { get { return checkisemployee; } set { checkisemployee = value; } } private int tempattachmentoption = 0; public int TempAttachmentOption { get { return tempattachmentoption; } set { tempattachmentoption = value; } } private int userthememode = 0; public int UserThemeMode { get { return userthememode; } set { userthememode = value; } } private string userlanguageid; public string UserLanguageId { get { return userlanguageid; } set { userlanguageid = value; } } private int usercriteriaruntype = 0; public int UserCriteriaRunType { get { return usercriteriaruntype; } set { usercriteriaruntype = value; } } private int checkusercriteriaruntype = 0; public int CheckUserCriteriaRunType { get { return checkusercriteriaruntype; } set { checkusercriteriaruntype = value; } } private string userdigitalkeylocation; public string UserDigitalKeyLocation { get { return userdigitalkeylocation; } set { userdigitalkeylocation = value; } } private int defaultmoduleid; public int DefaultModuleId { get { return defaultmoduleid; } set { defaultmoduleid = value; } } private string defaultmodulecode; public string DefaultModuleCode { get { return defaultmodulecode; } set { defaultmodulecode = value; } } private string defaultmodulename; public string DefaultModuleName { get { return defaultmodulename; } set { defaultmodulename = value; } } public int DepartmentId { get { return departmentid; } set { departmentid = value; } } public string DepartmentCode { get { return departmentcode; } set { departmentcode = value; } } public string DepartmentName { get { return departmentname; } set { departmentname = value; } } public int DesignationId { get { return designationid; } set { designationid = value; } } public string DesignationCode { get { return designationcode; } set { designationcode = value; } } public string DesignationName { get { return designationname; } set { designationname = value; } } } }