예제 #1
0
 private void CloseTransaction()
 {
     Stock clsStock = new Stock();
     clsStock.TagInactive(long.Parse(lblStockID.Text));
     clsStock.CommitAndDispose();
 }
예제 #2
0
        protected void lstItem_ItemCommand(object sender, DataListCommandEventArgs e)
        {
            HtmlInputCheckBox chkList = (HtmlInputCheckBox)e.Item.FindControl("chkList");
            string stParam = string.Empty;
            switch (e.CommandName)
            {
                case "imgItemDelete":
                    Stock clsStock = new Stock();
                    clsStock.Delete(chkList.Value);
                    clsStock.CommitAndDispose();

                    LoadList();
                    break;
                case "imgItemEdit":
                    stParam = "?task=" + Common.Encrypt("additem", Session.SessionID) + "&stockid=" + Common.Encrypt(chkList.Value, Session.SessionID);
                    Response.Redirect("Default.aspx" + stParam);
                    break;
                case "imgItemTransfer":
                    stParam = "?task=" + Common.Encrypt("transfer", Session.SessionID) + "&stockid=" + Common.Encrypt(chkList.Value, Session.SessionID);
                    Response.Redirect("Default.aspx" + stParam);
                    break;
                case "imgTransactionTag":
                    {
                        Stock clsStock1 = new Stock();
                        clsStock1.TagInactive(long.Parse(chkList.Value));
                        clsStock1.CommitAndDispose();
                        LoadList();
                    }
                    break;
            }
        }