public ActionResult BrandUpdateDetails(int id)
        {
            BrandMaster brnd = new BrandMaster();

            TempData["BrandList"] = _BrandMasterService.GetAllBrands();
            brnd = _BrandMasterService.getById(id);
            return(View(brnd));
        }
        public ActionResult CreateDiscount()
        {
            DatabaseName = CompanyName + " " + FinancialYear;
            MainApplication model = new MainApplication()
            {
                DiscountMasterDetails = new DiscountMaster(),
            };

            string year = FinancialYear;

            string[] yr       = year.Split(' ', '-');
            string   FinYr    = "/" + yr[2].Substring(2) + "-" + yr[6].Substring(2);
            string   DiscCode = string.Empty;
            var      details  = _DiscountMasterService.GetLastRowrByFinYr(FinYr);
            int      discval  = 0;
            int      length   = 0;

            if (details != null)
            {
                DiscCode = details.DiscountCode.Substring(4, 6);
                length   = (Convert.ToInt32(DiscCode) + 1).ToString().Length;
                discval  = Convert.ToInt32(DiscCode) + 1;
                discval  = details.Id;
                discval  = discval + 1;
                length   = discval.ToString().Length;
            }
            else
            {
                discval = 1;
                length  = 1;
            }
            DiscCode = _UtilityService.getName("DISC", length, discval);
            DiscCode = DiscCode + FinYr;
            model.DiscountMasterDetails.DiscountCode = DiscCode;
            TempData["PreviousDiscountCode"]         = DiscCode;

            model.BrandMasterList    = _BrandMasterService.GetAllBrands();
            model.userCredentialList = _UserCredentialService.GetUserCredentialsByEmail(UserEmail);
            model.modulelist         = _ModuleService.getAllModules();
            model.CompanyCode        = CompanyCode;
            model.CompanyName        = CompanyName;
            model.FinancialYear      = FinancialYear;
            return(View(model));
        }
Example #3
0
        public ActionResult ReplicaCompany(FormCollection frmcol)
        {
            string Company = frmcol["CompanyNameWithFinancial"];

            CompanyCode  = Company.Substring(0, 9);
            DatabaseName = Company.Substring(10);
            TempData["LogedInCompanyCode"] = CompanyCode;
            TempData["BankMasters"]        = _BankService.getAllBanks();
            TempData["ClientMasters"]      = _ClientMasterService.GetAllClients();
            TempData["ClientBanks"]        = _ClientBankDetailService.GetAllClientBanks();
            TempData["DesignationMasters"] = _DesignationMasterService.getAllDesignation();
            TempData["DesignMasters"]      = _DesignService.GetAll();
            TempData["BrandMasters"]       = _BrandMasterService.GetAllBrands();
            TempData["EmployeeMasters"]    = _EmployeeMasterService.getAllemployees();
            TempData["GodownMasters"]      = _GodownService.GetGodownNames();
            TempData["GodownAddresses"]    = _GodownAddressService.GetAllGodownAddresses();
            TempData["ItemCategory"]       = _ItemCategoryService.GetItemCategories();
            TempData["ItemSubCategory"]    = _ItemSubCategoryService.GetItemSubCategories();
            TempData["ItemMasters"]        = _ItemService.getAllItems();
            TempData["NonInventoryItems"]  = _NonInventoryItemService.GetAll();
            TempData["BarcodeNumbers"]     = _BarcodeNumberService.GetAllBarcodeNumbers();
            TempData["JobWorkers"]         = _JobWorkerService.GetAll();
            TempData["JobWorkerTypes"]     = _JobWorkTypeService.GetAll();
            //TempData["SalesIncentives"] = _SalesIncentiveService.GetAllSI();
            TempData["ShopMasters"]       = _ShopService.GetAll();
            TempData["TypeOfMaterials"]   = _TypeOfMaterialService.GetMaterialList();
            TempData["UnitMasters"]       = _UnitService.getallsize();
            TempData["SupplierMasters"]   = _SuppliersMasterService.getAllSuppliers();
            TempData["SupplierBanks"]     = _SupplierBankDetailService.GetAllSupplierBanks();
            TempData["TransportMasters"]  = _TransportService.GetAllTransport();
            TempData["TransportBanks"]    = _TransportBankDetailService.GetAllTransportBanks();
            TempData["Users"]             = _UserService.getAllusers();
            TempData["CommissionMasters"] = _CommissionService.GetAll();
            TempData["Modules"]           = _ModuleService.getAllModules();
            TempData["UserCredentials"]   = _UserCredentialService.GetAllUserCredentials();
            TempData["EmployeeCompanies"] = _EmployeesCompanyService.GetAllEmployeeCompanies();
            return(RedirectToAction("ReplicateTheValues"));
        }