예제 #1
0
        public ActionResult NewClient()
        {
            HttpCookie myCookie = new HttpCookie("UInfo");

            myCookie = Request.Cookies["UInfo"];
            if (myCookie != null)
            {
                Hashtable hst = new Hashtable();
                DBA      = new DBClass();
                objTools = new Utility();
                DataModel.DMLoginDetails DL = objTools.GetLoginDetails(myCookie.Value.ToString());
                hst.Add("@RoleID", Convert.ToInt16(DL.RoleID));
                ViewBag.TxtMenu = objTools.CreateMenu(hst, "[SP_T_SuperAdmin_Menu_Load]");

                ViewBag.Foto       = DL.Foto;
                ViewBag.UserName   = DL.FullName;
                ViewBag.Department = DL.DepartmentName;
                ViewBag.RolesName  = DL.RolesName;
                ViewBag.LastLogin  = Convert.ToDateTime(DL.LastLogin).ToString("dd MMM yyyy hh:mm:ss");

                hst.Clear();
                DataModel.DMInsertNewClient DNC          = new DataModel.DMInsertNewClient();
                List <DataModel.DMEnum>     DE           = objTools.GetEnum("Types of business");
                List <DataModel.DMEnum>     EMPSize      = objTools.GetEnum("Employee Size");
                List <DataModel.DMEnum>     IDType       = objTools.GetEnum("ID Type");
                List <DataModel.DMEnum>     BillingCycle = objTools.GetEnum("Billing Cycle");
                List <DataModel.DMEnum>     Products     = objTools.GetProducts();

                DNC.TOB          = DE;
                DNC.EMPSize      = EMPSize;
                DNC.IDType       = IDType;
                DNC.BillingCylce = BillingCycle;
                DNC.Products     = Products;



                return(View(DNC));
            }
            else
            {
                return(RedirectPermanent("/SuperAdmin/Default/"));
            }
        }