コード例 #1
0
        public ActionResult GetStates()
        {
            /*******************************************************************
            *  Author      : Gopi
            *  Date        : 04/07/2017
            *  Description : Returns all the states by role
            *******************************************************************/
            var objStates = new List <GetAllStates_Result>();

            using (fze = new FiestaZohoDatabaseEntities())
            {
                objStates = fze.GetAllStates(Convert.ToInt32(Session["UserRole"]), Convert.ToInt32(Session["UserID"])).ToList();
            }
            return(Json(objStates, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        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));
        }