public static dynamic FetchStateByCountryId(int CountryId) { PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); string str = PVMS.FetchState(CountryId); return(str); }
public static dynamic fetchApplyPassportbyUserId(int UserId) { PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); string str = PVMS.fetchApplyPassportbyUserId(UserId); return(JsonConvert.DeserializeObject <List <PassportVisaManagementSystemService.ApplyPassport> >(str)); }
public static dynamic FetchCityByStateId(int StateId) { PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); string str = PVMS.FetchCity(StateId); return(str); }
public static dynamic FetchUserByuserparameter(string parameter, string value) { PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); string str = PVMS.FetchUserByuserparameter(parameter, value); return(JsonConvert.DeserializeObject <List <PassportVisaManagementSystemService.User> >(str)); }
public static dynamic FetchUserByEmail(string Email) { PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); string str = PVMS.FetchUserByEmailAddress(Email); return(JsonConvert.DeserializeObject <List <PassportVisaManagementSystemService.User> >(str)); }
public ActionResult Index() { Session["Page"] = null; Session.Clear(); Session.Abandon(); if (Request.Cookies["UserName"] != null) { Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(-1); } ViewBag.signinActive = "active"; PassportVisaManagementSystemService.User U = new PassportVisaManagementSystemService.User(); PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); PassportVisaManagementSystemService.HintQuestion[] D = PVMS.FetchHintQuestion(); ViewBag.HintQuestionDD = D.ToList(); return(View(U)); }
//[AllowAnonymous] public ActionResult Index(string AccountType, PassportVisaManagementSystemService.User U) { ViewBag.HintQuestionDD = null; PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); PassportVisaManagementSystemService.HintQuestion[] D = PVMS.FetchHintQuestion(); ViewBag.HintQuestionDD = D.ToList(); if (AccountType.ToLower() == "signup" && checkForSignUpValidation(U)) { if (AccountType.ToLower() == "signup") { ViewBag.signupActive = "active"; ViewBag.signinActive = ""; } if (AccountType.ToLower() == "signin") { ViewBag.signinActive = "active"; ViewBag.signupActive = ""; } return(View()); } if (AccountType.ToLower() == "signin" && checkForSignInValidation(U)) { if (AccountType.ToLower() == "signup") { ViewBag.signupActive = "active"; ViewBag.signinActive = ""; } if (AccountType.ToLower() == "signin") { ViewBag.signinActive = "active"; ViewBag.signupActive = ""; } return(View()); } //checkForSignInValidation(U); //Cookies.Expires = DateTime.Now.AddSeconds(1); if (AccountType.ToLower() == "signup") { Session["SignUpMsg"] = null; Session["userName"] = null; Session["password"] = null; string email = U.EmailAddress; bool SignUpResult = DbOperation.UserSignUp(U); var list = DbOperation.FetchUserByEmail(U.EmailAddress); //email id must be unique if (list != null && list.Count == 1) { Response.Cookies["UserName"].Value = list[0].UserId; Session["userName"] = list[0].UserId; Session["password"] = list[0].Password; } else { int l = list.Count; Session["userName"] = list[l - 1].UserId; Session["password"] = list[l - 1].Password; } string str = "Dear User \n Your User Id is " + list[0].UserId + " and your password is " + list[0].Password + ".\nYou are planning for " + list[0].ApplyType + " and your citizen type is " + list[0].CitizenType; if (SignUpResult) { Session["Page"] = AccountType; Session["SignUpMsg"] = str; return(Redirect("/UserHome")); } else { return(View()); } } else { bool SignInResult = DbOperation.UserSignIn(U); if (SignInResult) { Session["Page"] = AccountType; Response.Cookies["UserName"].Value = U.UserId; var userList = DbOperation.FetchUserByuserparameter("userid", U.UserId); if (userList[0].ApplyType.ToLower() == "passport") { return(Redirect("/ApplyPassport")); } else if (userList[0].ApplyType.ToLower() == "visa") { return(Redirect("/ApplyPassport")); } else { return(View()); } } else { return(View()); } } }
public static int FetchIdByUserName(string userName) { PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); return(PVMS.getIdByUserId(userName)); }
public static bool UserSignIn(PassportVisaManagementSystemService.User U) { PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); return(PVMS.SignIn(U.UserId, U.Password)); }
public static bool UserSignUp(PassportVisaManagementSystemService.User U) { PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); return(PVMS.SignUp(U)); }
public static string fetchCountryStateCityById(int country) { PassportVisaManagementSystemService.Service1Client PVMS = new PassportVisaManagementSystemService.Service1Client(); return(PVMS.fetchCountryStateCityById(country)); }