Esempio n. 1
0
        private void newButton_Click(object sender, EventArgs e)
        {
            dataLokasiDetail displayedForm = new dataLokasiDetail(globalConstants.NEW_LOCATION, 0);

            displayedForm.ShowDialog(this);
            dataCabangGridView.DataSource = null;

            if (!namaBranchTextbox.Text.Equals(""))
            {
                loadLocationData(namaBranchTextbox.Text);
            }

            if (namaBranchTextbox.Text.Length > 0)
            {
                loadLocationData(namaBranchTextbox.Text);
            }
        }
Esempio n. 2
0
        private void dataCabangGridView_DoubleClick(object sender, EventArgs e)
        {
            int selectedrowindex = dataCabangGridView.SelectedCells[0].RowIndex;

            DataGridViewRow selectedRow = dataCabangGridView.Rows[selectedrowindex];

            selectedLocationID = Convert.ToInt32(selectedRow.Cells["ID"].Value);

            dataLokasiDetail displayedForm = new dataLokasiDetail(globalConstants.EDIT_LOCATION, selectedLocationID);

            displayedForm.ShowDialog(this);

            if (namaBranchTextbox.Text.Length > 0)
            {
                loadLocationData(namaBranchTextbox.Text);
            }
        }
Esempio n. 3
0
        private void dataLokasi_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                int selectedrowindex = dataCabangGridView.SelectedCells[0].RowIndex;

                DataGridViewRow selectedRow = dataCabangGridView.Rows[selectedrowindex];
                selectedLocationID = Convert.ToInt32(selectedRow.Cells["ID"].Value);

                gutil.saveSystemDebugLog(0, "CREATE DATA LOKASI DETAIL, LOKASI ID [" + selectedLocationID + "]");
                dataLokasiDetail displayedForm = new dataLokasiDetail(globalConstants.EDIT_LOCATION, selectedLocationID);
                displayedForm.ShowDialog(this);

                if (namaBranchTextbox.Text.Length > 0)
                {
                    loadLocationData(namaBranchTextbox.Text);
                }
            }
        }