public ActionResult GetStores(StoresReq objReq) { /******************************************************************* * Author : Gopi * Date : 04/07/2017 * Description : Returns stores by state *******************************************************************/ var objStores = new List <GetStoresByState_Result>(); using (fze = new FiestaZohoDatabaseEntities()) { objStores = fze.GetStoresByState(objReq.States, Convert.ToInt32(Session["UserRole"]), objReq.EmpId, Convert.ToInt32(Session["UserID"])).ToList(); } return(Json(objStores, JsonRequestBehavior.AllowGet)); }
public ActionResult GetEmployeeByEmail(string Email) { /******************************************************************* * Author : Gopi * Date : 04/07/2017 * Description : Returns Employee details by Email address *******************************************************************/ var objSearch = new Employee_Search(); using (fze = new FiestaZohoDatabaseEntities()) { var lst = fze.GetEmployeeDetailsByEmail(Email).ToList(); if (lst.Count > 0) { objSearch.EmpDetails = lst[0]; objSearch.lstStates = fze.GetAllStates(objSearch.EmpDetails.RoleId, objSearch.EmpDetails.EmpId).ToList(); objSearch.lstStores = fze.GetStoresByState(string.Empty, objSearch.EmpDetails.RoleId, objSearch.EmpDetails.EmpId, Convert.ToInt32(Session["UserID"])).ToList(); } } return(Json(objSearch, JsonRequestBehavior.AllowGet)); }