Пример #1
0
        public ActionResult Index()
        {
            HttpCookie myCookie = new HttpCookie("UInfo");

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

                DataModel.DMLoginDetails DL = objTools.GetLoginDetails(myCookie.Value.ToString());
                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.Add("@RoleID", Convert.ToInt16(DL.RoleID));
                ViewBag.TxtMenu = objTools.CreateMenu(hst, "[SP_T_SuperAdmin_Menu_Load]");
                return(View());
            }
            else
            {
                return(RedirectPermanent("/"));
            }
        }
Пример #2
0
        public ActionResult Index()
        {
            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]");

                DataModel.DMSearchField DY = new DataModel.DMSearchField();
                DY.MonthList = objTools.GetMonths();
                DY.YearList  = objTools.GetYears();

                return(View(DY));
            }
            else
            {
                return(RedirectPermanent("/"));
            }
        }
Пример #3
0
        public ActionResult Index()
        {
            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");
                List <DataModel.DMClientMaster> CLList = new List <DataModel.DMClientMaster>();
                HttpContext.Cache.Insert("ChaceClientList", CLList, null, Cache.NoAbsoluteExpiration, new TimeSpan(0, 30, 0));

                return(View());
            }
            else
            {
                return(RedirectPermanent("/SuperAdmin/Default/"));
            }
        }
Пример #4
0
        public ActionResult NewCustomer(int id = 0)
        {
            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]");

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

                hst.Clear();
                DataModel.DMUserNewCustomerInsert DNC    = new DataModel.DMUserNewCustomerInsert();
                DataModel.DMUsersNewCustomer      DC     = new DataModel.DMUsersNewCustomer();
                List <DataModel.DMEnum>           IDType = objTools.GetEnum("ID Type");
                if (id != 0)
                {
                    DBA = new DBClass();

                    DataTable dt = new DataTable();
                    hst.Clear();
                    hst.Add("@ClientID", DL.ClientID);
                    hst.Add("@ID", id);
                    dt = DBA.GetDataTables("[SP_UsersCustomerDetails]", hst);
                    for (var i = 0; i <= dt.Rows.Count - 1; i++)
                    {
                        DC.CompanyName   = dt.Rows[i]["CompanyName"].ToString();
                        DC.Address       = dt.Rows[i]["Address1"].ToString();
                        DC.City          = dt.Rows[i]["City"].ToString();
                        DC.Province      = dt.Rows[i]["StateProvince"].ToString();
                        DC.ZIP           = dt.Rows[i]["ZipCode"].ToString();
                        DC.Phone         = dt.Rows[i]["Phone"].ToString();
                        DC.NPWP          = dt.Rows[i]["NPWP"].ToString();
                        DC.ContactPerson = dt.Rows[i]["ContactPerson"].ToString();
                    }
                }
                DNC.NewCustomer = DC;
                DNC.IDType      = IDType;

                return(View(DNC));
            }
            else
            {
                return(RedirectPermanent("/"));
            }
        }
Пример #5
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/"));
            }
        }