Exemplo n.º 1
0
        protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
        {
            cmdMode            = CommandMode.D;
            objSalesReturnItem = new Store.SaleReturnItem.BusinessObject.SaleReturnItem();
            oblSalesreturnItem = new Store.SaleReturnItem.BusinessLogic.SaleReturnItem();


            try
            {
                ImageButton btndetails = sender as ImageButton;
                GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
                objSalesReturnItem.SaleReturnItemID = Convert.ToInt32(dgvSalesReturnedItem.DataKeys[gvrow.RowIndex].Value.ToString());
                objSalesReturnItem.SalesOrderID     = 0;
                objSalesReturnItem.SalesReturnID    = 0;
                objSalesReturnItem.SalesOrderID     = 0;
                objSalesReturnItem.ItemId           = 0;
                objSalesReturnItem.ItemUnit         = "";
                objSalesReturnItem.Description      = "";
                objSalesReturnItem.ItemPrice        = 0;
                objSalesReturnItem.CreatedBy        = 1;
                objMessageInfo = oblSalesreturnItem.ManageItemMaster(objSalesReturnItem, cmdMode);
                BindSalesReturnItem();
                updateSalesReturnedItemBdInfo.Update();
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                objSalesReturnItem = null;
                objMessageInfo     = null;
                oblSalesreturnItem = null;
            }
        }
Exemplo n.º 2
0
        protected void btnCheckOut_Click(object sender, EventArgs e)
        {
            try
            {
                string transid = "";
                transid             = insertSalesReturn(txtSubTotal.Text, txtTax.Text, txtSHC.Text, txtMiscCost.Text, txttotal.Text);
                objsalesRtnItemList = new Store.SaleReturnItem.BusinessObject.SaleReturnItemList();
                // objPurchaseReceivedItemList = new Store.PurchaseReceivedItem.BusinessObject.PurchaseReceivedItemList();
                for (int i = 0; i < Gridview1.Rows.Count; i++)
                {
                    objsalesRtnItem = new Store.SaleReturnItem.BusinessObject.SaleReturnItem();
                    TextBox txtItemNames = (TextBox)Gridview1.Rows[i].FindControl("txtItemName");
                    if (txtItemNames.Text == "")
                    {
                        break;
                    }
                    TextBox txtDecs   = (TextBox)Gridview1.Rows[i].FindControl("txtDec");
                    TextBox txtPrices = (TextBox)Gridview1.Rows[i].FindControl("txtSPrice");
                    //  TextBox txtDisPres = (TextBox)Gridview1.Rows[i].FindControl("txtDisPre");
                    // TextBox txtDiss = (TextBox)Gridview1.Rows[i].FindControl("txtDis");
                    TextBox txtQuts   = (TextBox)Gridview1.Rows[i].FindControl("txtQut");
                    TextBox txtTotals = (TextBox)Gridview1.Rows[i].FindControl("txtTotal");
                    objsalesRtnItem.ItemPrefix  = txtItemNames.Text;
                    objsalesRtnItem.Description = txtDecs.Text;
                    objsalesRtnItem.ItemPrice   = Convert.ToDecimal(txtPrices.Text);

                    // objPurchaseReceivedItem.DiscountPre = Convert.ToDecimal(txtDisPres.Text);
                    //objPurchaseReceivedItem.Discount = Convert.ToDecimal(txtDiss.Text);
                    objsalesRtnItem.ItemUnit      = txtQuts.Text;
                    objsalesRtnItem.ItemPrice     = Convert.ToDecimal(txtTotals.Text);
                    objsalesRtnItem.SalesReturnID = Convert.ToInt32(transid);
                    objsalesRtnItem.SalesOrderID  = Convert.ToInt32(hfSaleOrder.Value);
                    objsalesRtnItemList.Add(objsalesRtnItem);
                }
                oblsalesRtnItem = new Store.SaleReturnItem.BusinessLogic.SaleReturnItem();
                //oblSalesItem = new Store.SalesOrderItem.BusinessLogic.SalesOrderItem();
                //oblPurchaseReceivedItem = new Store.PurchaseReceivedItem.BusinessLogic.PurchaseReceivedItem();
                objMessageInfo = oblsalesRtnItem.ManageItemMaster(objsalesRtnItem, cmdMode);
                reset();
            }
            catch (Exception ex)
            { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(SalesReturn).FullName, 1); }
        }
Exemplo n.º 3
0
        void ManageSalesReturnItem()
        {
            objSalesReturnItem = new Store.SaleReturnItem.BusinessObject.SaleReturnItem();
            oblSalesreturnItem = new Store.SaleReturnItem.BusinessLogic.SaleReturnItem();

            try
            {
                if (cmdMode == Store.Common.CommandMode.M)
                {
                    objSalesReturnItem.SaleReturnItemID = Convert.ToInt32(txtSalesReturnItemId.Text);
                }
                else
                {
                    objSalesReturnItem.SaleReturnItemID = 0;
                }
                objSalesReturnItem.SalesReturnID = Convert.ToInt32(ddlSalesReturnID.SelectedItem.Value);
                objSalesReturnItem.SalesOrderID  = Convert.ToInt32(ddlSalesOrderId.SelectedItem.Value);
                objSalesReturnItem.ItemId        = Convert.ToInt32(ddlItemId.SelectedItem.Value);
                objSalesReturnItem.ItemUnit      = Convert.ToString(txtItemUnit.Text);
                objSalesReturnItem.Description   = Convert.ToString(txtDescription.Text);
                objSalesReturnItem.ItemPrice     = Convert.ToDecimal(txtItemPrice.Text);
                if (cbIsActive.Checked)
                {
                    objSalesReturnItem.IsActive = 1;
                }
                else
                {
                    objSalesReturnItem.IsActive = 0;
                }
                objSalesReturnItem.CreatedBy = 1;
                objMessageInfo = oblSalesreturnItem.ManageItemMaster(objSalesReturnItem, cmdMode);
            }
            catch (Exception ex)
            {
            }
            finally
            {
                objSalesReturnItem = null;
                //objMessageInfo = null;
                oblSalesreturnItem = null;
            }
        }