private void btnEditStockInventory_Click(object sender, EventArgs e)
 {
     try
     {
         SalesStockTransactionDetailUI loSalesStockTransactionDetail = new SalesStockTransactionDetailUI(dgvDetailStockInventory.CurrentRow.Cells["Id"].Value.ToString(),
                                                                                                         dgvDetailStockInventory.CurrentRow.Cells["StockId"].Value.ToString(),
                                                                                                         dgvDetailStockInventory.CurrentRow.Cells["LocationId"].Value.ToString(),
                                                                                                         decimal.Parse(dgvDetailStockInventory.CurrentRow.Cells["SOQty"].Value.ToString()),
                                                                                                         decimal.Parse(dgvDetailStockInventory.CurrentRow.Cells["QtyOut"].Value.ToString()),
                                                                                                         decimal.Parse(dgvDetailStockInventory.CurrentRow.Cells["QtyVariance"].Value.ToString()),
                                                                                                         decimal.Parse(dgvDetailStockInventory.CurrentRow.Cells["UnitPrice"].Value.ToString()),
                                                                                                         dgvDetailStockInventory.CurrentRow.Cells["DiscountId"].Value.ToString(),
                                                                                                         decimal.Parse(dgvDetailStockInventory.CurrentRow.Cells["DiscountAmount"].Value.ToString()),
                                                                                                         decimal.Parse(dgvDetailStockInventory.CurrentRow.Cells["TotalPrice"].Value.ToString()),
                                                                                                         dgvDetailStockInventory.CurrentRow.Cells["Remarks"].Value.ToString());
         loSalesStockTransactionDetail.ParentList = this;
         loSalesStockTransactionDetail.ShowDialog();
     }
     catch (Exception ex)
     {
         ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnEditStockInventory_Click");
         em.ShowDialog();
         return;
     }
 }
 private void btnAddStockInventory_Click(object sender, EventArgs e)
 {
     try
     {
         SalesStockTransactionDetailUI loSalesStockTransactionDetail = new SalesStockTransactionDetailUI();
         loSalesStockTransactionDetail.ParentList = this;
         loSalesStockTransactionDetail.ShowDialog();
     }
     catch (Exception ex)
     {
         ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnAddStockInventory_Click");
         em.ShowDialog();
         return;
     }
 }