コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            inventoryhiscontroller        invenCtl        = new inventoryhiscontroller();
            List <inventory_history_info> invenHistoryLst = new List <inventory_history_info>();

            invenHistoryLst = invenCtl.selectallinventory_history();

            InventoryHisGv.DataSource = invenHistoryLst;
            InventoryHisGv.DataBind();
        }
コード例 #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Invertorycontroller inventoryCtlr = new Invertorycontroller();
            Inventoryinfo       inventoryInfo = new Inventoryinfo();

            inventoryInfo.ProductID   = ProductData.SelectedValue;
            inventoryInfo.UnitInStock = Convert.ToInt32(txtProductQtty.Text);

            inventoryCtlr.InsertInventory(inventoryInfo);

            inventoryhiscontroller invenHisCtlr = new inventoryhiscontroller();
            inventory_history_info invenHisInfo = new inventory_history_info();

            invenHisInfo.ProductID        = ProductData.SelectedValue;
            invenHisInfo.Product_quantity = txtProductQtty.Text;

            invenHisCtlr.InsertInventory_History(invenHisInfo);
            SelectAllInventory();
        }