private void btnEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { if (gvStockEntry.FocusedRowHandle > 0) { ObjStockEntry.SUPPLIERID = cmbSupplier.EditValue; ObjStockEntry.SUPPLIERINVOICENO = txtInvoiceNumber.EditValue; ObjStockEntry.TAXINCLUSIVE = chkTaxInclusive.EditValue; ObjStockEntry.InvoiceDate = dtpInvoice.EditValue; ObjStockEntryDetail = new StockEntryDetail(); ObjStockEntryDetail.STOCKENTRYDETAILID = gvStockEntry.GetFocusedRowCellValue("STOCKENTRYDETAILID"); ObjStockEntryDetail.ITEMID = gvStockEntry.GetFocusedRowCellValue("ITEMID"); ObjStockEntryDetail.ITEMCODEID = gvStockEntry.GetFocusedRowCellValue("ITEMCODEID"); ObjStockEntryDetail.ITEMPRICEID = gvStockEntry.GetFocusedRowCellValue("ITEMPRICEID"); ObjStockEntryDetail.SKUCODE = gvStockEntry.GetFocusedRowCellValue("SKUCODE"); ObjStockEntryDetail.ITEMCODE = gvStockEntry.GetFocusedRowCellValue("ITEMCODE"); ObjStockEntryDetail.ITEMNAME = gvStockEntry.GetFocusedRowCellValue("ITEMNAME"); ObjStockEntryDetail.COSTPRICEWT = gvStockEntry.GetFocusedRowCellValue("COSTPRICEWT"); ObjStockEntryDetail.COSTPRICEWOT = gvStockEntry.GetFocusedRowCellValue("COSTPRICEWOT"); ObjStockEntryDetail.MRP = gvStockEntry.GetFocusedRowCellValue("MRP"); ObjStockEntryDetail.SALEPRICE = gvStockEntry.GetFocusedRowCellValue("SALEPRICE"); ObjStockEntryDetail.QUANTITY = gvStockEntry.GetFocusedRowCellValue("QUANTITY"); ObjStockEntryDetail.WEIGHTINKGS = gvStockEntry.GetFocusedRowCellValue("WEIGHTINKGS"); ObjStockEntryDetail.FreeQuantity = gvStockEntry.GetFocusedRowCellValue("FREEQUANTITY"); ObjStockEntryDetail.DiscountFlat = gvStockEntry.GetFocusedRowCellValue("DISCOUNTFLAT"); ObjStockEntryDetail.DiscountPercentage = gvStockEntry.GetFocusedRowCellValue("DISCOUNTPERCENTAGE"); ObjStockEntryDetail.SchemePercentage = gvStockEntry.GetFocusedRowCellValue("SCHEMEPERCENTAGE"); ObjStockEntryDetail.SchemeFlat = gvStockEntry.GetFocusedRowCellValue("SCHEMEFLAT"); ObjStockEntryDetail.TotalPriceWT = gvStockEntry.GetFocusedRowCellValue("TOTALPRICEWT"); ObjStockEntryDetail.TotalPriceWOT = gvStockEntry.GetFocusedRowCellValue("TOTALPRICEWOT"); ObjStockEntryDetail.AppliedDiscount = gvStockEntry.GetFocusedRowCellValue("APPLIEDDISCOUNT"); ObjStockEntryDetail.AppliedScheme = gvStockEntry.GetFocusedRowCellValue("APPLIEDSCHEME"); ObjStockEntryDetail.AppliedGST = gvStockEntry.GetFocusedRowCellValue("APPLIEDDGST"); ObjStockEntryDetail.FinalPrice = gvStockEntry.GetFocusedRowCellValue("FINALPRICE"); ObjStockEntryDetail.CGST = gvStockEntry.GetFocusedRowCellValue("CGST"); ObjStockEntryDetail.SGST = gvStockEntry.GetFocusedRowCellValue("SGST"); ObjStockEntryDetail.IGST = gvStockEntry.GetFocusedRowCellValue("IGST"); ObjStockEntryDetail.CESS = gvStockEntry.GetFocusedRowCellValue("CESS"); ObjStockEntryDetail.GSTID = gvStockEntry.GetFocusedRowCellValue("GSTID"); frmAddStockRecord obj = new frmAddStockRecord(ObjStockEntry, this, ObjStockEntryDetail); obj.ShowInTaskbar = false; obj.StartPosition = FormStartPosition.CenterParent; obj.IconOptions.ShowIcon = false; obj.ShowDialog(); } }
private void btnAddItem_Click(object sender, EventArgs e) { if (cmbSupplier.EditValue != null && txtInvoiceNumber.EditValue != null && dtpInvoice.EditValue != null) { ObjStockEntry.SUPPLIERID = cmbSupplier.EditValue; ObjStockEntry.SUPPLIERINVOICENO = txtInvoiceNumber.EditValue; ObjStockEntry.TAXINCLUSIVE = chkTaxInclusive.EditValue; ObjStockEntry.InvoiceDate = dtpInvoice.EditValue; ObjStockEntryDetail = new StockEntryDetail(); frmAddStockRecord obj = new frmAddStockRecord(ObjStockEntry, this, ObjStockEntryDetail); obj.ShowInTaskbar = false; obj.StartPosition = FormStartPosition.CenterParent; obj.IconOptions.ShowIcon = false; obj.ShowDialog(); } }