Ejemplo n.º 1
0
        private void gvGRNList_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex >= 0)
                {
                    objGRN = new GRN();
                    bindItemList.DataSource = null;
                    objGRN = objGRNDL.Get(Convert.ToInt64(gvGRNList.Rows[e.RowIndex].Cells["ColGRNNO"].Value));
                    if (objGRN != null)
                    {
                        bindItemList.DataSource = objGRNDL.GetDataView_Items(objGRN.GRNNo);

                        txtGRNNO.Text = objGRN.GRNNo.ToString();

                        DataTable dt = objGRNDL.Get_GRN_Batch(objGRN.GRNNo);

                        if (dt.Rows.Count > 0)
                        {
                            txtBatchNo.Text = dt.Rows[0]["BatchID"].ToString();

                            txtMTNNO.Text = dt.Rows[0]["MTNNO"].ToString();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 2
0
        private void gvGRNList_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex >= 0)
                {
                    objGRN = new GRN();
                    bindItemList.DataSource = null;
                    objGRN = objGRNDL.Get(Convert.ToInt64(gvGRNList.Rows[e.RowIndex].Cells["ColGRNNO"].Value));
                    if (objGRN != null)
                    {
                        bindItemList.DataSource = objGRNDL.GetDataView_Items(objGRN.GRNNo);

                        objGRN_Payment = objGRN_Payment_DL.GetByGRNNO(objGRN.GRNNo);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }