Beispiel #1
0
        protected void rpAgentOrderdetails_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            int TempID = 0;

            TempID = Convert.ToInt32(e.CommandArgument);
            switch (e.CommandName)
            {
            case ("delete"):
            {
                indentCart              = new IndentCart();
                purchaseData            = new PurchaseData();
                indentCart.IndentCartId = TempID;
                indentCart.Tokan        = hftokanno.Value;
                indentCart.IndentBy     = GlobalInfo.Userid;
                indentCart.Purpose      = string.Empty;
                indentCart.Flag         = 2; //2 for delete
                purchaseData.IndentCartDML(indentCart);

                bindCartList(indentCart);
                //RemoveTempID(TempID);
                //invocie.TokanId = hftokanno.Value;
                //invocie.UserID = GlobalInfo.Userid;
                //BindAgntTempItam(invocie);
                upMain.Update();

                break;
            }
            }
        }
Beispiel #2
0
        protected void btnAddItem_Click(object sender, EventArgs e)
        {
            indentCart          = new IndentCart();
            purchaseData        = new PurchaseData();
            indentCart.Tokan    = hftokanno.Value;
            indentCart.IndentBy = GlobalInfo.Userid;
            indentCart.ItemId   = Convert.ToInt32(dpItem.SelectedItem.Value);
            indentCart.Quantity = Convert.ToDecimal(txtQuantity.Text);
            indentCart.Purpose  = txtPurpose.Text;

            indentCart.Flag = 1; //1 for INSERT

            bool result = purchaseData.IndentCartDML(indentCart);

            if (result)
            {
                bindCartList(indentCart);
            }
            dpSelect();
        }