public FM_AccountableFormInventory()
 {
     getAccountableFormInvt        = new List <AccountableForm_Inventory>();
     getAccountableFormInvtcolumns = new AccountableForm_Inventory();
     getAccountableFormInvtList    = new List <AccountableFormInvtList>();
     Accountable = new List <AccountableFormInvtList>();
 }
Example #2
0
        //Delete Accountable Form
        public ActionResult DeleteAccountableFormInventoryCTC(FM_AccountableFormInventory model, int AFORID)
        {
            AccountableForm_Inventory tblAccountableFormInventory = (from e in TOSSDB.AccountableForm_Inventory where e.AFORID == AFORID select e).FirstOrDefault();

            TOSSDB.AccountableForm_Inventory.Remove(tblAccountableFormInventory);
            TOSSDB.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #3
0
        public ActionResult Get_UpdateAccountableFormInventoryCT(FM_AccountableFormInventory model, int AFORID)
        {
            AccountableForm_Inventory tblAccountableFormInventory = (from e in TOSSDB.AccountableForm_Inventory where e.AFORID == AFORID select e).FirstOrDefault();

            model.getAccountableFormInvtcolumns.AFORID = tblAccountableFormInventory.AFORID;
            model.AFTempID = tblAccountableFormInventory.AccountFormID;
            model.getAccountableFormInvtcolumns.StartingOR = tblAccountableFormInventory.StartingOR;
            model.getAccountableFormInvtcolumns.EndingOR   = tblAccountableFormInventory.EndingOR;
            model.getAccountableFormInvtcolumns.Quantity   = tblAccountableFormInventory.Quantity;
            model.getAccountableFormInvtcolumns.Date       = tblAccountableFormInventory.Date;
            return(PartialView("InventoryofAccountableForm/CT/_UpdateCTDetails", model));
        }
Example #4
0
        //Update Accountable Form
        public ActionResult UpdateAccountableFormInventoryCT(FM_AccountableFormInventory model)
        {
            AccountableForm_Inventory tblAccountableFormInventory = (from e in TOSSDB.AccountableForm_Inventory where e.AFORID == model.getAccountableFormInvtcolumns.AFORID select e).FirstOrDefault();

            tblAccountableFormInventory.AccountFormID = model.AccountableFormInvtID;
            tblAccountableFormInventory.StartingOR    = model.getAccountableFormInvtcolumns.StartingOR;
            tblAccountableFormInventory.EndingOR      = model.getAccountableFormInvtcolumns.EndingOR;
            tblAccountableFormInventory.Quantity      = model.getAccountableFormInvtcolumns.Quantity;
            tblAccountableFormInventory.Date          = model.getAccountableFormInvtcolumns.Date;
            TOSSDB.Entry(tblAccountableFormInventory);
            TOSSDB.SaveChanges();
            return(PartialView("InventoryofAccountableForm/CT/_UpdateCTDetails", model));
        }
Example #5
0
        //Add Accountable Form Inventory
        public JsonResult AddAccountableFormInventoryCT(FM_AccountableFormInventory model)
        {
            AccountableForm_Inventory tblAccountableFormInventory = new AccountableForm_Inventory();

            tblAccountableFormInventory.AccountFormID = model.AccountableFormInvtID;
            tblAccountableFormInventory.Quantity      = model.getAccountableFormInvtcolumns.Quantity;
            tblAccountableFormInventory.StartingOR    = model.getAccountableFormInvtcolumns.StartingOR;
            tblAccountableFormInventory.EndingOR      = model.getAccountableFormInvtcolumns.EndingOR;
            tblAccountableFormInventory.Date          = model.getAccountableFormInvtcolumns.Date;
            tblAccountableFormInventory.AFTableID     = 2;
            TOSSDB.AccountableForm_Inventory.Add(tblAccountableFormInventory);
            TOSSDB.SaveChanges();
            return(Json(tblAccountableFormInventory));
        }
Example #6
0
 public FM_CollectionAndDeposit_InventoryAF()
 {
     getAccountableFormInvt        = new List <AccountableForm_Inventory>();
     getAccountableFormInvtcolumns = new AccountableForm_Inventory();
     getAccountableFormInvtList    = new List <AccountableFormInvtList>();
 }