コード例 #1
0
        // GET: SalesF1
        public ActionResult SalesF1(string errMsg)
        {
            if (Session["UserID"] != null)
            {
                string branchCode = Session["BranchCode"].ToString();
                ViewBag.SaleNo   = GenerateSaleNo(branchCode);
                ViewBag.LocCode  = new SelectList(_locationService.All().ToList(), "LocCode", "LocName");
                ViewBag.CustCode = new SelectList(_subsidiaryInfoService.All().ToList().Where(x => x.SubType == "1").OrderBy(x => x.SubName), "SubCode", "SubName");
                ViewBag.ItemType = new SelectList(_itemTypeService.All().ToList(), "ItemTypeCode", "ItemTypeName");
                //ViewBag.Group = LoadDropDown.LoadGroupInfoByItemType("", _CommonVmService);
                //ViewBag.SubGroup = LoadDropDown.LoadSGroupByGroupId("", "", _CommonVmService);
                //ViewBag.SubSubGroup = LoadDropDown.LoadSSGroupInfo("", "", "", _CommonVmService);
                ViewBag.ItemCode    = LoadDropDown.LoadItemBySSGroupID("", "", "", "", _itemInfoService, _CommonVmService);
                ViewBag.InvNo       = GenerateInvNo();
                ViewBag.GLProvition = Count("AR");
                ViewBag.GLEntries   = CountEntries("AR", DateTime.Now);
                //For Packing List
                ViewBag.PackItemCode = LoadDropDown.LoadEmpDlList();
                ViewBag.PackItem     = LoadDropDown.LoadEmpDlList();

                ViewBag.errMsg = errMsg;
                return(View());
            }
            else
            {
                return(RedirectToAction("SecUserLogin", "SecUserLogin"));
            }
        }