示例#1
0
        //Account Type Table Partial View
        public ActionResult Get_AccountTypeTable()
        {
            FM_GeneralReference_BankAccount model           = new FM_GeneralReference_BankAccount();
            List <BankAccount_AccountType>  tbl_AccountType = new List <BankAccount_AccountType>();

            var SQLQuery = "SELECT * FROM DB_TOSS.dbo.BankAccount_AccountType order by AccountType asc";

            //SQLQuery += " WHERE (IsActive != 0)";
            using (SqlConnection Connection = new SqlConnection(GlobalFunction.ReturnConnectionString()))
            {
                Connection.Open();
                using (SqlCommand command = new SqlCommand("[dbo].[SP_AccountTypeList]", Connection))
                {
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.Add(new SqlParameter("@SQLStatement", SQLQuery));
                    SqlDataReader dr = command.ExecuteReader();
                    while (dr.Read())
                    {
                        tbl_AccountType.Add(new BankAccount_AccountType()
                        {
                            AccountTypeID = GlobalFunction.ReturnEmptyInt(dr[0]),
                            AccountType   = GlobalFunction.ReturnEmptyString(dr[1]),
                        });
                    }
                }
                Connection.Close();
            }

            model.getAccountType = tbl_AccountType.ToList();


            return(PartialView("BankAccounts/_AccountTypeTable", model.getAccountType));
        }
示例#2
0
        //Dropdown Account Type
        public ActionResult GetDynamicAccountType()
        {
            FM_GeneralReference_BankAccount model = new FM_GeneralReference_BankAccount();

            model.getBankAccountAccountTypeList = new SelectList((from s in TOSSDB.BankAccount_AccountType.ToList() orderby s.AccountTypeID ascending select new { AccountTypeID = s.AccountTypeID, AccountType = s.AccountType }), "AccountTypeID", "AccountType");
            return(PartialView("BankAccounts/_DynamicDDAccountType", model));
        }
示例#3
0
        //Dropdown Bank
        public ActionResult GetDynamicBankName()
        {
            FM_GeneralReference_BankAccount model = new FM_GeneralReference_BankAccount();

            model.BankAccountBankList = new SelectList((from s in TOSSDB.BankTables.ToList() orderby s.BankName ascending select new { BankID = s.BankID, BankName = s.BankName }), "BankID", "BankName");
            return(PartialView("BankAccounts/_DynamicDDBankName", model));
        }
示例#4
0
        //Delete Bank Account
        public ActionResult DeleteBankAccount(FM_GeneralReference_BankAccount model, int BankAccountID)
        {
            BankAccountTable tblBankAccount = (from e in TOSSDB.BankAccountTables where e.BankAccountID == BankAccountID select e).FirstOrDefault();

            TOSSDB.BankAccountTables.Remove(tblBankAccount);
            TOSSDB.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#5
0
        //Delete Account Type
        public ActionResult DeleteAccountType(FM_GeneralReference_BankAccount model, int AccountTypeID)
        {
            BankAccount_AccountType tblAccountType = (from e in TOSSDB.BankAccount_AccountType where e.AccountTypeID == AccountTypeID select e).FirstOrDefault();

            TOSSDB.BankAccount_AccountType.Remove(tblAccountType);
            TOSSDB.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#6
0
        //Get Update Account Type
        public ActionResult Get_UpdateAccountType(FM_GeneralReference_BankAccount model, int AccountTypeID)
        {
            BankAccount_AccountType tblAccountType = (from e in TOSSDB.BankAccount_AccountType where e.AccountTypeID == AccountTypeID select e).FirstOrDefault();

            model.getAccountTypeColumns.AccountTypeID = tblAccountType.AccountTypeID;
            model.getAccountTypeColumns.AccountType   = tblAccountType.AccountType;
            return(PartialView("BankAccounts/_UpdateAccountType", model));
        }
示例#7
0
        public ActionResult GetSelectedDynamicAccountCode(int AccountCodeIDTempID)
        {
            FM_GeneralReference_BankAccount model = new FM_GeneralReference_BankAccount();

            model.getBankAccountAccountCodeList = new SelectList((from s in TOSSDB.BankAccount_AccountCode.ToList() orderby s.AccountCode ascending select new { AccountCodeID = s.AccountCodeID, AccountCode = s.AccountCode }), "AccountCodeID", "AccountCode");
            model.AccountCodeID = AccountCodeIDTempID;
            return(PartialView("BankAccounts/_DynamicDDAccountCode", model));
        }
示例#8
0
        //Update Account Type
        public ActionResult UpdateAccountType(FM_GeneralReference_BankAccount model)
        {
            BankAccount_AccountType tblAccountType = (from e in TOSSDB.BankAccount_AccountType where e.AccountTypeID == model.getAccountTypeColumns.AccountTypeID select e).FirstOrDefault();

            tblAccountType.AccountType = model.getAccountTypeColumns.AccountType;
            TOSSDB.Entry(tblAccountType);
            TOSSDB.SaveChanges();
            return(PartialView("BankAccounts/_UpdateAccountType", model));
        }
示例#9
0
        //Add Account Type
        public JsonResult AddAccountType(FM_GeneralReference_BankAccount model)
        {
            BankAccount_AccountType tblAccountType = new BankAccount_AccountType();

            tblAccountType.AccountType = GlobalFunction.ReturnEmptyString(model.getAccountTypeColumns.AccountType);
            TOSSDB.BankAccount_AccountType.Add(tblAccountType);
            TOSSDB.SaveChanges();
            return(Json(tblAccountType));
        }
示例#10
0
        //Get Update Bank Account
        public ActionResult Get_UpdateBankAccount(FM_GeneralReference_BankAccount model, int BankAccountID)
        {
            BankAccountTable tblBankAccount = (from e in TOSSDB.BankAccountTables where e.BankAccountID == BankAccountID select e).FirstOrDefault();

            model.getBankAccountColumns.BankAccountID = tblBankAccount.BankAccountID;
            model.BankNameIDTemp = tblBankAccount.BankID;
            model.getBankAccountColumns.AccountName = tblBankAccount.AccountName;
            model.getBankAccountColumns.AccountNo   = tblBankAccount.AccountNo;
            // model.FundID = tblBankAccount.FundID;
            model.getBankAccountColumns.CurrentAccount = tblBankAccount.CurrentAccount;
            model.AccountCodeIDTemp = tblBankAccount.AccountCodeID;
            model.AccountTypeIDTemp = tblBankAccount.AccountTypeID;
            return(PartialView("BankAccounts/_UpdateBankAccount", model));
        }
示例#11
0
        //Update Bank Account
        public ActionResult UpdateBankAccount(FM_GeneralReference_BankAccount model)
        {
            BankAccountTable tblBankAccount = (from e in TOSSDB.BankAccountTables where e.BankAccountID == model.getBankAccountColumns.BankAccountID select e).FirstOrDefault();

            tblBankAccount.BankID      = model.BankAccountBankID;
            tblBankAccount.AccountName = model.getBankAccountColumns.AccountName;
            tblBankAccount.AccountNo   = model.getBankAccountColumns.AccountNo;
            // tblBankAccount.FundID = model.FundID;
            tblBankAccount.CurrentAccount = model.getBankAccountColumns.CurrentAccount;
            tblBankAccount.AccountCodeID  = model.AccountCodeID;
            tblBankAccount.AccountTypeID  = model.AccountTypeID;
            TOSSDB.Entry(tblBankAccount);
            TOSSDB.SaveChanges();
            return(PartialView("BankAccounts/_UpdateBankAccount", model));
        }
示例#12
0
        //Add Bank Account
        public JsonResult AddBankAccount(FM_GeneralReference_BankAccount model)
        {
            BankAccountTable tblBankAccount = new BankAccountTable();

            tblBankAccount.BankID      = model.BankAccountBankID;
            tblBankAccount.AccountName = model.getBankAccountColumns.AccountName;
            tblBankAccount.AccountNo   = model.getBankAccountColumns.AccountNo;
            // tblBankAccount.FundID = model.FundID;
            tblBankAccount.CurrentAccount = model.getBankAccountColumns.CurrentAccount;
            tblBankAccount.AccountCodeID  = model.AccountCodeID;
            tblBankAccount.AccountTypeID  = model.AccountTypeID;
            TOSSDB.BankAccountTables.Add(tblBankAccount);
            TOSSDB.SaveChanges();
            return(Json(tblBankAccount));
        }
示例#13
0
        //Bank Account Table Partial View
        public ActionResult Get_BankAccountTable()
        {
            FM_GeneralReference_BankAccount model           = new FM_GeneralReference_BankAccount();
            List <BankAccountList>          tbl_BankAccount = new List <BankAccountList>();

            var SQLQuery = "SELECT * FROM DB_TOSS.dbo.BankAccountTable,dbo.BankTable,dbo.FundType_FundName,dbo.BankAccount_AccountCode,dbo.BankAccount_AccountType where dbo.BankTable.BankID=BankAccountTable.BankID and dbo.FundType_FundName.FundID=BankAccountTable.FundID and dbo.BankAccount_AccountCode.AccountCodeID=BankAccountTable.AccountCodeID and dbo.BankAccount_AccountType.AccountTypeID=BankAccountTable.AccountTypeID";

            //SQLQuery += " WHERE (IsActive != 0)";
            using (SqlConnection Connection = new SqlConnection(GlobalFunction.ReturnConnectionString()))
            {
                Connection.Open();
                using (SqlCommand command = new SqlCommand("[dbo].[SP_BankAccountTable]", Connection))
                {
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.Add(new SqlParameter("@SQLStatement", SQLQuery));
                    SqlDataReader dr = command.ExecuteReader();
                    while (dr.Read())
                    {
                        tbl_BankAccount.Add(new BankAccountList()
                        {
                            BankAccountID  = GlobalFunction.ReturnEmptyInt(dr[0]),
                            BankName       = GlobalFunction.ReturnEmptyString(dr[9]),
                            AccountName    = GlobalFunction.ReturnEmptyString(dr[2]),
                            AccountNo      = GlobalFunction.ReturnEmptyString(dr[3]),
                            FundName       = GlobalFunction.ReturnEmptyString(dr[11]),
                            CurrentAccount = GlobalFunction.ReturnEmptyString(dr[5]),
                            AccountCode    = GlobalFunction.ReturnEmptyString(dr[13]),
                            AccountType    = GlobalFunction.ReturnEmptyString(dr[15]),
                        });
                    }
                }
                Connection.Close();
            }
            model.getBankAccountList = tbl_BankAccount.ToList();
            return(PartialView("BankAccounts/_BankAccountTable", model.getBankAccountList));
        }
示例#14
0
        //Get Add Bank Account Partial View
        public ActionResult Get_AddBankAccount()
        {
            FM_GeneralReference_BankAccount model = new FM_GeneralReference_BankAccount();

            return(PartialView("BankAccounts/_AddBankAccount", model));
        }