Example #1
0
        public ActionResult Uk(int id = 0, string additionalAction = null)
        {
            if (id == 0)
            {
                id = 100;
            }

            if (string.IsNullOrEmpty(additionalAction))
            {
                CabinetUkData data = MyExcel.GetDataFromDataSource(id);
                if (TempData["postHref"] != null)
                {
                    ViewData["postHref"] = TempData["postHref"];
                }
                else
                {
                    ViewData["postHref"] = "NULL";
                }
                return(View("UkView", data));
            }
            else if (additionalAction == "editsummary")
            {
                CabinetUkData data = MyExcel.GetDataFromDataSource(id);
                return(View("UkEditSummary", data));
            }
            else if (additionalAction == "editdetails")
            {
                CabinetUkData data = MyExcel.GetDataFromDataSource(id);
                return(View("UkEditDetails", data));
            }
            else
            {
                return(View());
            }
        }
Example #2
0
        public ActionResult Mc(int id)
        {
            //var tableName = "m";
            //DataRow row = MyExcel.GetDetails(tableName, id);

            var oldFunds = MyExcel.GetDetailsList("f_2", $"[Номер УК]='{id}' And [действующие]=0");
            var curFunds = MyExcel.GetDetailsList("f_2", $"[Номер УК]='{id}' And [действующие]=1");

            CabinetUkData data = MyExcel.GetDataFromDataSource(id);

            ViewBag.oldFunds = oldFunds;
            ViewBag.curFunds = curFunds;

            return(View(data));
        }
Example #3
0
        public ActionResult UkPost(int id = 0, string additionalAction = null)
        {
            string path = "/cabinet/uk/";

            if (id != 0)
            {
                path = path + id.ToString() + "/";
            }
            if (additionalAction == "editsummary")
            {
                CabinetUkData data = MyExcel.GetDataFromDataSource(id);
                TempData["postHref"] = "local#summary";
            }
            else if (additionalAction == "editsummary2")
            {
                CabinetUkData data = MyExcel.GetDataFromDataSource(id);
                TempData["postHref"] = "local#summary2";
            }
            else if (additionalAction == "editdetails")
            {
                CabinetUkData data = MyExcel.GetDataFromDataSource(id);
                TempData["postHref"] = "local#details";
            }
            else if (additionalAction == "editmaindetails")
            {
                CabinetUkData data = MyExcel.GetDataFromDataSource(id);
                TempData["postHref"] = "local#maindetails";
            }
            else
            {
                CabinetUkData data = MyExcel.GetDataFromDataSource(id);
                ViewData["postHref"] = "NULL";
                return(View("UkView", data));
            }
            return(Redirect(path));
        }