//GET: To assign account to customer profile
        public ActionResult assignAccount()
        {
            var acctType   = _content.acctIndex.ToList(); //To get all available account from the database.
            var customType = _content.custom.ToList();    //To get all customer profiles from the database.
            var userT      = _content.Users.ToList();     //To get all users from the database.
            var statT      = _content.stat.ToList();      //To get currency choice from the database.

            var vm = new AccIndexer                       //Using view model
            {
                CustomerAccounts = new CustomerAccounts(),
                AccountT         = acctType,
                CustomerT        = customType,
                userT            = userT,
                status           = statT
            };

            return(View(vm));
        }
        //GET: To Edit GL Account Details
        public ActionResult EditAcc(int id)
        {
            var editAccount = _content.acctIndex.SingleOrDefault(m => m.id == id);  //To get selected GL Account detai from database.

            if (editAccount == null)
            {
                return(HttpNotFound());
            }
            else
            {
                var vm = new AccIndexer //Using view model
                {
                    type         = _content.glCategory.ToList(),
                    AccountIndex = editAccount
                };

                return(View(vm));
            }
        }
        //GET: To assign account to customer profile
        public ActionResult profileAssign(int id)
        {
            var key        = id;                                               //To store customer profile id
            var name       = _content.custom.SingleOrDefault(m => m.id == id); //To store customer profile name
            var keyName    = name.customerName;                                //To store customer profile name
            var acctType   = _content.acctIndex.ToList();                      //To load all the available accounts from the database
            var customType = _content.custom.ToList();                         //To load all the customer profiles in the database
            var userT      = _content.Users.ToList();                          //To load all the users from the database
            var statT      = _content.stat.ToList();                           //To load currency name from the database


            var vm = new AccIndexer     //Using view model
            {
                CustomerAccounts = new CustomerAccounts(),
                AccountT         = acctType,
                CustomerT        = customType,
                userT            = userT,
                profileKey       = key,
                profileName      = keyName,
                status           = statT
            };

            return(View(vm));
        }