Example #1
0
    // GET: Admin
    public ActionResult Index()
    {
        string roleid      = (string)Session["user_role_id"];
        string userid      = (string)Session["user_au_id"];
        string companyId   = (string)Session["company_id"];
        string accessToken = (string)Session["AccessToken"];
        string ConName     = "Deshboard";
        string ActionName  = "index";

        if (string.IsNullOrEmpty(roleid) || string.IsNullOrEmpty(userid) || string.IsNullOrEmpty(companyId))
        {
            Response.Redirect("/Login/Index");
        }
        bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName, accessToken);

        if (!permission)
        {
            try
            {
                Response.Redirect("/Error/Index");
            }
            catch (Exception ex)
            {
                Response.Redirect("/Login/Index");
            }
        }


        return(View());
    }
Example #2
0
        //
        // GET: /Control/
        public ActionResult Index()
        {
            string roleid    = (string)Session["user_role_id"];
            string userid    = (string)Session["user_au_id"];
            string companyId = (string)Session["company_id"];

            string ConName    = "Control";
            string ActionName = "index";

            if (roleid == null || roleid == string.Empty)
            {
                if ((roleid == null || roleid == string.Empty) && (userid == null || userid == string.Empty) && (companyId == null || companyId == string.Empty))
                {
                    Response.Redirect("/Login/Index");
                }
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }

            return(View());
        }
Example #3
0
        public ActionResult Add()
        {
            string roleid    = (string)Session["user_role_id"];
            string userid    = (string)Session["user_au_id"];
            string companyId = (string)Session["company_id"];

            string ConName    = "Receiving";
            string ActionName = "add";

            if ((roleid == null || roleid == string.Empty) && (userid == null || userid == string.Empty) && (companyId == null || companyId == string.Empty))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }

            ViewBag.receive_master_id = "0";

            if (Request.QueryString["receive_master_id"] != null)
            {
                ViewBag.receive_master_id = Request.QueryString["receive_master_id"];
            }
            ViewBag.po_master_id = "0";

            if (Request.QueryString["po_master_id"] != null)
            {
                ViewBag.po_master_id = Request.QueryString["po_master_id"];
            }
            return(View());
        }
Example #4
0
        // GET: Admin
        public ActionResult Index()
        {
            string roleid = (string)Session["user_role_id"];
            string userid = (string)Session["user_au_id"];
            string companyId = (string)Session["company_id"];

            string ConName = "Deshboard";
            string ActionName = "index";

            if (string.IsNullOrEmpty(roleid) || string.IsNullOrEmpty(userid) || string.IsNullOrEmpty(companyId))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);
            if (!permission)
            {
                try
                {
                    Response.Redirect("/Error/Index");
                }
                catch (Exception ex)
                {
                    Response.Redirect("/Login/Index");
                }
            }

            string OrderCount = "0";//CoreRules.GetAllOrder(int.Parse(companyId));
            string BatchCount = "0";//CoreRules.GetAllBatch(int.Parse(companyId));
            ViewBag.OrderCount = OrderCount;
            ViewBag.BatchCount = BatchCount;
            return View();
        }
        public ActionResult Add()
        {
            string roleid = (string)Session["user_role_id"];
            string userid = (string)Session["user_au_id"];

            string ConName    = "Grn";
            string ActionName = "Add";

            if (string.IsNullOrEmpty(roleid) && string.IsNullOrEmpty(userid))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }
            return(View());
        }
        public ActionResult Add()
        {
            string roleid = (string)Session["user_role_id"];
            string userid = (string)Session["user_au_id"];

            string ConName    = "Supplier";
            string ActionName = "Add";

            if ((roleid == null || roleid == string.Empty) && (userid == null || userid == string.Empty))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }
            return(View());
        }
Example #7
0
        public ActionResult DeliverableTransferOrder()
        {
            var roleid = (string)Session["user_role_id"];
            var userid = (string)Session["user_au_id"];

            var ConName    = "TransferOrder";
            var ActionName = "DeliverableTransferOrder";

            if (string.IsNullOrEmpty(roleid) && string.IsNullOrEmpty(userid))
            {
                Response.Redirect("/Login/Index");
            }
            var permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }
            return(View());
        }
Example #8
0
        public ActionResult GetProductLiftingStatus()
        {
            string roleid = (string)Session["user_role_id"];
            string userid = (string)Session["user_au_id"];

            string ConName    = "Chart";
            string ActionName = "GetProductLiftingStatus";

            if ((roleid == null || roleid == string.Empty) && (userid == null || userid == string.Empty))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }
            return(View());
        }
        public ActionResult PartyWiseStock()
        {
            string roleid = (string)Session["user_role_id"];
            string userid = (string)Session["user_au_id"];

            string ConName    = "Inventory";
            string ActionName = "PartyWiseStock";

            if ((roleid == null || roleid == string.Empty) || (userid == null || userid == string.Empty))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }
            return(View());
        }
        public ActionResult RetailerDeliveryInformation()
        {
            string roleid = (string)Session["user_role_id"];
            string userid = (string)Session["user_au_id"];

            string ConName    = "MdDeliveryToRetailer";
            string ActionName = "RetailerDeliveryInformation";

            if ((roleid == null || roleid == string.Empty) && (userid == null || userid == string.Empty))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }

            return(View());
        }
        public ActionResult SellThroughBackCustomerToADA()
        {
            string roleid = (string)Session["user_role_id"];
            string userid = (string)Session["user_au_id"];

            string ConName    = "Inventory";
            string ActionName = "SellThroughBackCustomerToADA";

            if ((roleid == null || roleid == string.Empty) && (userid == null || userid == string.Empty))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }

            return(View());
        }
        public ActionResult DeliverySummaryReportFromADAMDDBIS()
        {
            string roleid = (string)Session["user_role_id"];
            string userid = (string)Session["user_au_id"];

            string ConName    = "Inventory";
            string ActionName = "DeliverySummaryReportFromADAMDDBIS";

            if ((roleid == null || roleid == string.Empty) && (userid == null || userid == string.Empty))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }

            return(View());
        }
        public ActionResult profile(int customer_id)
        {
            string roleid    = (string)Session["user_role_id"];
            string userid    = (string)Session["user_au_id"];
            string companyId = (string)Session["company_id"];

            string ConName    = "Customer";
            string ActionName = "profile";

            if ((roleid == null || roleid == string.Empty) && (userid == null || userid == string.Empty) && (companyId == null || companyId == string.Empty))
            {
                Response.Redirect("/Login/Index");
            }
            bool permission = CoreRules.UserPermission(roleid, userid, ConName, ActionName);

            if (!permission)
            {
                Response.Redirect("/Error/Index");
            }

            ViewBag.customer_id = customer_id;

            return(View());
        }