Example #1
0
        public ActionResult Employee()
        {
            HttpCookie myCookie = new HttpCookie("UInfo");

            myCookie = Request.Cookies["UInfo"];
            if (myCookie != null)
            {
                Hashtable hst = new Hashtable();
                objTools = new Utility();

                DataModel.DMUsersLoginDetails DL = objTools.GetClientLoginDetails(myCookie.Value.ToString());
                ViewBag.Foto     = DL.Foto;
                ViewBag.UserName = DL.FullName;
                ViewBag.ClientID = DL.ClientID;

                ViewBag.LastLogin = Convert.ToDateTime(DL.LastLogin).ToString("dd MMM yyyy HH:mm:ss");
                hst.Add("@ClientID", Convert.ToInt16(DL.ClientID));
                ViewBag.TxtMenu = objTools.CreateMenu(hst, "[SP_UsersMenuLoad]");

                DMSearchField DY = new DMSearchField();
                hst.Clear();
                hst.Add("@ClientID", DL.ClientID);
                DY.BranchOffice = objTools.FillCombo("[SP_OfficeToCombo]", hst);


                return(View(DY));
            }
            else
            {
                return(RedirectPermanent("/"));
            }
        }