コード例 #1
0
        public ActionResult Add()
        {
            var UserId = User.Identity.GetUserId();

            ViewBag.ListOutlet   = new SelectList(EmployeeOutletDAL.GetDataByID(int.Parse(UserId)), "OutletID", "OutletName");
            ViewBag.ListSupplier = new SelectList(SuppliersDAL.GetData(), "ID", "Name");
            return(PartialView("Add"));
        }
コード例 #2
0
ファイル: SuppliersController.cs プロジェクト: vhanweb/tes
        // ini diguunakan untuk edit

        public ActionResult Edit(int Id)
        {
            SuppliersViewModel model = SuppliersDAL.GetDataByID(Id);

            ViewBag.ListProvince = new SelectList(ProvinceDAL.GetData(), "ID", "ProvinceName");
            ViewBag.ListRegion   = new SelectList(string.Empty, "", "");
            ViewBag.ListDistrict = new SelectList(string.Empty, "", "");

            return(PartialView("Edit", model));
        }
コード例 #3
0
        public ActionResult Edit(int Id)
        {
            var UserId = User.Identity.GetUserId();

            ViewBag.ListOutlet   = new SelectList(EmployeeOutletDAL.GetDataByID(int.Parse(UserId)), "OutletID", "OutletName");
            ViewBag.ListSupplier = new SelectList(SuppliersDAL.GetData(), "ID", "Name");
            ListPurchaseOrderViewModel model = PurchaseOrderDAL.GetDataByIdPO(Id);

            return(PartialView("Edit", model));
        }
コード例 #4
0
ファイル: AJAXController.cs プロジェクト: vhanweb/tes
 public ActionResult SearchSuppliers(string searchkey)
 {
     List<SuppliersViewModel> result = SuppliersDAL.GetSearch(searchkey);
     return PartialView("_ListSuppliers", result);
 }
コード例 #5
0
ファイル: SuppliersController.cs プロジェクト: vhanweb/tes
        // membuat fungsi load
        public ActionResult Load()
        {
            List <SuppliersViewModel> model = SuppliersDAL.GetData();

            return(PartialView("_index", model));
        }
コード例 #6
0
ファイル: SuppliersController.cs プロジェクト: vhanweb/tes
        // GET: Suppliers
        // membuat tampilan index
        public ActionResult Index()
        {
            List <SuppliersViewModel> model = SuppliersDAL.GetData();

            return(View(model));
        }
コード例 #7
0
ファイル: SuppliersController.cs プロジェクト: vhanweb/tes
        public ActionResult Delete(int id)
        {
            SuppliersViewModel model = SuppliersDAL.GetDataByID(id);

            return(PartialView("Delete", model));
        }
コード例 #8
0
        public Suppliers GetSupplierById(int id)
        {
            SuppliersDAL objSuppliersDAL = new SuppliersDAL();

            return(objSuppliersDAL.GetSupplierById(id));
        }
コード例 #9
0
        public ReturnResult DeleteSupplier(int supplierId)
        {
            SuppliersDAL objSuppliersDAL = new SuppliersDAL();

            return(objSuppliersDAL.DeleteSupplier(supplierId));
        }
コード例 #10
0
        public ReturnResult SaveSupplier(Suppliers objSupplier)
        {
            SuppliersDAL objSuppliersDAL = new SuppliersDAL();

            return(objSuppliersDAL.SaveSupplier(objSupplier));
        }
コード例 #11
0
        public List <Suppliers> GetSuppliersList()
        {
            SuppliersDAL objSuppliersDAL = new SuppliersDAL();

            return(objSuppliersDAL.GetSuppliersList());
        }