예제 #1
0
        public ActionResult Create()
        {
            MainApplication model = new MainApplication();

            model.CatalogueDetails = new Catalogue();
            var details = _CatalogueService.GetLastCatalogue();
            int Catval  = 0;
            int length  = 0;

            if (details != null)
            {
                string bn = details.BookNumber;
                Catval = Convert.ToInt32(bn.Substring(2));
                Catval = Catval + 1;
                length = Catval.ToString().Length;
            }
            else
            {
                Catval = 1;
                length = 1;
            }
            string bookno = _UtilityService.getName("BN", length, Catval);

            model.CatalogueDetails.BookNumber = bookno;

            model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail);
            model.modulelist         = _iIModuleService.getAllModules();
            model.CompanyCode        = CompanyCode;
            model.CompanyName        = CompanyName;
            model.FinancialYear      = FinancialYear;
            return(View(model));
        }