//Delete Bank Account
        public ActionResult DeleteBarangayBankAccount(FM_Barangay_BarangayName model, int BarangayBankAccountID)
        {
            Barangay_BarangayBankAccount tblBarangayName = (from e in TOSSDB.Barangay_BarangayBankAccount where e.BarangayBankAccountID == BarangayBankAccountID select e).FirstOrDefault();

            TOSSDB.Barangay_BarangayBankAccount.Remove(tblBarangayName);
            TOSSDB.SaveChanges();
            return(RedirectToAction("Index"));
        }
        //Get Bank Account
        public ActionResult Get_UpdateBarangayBankAccount(FM_Barangay_BarangayName model, int BarangayBankAccountID)
        {
            Barangay_BarangayBankAccount tblBarangayName = (from e in TOSSDB.Barangay_BarangayBankAccount where e.BarangayBankAccountID == BarangayBankAccountID select e).FirstOrDefault();

            model.getBarangayBankAccountcolumns.BarangayBankAccountID = tblBarangayName.BarangayBankAccountID;
            model.BarangayTempID      = tblBarangayName.BarangayID;
            model.BankTempID          = tblBarangayName.BankAccountTable.BankTable.BankID;
            model.AccountNumberTempID = tblBarangayName.BankAccountID;
            return(PartialView("BarangayBankAccount/_UpdateBarangayBankAccount", model));
        }
        public ActionResult UpdateBarangayBankAccount(FM_Barangay_BarangayName model)
        {
            Barangay_BarangayBankAccount tblBarangayAccount = (from e in TOSSDB.Barangay_BarangayBankAccount where e.BarangayBankAccountID == model.getBarangayBankAccountcolumns.BarangayBankAccountID select e).FirstOrDefault();

            tblBarangayAccount.BarangayID    = model.BarangayID;
            tblBarangayAccount.BankAccountID = model.AccountNumberID;
            TOSSDB.Entry(tblBarangayAccount);
            TOSSDB.SaveChanges();
            return(PartialView("BarangayBankAccount/_UpdateBarangayBankAccount", model));
        }
        //Add Bank Account
        public JsonResult AddBarangayBankAccount(FM_Barangay_BarangayName model)
        {
            Barangay_BarangayBankAccount tblBarangayAccount = new Barangay_BarangayBankAccount();

            tblBarangayAccount.BarangayID    = model.BarangayID;
            tblBarangayAccount.BankAccountID = model.AccountNumberID;
            TOSSDB.Barangay_BarangayBankAccount.Add(tblBarangayAccount);
            TOSSDB.SaveChanges();
            return(Json(tblBarangayAccount));
        }
Пример #5
0
        public FM_Barangay_BarangayName()
        {
            getBarangayName        = new List <Barangay_BarangayName>();
            getBarangayNamecolumns = new Barangay_BarangayName();
            getBarangayNameList    = new List <BarangayNameList>();

            getBarangayCollector        = new List <Barangay_CollectorName>();
            getBarangayCollectorcolumns = new Barangay_CollectorName();
            getBarangayCollectorList    = new List <BarangayCollectorList>();

            getBarangayBankAccount        = new List <Barangay_BarangayBankAccount>();
            getBarangayBankAccountcolumns = new Barangay_BarangayBankAccount();
            getBarangayBankAccountList    = new List <BarangayBankAccountList>();
        }