using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Web; namespace GODATA.Models.UserInventory { /// /// This class contain user inventory properties /// public class UserInventory { /// /// Get or Set user id/email id /// [Required(ErrorMessage = "*")] [Display(Name = "User Id/Email Id")] [RegularExpression("^[A-Za-z0-9._+\\-\\']+@[A-Za-z0-9.\\-]+\\.[A-Za-z]{2,}$", ErrorMessage = "Please enter correct User name.")] public string UserName { get; set; } /// /// Get or Set user email id /// [Required(ErrorMessage = "*")] [Display(Name = "Email Address")] [RegularExpression("^[A-Za-z0-9._+\\-\\']+@[A-Za-z0-9.\\-]+\\.[A-Za-z]{2,}$", ErrorMessage = "Please enter correct email address.")] public string EmailId { get; set; } /// /// Get or Set password /// [Required(ErrorMessage = "*")] [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] [DataType(DataType.Password)] [Display(Name = "Password")] public string Password { get; set; } /// /// Get or Set confirm password /// [DataType(DataType.Password)] [Display(Name = "Confirm Password")] [System.ComponentModel.DataAnnotations.Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] public string ConfirmPassword { get; set; } /// /// Get or Set role /// [Required(ErrorMessage = "*")] [Display(Name = "Role")] public string RoleName { get; set; } /// /// Get or Set user id /// [Required(ErrorMessage = "*")] public int UserId { get; set; } /// /// Get or Set user's designation /// [Required(ErrorMessage = "*")] [Display(Name = "Designation")] public string Designation { get; set; } /// /// Get or Set dealer name /// [Display(Name = "Dealer Name")] public string ObjectId { get; set; } /// /// Get or Set user's organization id /// [Required(ErrorMessage = "*")] [Display(Name = "Organization")] public string OrganizationId { get; set; } /// /// Get or Set user's organization name /// public string OrganizationName { get; set; } /// /// Get or Set user's city /// //[Required(ErrorMessage = "*")] [Display(Name = "City")] public string City { get; set; } /// /// Get or Set user's state /// //[Required(ErrorMessage = "*")] [Display(Name = "State")] public string State { get; set; } /// /// Get or Set user's state name /// public string StateName { get; set; } /// /// Get or Set user's region /// [Display(Name = "Region")] [RegularExpression(@"^[a-zA-Z]+$", ErrorMessage = "Incorrect Region")] //Use letters only please public string Region { get; set; } /// /// Get or Set user's language /// [Display(Name = "Language")] [RegularExpression(@"^[a-zA-Z ,.'&]+$", ErrorMessage = "Incorrect language")] //Use letters only please public string Language { get; set; } /// /// Get or Set user's time zone id /// [Display(Name = "Time Zone")] public string TimeZoneId { get; set; } /// /// Get or Set user's name /// [Required(ErrorMessage = "*")] [Display(Name = "User Name")] public string FirstName { get; set; } /// /// Get or Set user's last name /// public string LastName { get; set; } /// /// Get or Set user's offset minutes /// public double OffsetInMinute { get; set; } /// /// Get or Set Status /// public string Status { get; set; } /// /// Get or set Message /// public string Message { get; set; } /// /// Get or Set Token /// public string Token { get; set; } /// /// Get or Set Token /// public string VehicleTagging { get; set; } [Display(Name = "Product Variant")] public List VehicleTaggingList { get; set; } /// /// Get or Set is principle dealer /// [Display(Name = "Is Principal Dealer")] public bool IsPrincipleDealer { get; set; } /// /// Get or Set Token /// [Display(Name = "Dealers")] public List ChildDealerList { get; set; } [Display(Name = "Contact No.")] [RegularExpression(@"^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$", ErrorMessage = "Please enter correct format")] //Entered phone format is not valid. public string PrincipleDealerContactNo { get; set; } ///// ///// get or set principle dealer name ///// //public string PrincipalDealerName { get; set; } ///// ///// get or set user name ///// //public string UserName { get; set; } ///// ///// get or set designation / role ///// //public string Designation { get; set; } ///// ///// get or set is principle dealer or not ///// //public string IsParent { get; set; } /// /// get or set delaer child list /// public string DealerChildList { get; set; } public Boolean? IsDeleted { get; set; } public Boolean? IsDealerDeleted { get; set; } public string StateId { get; set; } public string CityId { get; set; } } public class UserDetailsModel { public int UserId { get; set; } public string AuthEngineId { get; set; } public string UserName { get; set; } public string Designation { get; set; } public string ObjectId { get; set; } public int OrganizationId { get; set; } public string City { get; set; } public string State { get; set; } public string Region { get; set; } public string Language { get; set; } public int TimeZoneId { get; set; } public string DisplayName { get; set; } public double OffsetInMinute { get; set; } public string DisplayId { get; set; } public string OrganizationName { get; set; } public string OrganizationAlias { get; set; } public string OrganizationCity { get; set; } public string OrganizationState { get; set; } public string OrganizationCountry { get; set; } public string OrganizationDescription { get; set; } public string OrganizationPath { get; set; } public string OrganizationDepth { get; set; } public string OrganizationColor { get; set; } public string OrganizationRegion { get; set; } public string Status { get; set; } public object Message { get; set; } public object Token { get; set; } public string VehicleTagging { get; set; } public string FirstName { get; set; } public string LastName { get; set; } } public class CityModel { public object StateId { get; set; } public object StateAlias { get; set; } public string CityId { get; set; } public string CityName { get; set; } public object Token { get; set; } public object Message { get; set; } } public class StateModel { public string StateId { get; set; } public string StateAlias { get; set; } public object Token { get; set; } public object Message { get; set; } } public class OrganizationModel { public int Id { get; set; } public string OrganizationName { get; set; } public object Alias { get; set; } public object City { get; set; } public object State { get; set; } public object Country { get; set; } public object Description { get; set; } public object Path { get; set; } public object Depth { get; set; } public object Color { get; set; } public string Region { get; set; } public object Token { get; set; } public object Message { get; set; } } public class DealerModel { public object UserId { get; set; } public object Token { get; set; } public object Message { get; set; } public string DealerId { get; set; } [Display(Name = "Dealer SCode")] public string NewDealerId { get; set; } public int OrganizationId { get; set; } public string DealerName { get; set; } [Display(Name = "City")] public string DealerCity { get; set; } [Display(Name = "State")] public string DealerState { get; set; } public string DealerDefaultLatitude { get; set; } public string DealerDefaultLongitude { get; set; } public string sDlrNamewithDealerId { get { if (Convert.ToString(DealerId) == "" || Convert.ToString(DealerId) == null) return DealerName; else return DealerName + " (" + DealerId + ")"; } } } public class UserCreateModel { public int UserId { get; set; } [Display(Name = "Email Address")] public object AuthEngineId { get; set; } [Display(Name = "User Id/Email Id")] public string UserName { get; set; } [Display(Name = "User Name")] public string FirstName { get; set; } [Display(Name = "Designation")] public string Designation { get; set; } public object ObjectId { get; set; } public int OrganizationId { get; set; } [Display(Name = "City")] public string City { get; set; } [Display(Name = "State")] public string State { get; set; } [Display(Name = "Region")] public string Region { get; set; } [Display(Name = "Language")] public string Language { get; set; } public int TimeZoneId { get; set; } public object DisplayName { get; set; } public object OffsetInMinute { get; set; } public object DisplayId { get; set; } [Display(Name = "Organization Name")] public object OrganizationName { get; set; } public object OrganizationAlias { get; set; } [Display(Name = "Organization City")] public object OrganizationCity { get; set; } [Display(Name = "Organization State")] public object OrganizationState { get; set; } [Display(Name = "Organization Country")] public object OrganizationCountry { get; set; } public object OrganizationDescription { get; set; } [Display(Name = "Organization Path")] public object OrganizationPath { get; set; } public object OrganizationDepth { get; set; } public object OrganizationColor { get; set; } [Display(Name = "Organization Region")] public object OrganizationRegion { get; set; } public string Status { get; set; } public string Message { get; set; } public object Token { get; set; } /// /// Get or Set Token /// [Display(Name = "Product Variant")] public string VehicleTagging { get; set; } public string StateId { get; set; } public string CityId { get; set; } public Boolean? IsDeleted { get; set; } [Display(Name = "User Locked")] public string IsLocked { get; set; } } public class RegionModel { public string RegionName { get; set; } public object Token { get; set; } public object Message { get; set; } } #region ForgotPassword //public class ForgotPassword //{ // public string to { get; set; } // public string cc { get; set; } // public string bcc { get; set; } // public string subject { get; set; } // public string message { get; set; } //} public class @object { public List to { get; set; } public List cc { get; set; } public List bcc { get; set; } public string subject { get; set; } public string message { get; set; } //public object attachmentNamePath { get; set; } } public class ForgotPassword { public string discription { get; set; } public Object @object { get; set; } public object list { get; set; } public bool valid { get; set; } } #endregion public class DealerPrincipleCreateModel { public object Token { get; set; } public int OrganizationId { get; set; } public object OrganizationName { get; set; } public object OrganizationAlias { get; set; } public object OrganizationCity { get; set; } public object OrganizationState { get; set; } public object OrganizationCountry { get; set; } public object OrganizationDescription { get; set; } public object OrganizationPath { get; set; } public object OrganizationDepth { get; set; } public object OrganizationColor { get; set; } public object OrganizationRegion { get; set; } public object Operation { get; set; } public object IsDeleted { get; set; } public object VanList { get; set; } public object PrincipalDealerName { get; set; } public object UserName { get; set; } public object Designation { get; set; } public object IsParent { get; set; } public object DealerChildList { get; set; } public object TimeZoneId { get; set; } public List DealerChildPrincipalList { get; set; } public object DealerId { get; set; } public object DealerOrganizationId { get; set; } public object DealerDealerName { get; set; } public object DealerCity { get; set; } public object DealerState { get; set; } public object DealerDealerDefaultLattitude { get; set; } public object DealerDealerDefaultLongitude { get; set; } public object DealerContactNo { get; set; } public object DealerContactNo2 { get; set; } public string Status { get; set; } public object Message { get; set; } } public class DealerChildPrincipalList { [Display(Name = "SCode")] public string DealerId { get; set; } public string DealerOrganizationId { get; set; } [Display(Name = "Dealership Name")] public string DealerName { get; set; } [Display(Name = "City")] public string DealerCity { get; set; } [Display(Name = "State")] public string DealerState { get; set; } public string DealerLatitude { get; set; } public string DealerLongitude { get; set; } [Display(Name = "Contact")] public string DealerContact1 { get; set; } public object DealerContact2 { get; set; } } }