479 lines
16 KiB
C#
479 lines
16 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace GODATA.Models.UserInventory
|
|
{
|
|
/// <summary>
|
|
/// This class contain user inventory properties
|
|
/// </summary>
|
|
public class UserInventory
|
|
{
|
|
/// <summary>
|
|
/// Get or Set user id/email id
|
|
/// </summary>
|
|
[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; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user email id
|
|
/// </summary>
|
|
[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; }
|
|
|
|
/// <summary>
|
|
/// Get or Set password
|
|
/// </summary>
|
|
[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; }
|
|
|
|
/// <summary>
|
|
/// Get or Set confirm password
|
|
/// </summary>
|
|
[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; }
|
|
|
|
/// <summary>
|
|
/// Get or Set role
|
|
/// </summary>
|
|
[Required(ErrorMessage = "*")]
|
|
[Display(Name = "Role")]
|
|
public string RoleName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user id
|
|
/// </summary>
|
|
[Required(ErrorMessage = "*")]
|
|
public int UserId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's designation
|
|
/// </summary>
|
|
[Required(ErrorMessage = "*")]
|
|
[Display(Name = "Designation")]
|
|
public string Designation { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set dealer name
|
|
/// </summary>
|
|
[Display(Name = "Dealer Name")]
|
|
public string ObjectId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's organization id
|
|
/// </summary>
|
|
[Required(ErrorMessage = "*")]
|
|
[Display(Name = "Organization")]
|
|
public string OrganizationId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's organization name
|
|
/// </summary>
|
|
public string OrganizationName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's city
|
|
/// </summary>
|
|
//[Required(ErrorMessage = "*")]
|
|
[Display(Name = "City")]
|
|
public string City { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's state
|
|
/// </summary>
|
|
//[Required(ErrorMessage = "*")]
|
|
[Display(Name = "State")]
|
|
public string State { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's state name
|
|
/// </summary>
|
|
public string StateName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's region
|
|
/// </summary>
|
|
[Display(Name = "Region")]
|
|
[RegularExpression(@"^[a-zA-Z]+$", ErrorMessage = "Incorrect Region")] //Use letters only please
|
|
public string Region { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's language
|
|
/// </summary>
|
|
[Display(Name = "Language")]
|
|
[RegularExpression(@"^[a-zA-Z ,.'&]+$", ErrorMessage = "Incorrect language")] //Use letters only please
|
|
public string Language { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's time zone id
|
|
/// </summary>
|
|
[Display(Name = "Time Zone")]
|
|
public string TimeZoneId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's name
|
|
/// </summary>
|
|
[Required(ErrorMessage = "*")]
|
|
[Display(Name = "User Name")]
|
|
public string FirstName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's last name
|
|
/// </summary>
|
|
public string LastName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set user's offset minutes
|
|
/// </summary>
|
|
public double OffsetInMinute { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set Status
|
|
/// </summary>
|
|
public string Status { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or set Message
|
|
/// </summary>
|
|
public string Message { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set Token
|
|
/// </summary>
|
|
public string Token { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set Token
|
|
/// </summary>
|
|
public string VehicleTagging { get; set; }
|
|
|
|
[Display(Name = "Product Variant")]
|
|
public List<string> VehicleTaggingList { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set is principle dealer
|
|
/// </summary>
|
|
[Display(Name = "Is Principal Dealer")]
|
|
public bool IsPrincipleDealer { get; set; }
|
|
|
|
/// <summary>
|
|
/// Get or Set Token
|
|
/// </summary>
|
|
[Display(Name = "Dealers")]
|
|
public List<string> 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; }
|
|
|
|
///// <summary>
|
|
///// get or set principle dealer name
|
|
///// </summary>
|
|
//public string PrincipalDealerName { get; set; }
|
|
|
|
///// <summary>
|
|
///// get or set user name
|
|
///// </summary>
|
|
//public string UserName { get; set; }
|
|
|
|
///// <summary>
|
|
///// get or set designation / role
|
|
///// </summary>
|
|
//public string Designation { get; set; }
|
|
|
|
///// <summary>
|
|
///// get or set is principle dealer or not
|
|
///// </summary>
|
|
//public string IsParent { get; set; }
|
|
|
|
/// <summary>
|
|
/// get or set delaer child list
|
|
/// </summary>
|
|
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; }
|
|
|
|
/// <summary>
|
|
/// Get or Set Token
|
|
/// </summary>
|
|
[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<string> to { get; set; }
|
|
public List<string> cc { get; set; }
|
|
public List<string> 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> 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; }
|
|
}
|
|
|
|
} |