private void btnInsert_Click(object sender, EventArgs e)
 {
     frmWareHouseDetailEdit frmedit = new frmWareHouseDetailEdit();
     frmWareHouseDetailEdit.IdWhDetailEdit = 0;
     frmedit.ShowDialog();
     FillToGrid();
 }
Ejemplo n.º 2
0
        private void btnInsert_Click(object sender, EventArgs e)
        {
            frmWareHouseDetailEdit frmedit = new frmWareHouseDetailEdit();

            frmWareHouseDetailEdit.IdWhDetailEdit = 0;
            frmedit.ShowDialog();
            FillToGrid();
        }
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if ((lblID.Text == "") || (lblID.Text == "0"))
     {
         MessageBox.Show("Bạn hãy chọn phòng khám cần sửa!");
         return;
     }
     frmWareHouseDetailEdit.IdWhDetailEdit = int.Parse(lblID.Text);
     frmWareHouseDetailEdit frmedit = new frmWareHouseDetailEdit();
     frmedit.ShowDialog();
     FillToGrid();
 }
Ejemplo n.º 4
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if ((lblID.Text == "") || (lblID.Text == "0"))
            {
                MessageBox.Show("Bạn hãy chọn phòng khám cần sửa!");
                return;
            }
            frmWareHouseDetailEdit.IdWhDetailEdit = int.Parse(lblID.Text);
            frmWareHouseDetailEdit frmedit = new frmWareHouseDetailEdit();

            frmedit.ShowDialog();
            FillToGrid();
        }
        private void grd_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1) return;
            if (grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value == null)
            {
                IdWareHouseDetail = 0;
            }

            else
            {
                IdWareHouseDetail = int.Parse(grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value.ToString());
            }
            lblID.Text = IdWareHouseDetail.ToString();

            frmWareHouseDetailEdit.IdWhDetailEdit = IdWareHouseDetail;
            frmWareHouseDetailEdit frmEdit = new frmWareHouseDetailEdit();
            frmEdit.ShowDialog();
            FillToGrid();
        }
Ejemplo n.º 6
0
        private void grd_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            if (grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value == null)
            {
                IdWareHouseDetail = 0;
            }

            else
            {
                IdWareHouseDetail = int.Parse(grd.Rows[e.RowIndex].Cells["idDataGridViewTextBoxColumn"].Value.ToString());
            }
            lblID.Text = IdWareHouseDetail.ToString();

            frmWareHouseDetailEdit.IdWhDetailEdit = IdWareHouseDetail;
            frmWareHouseDetailEdit frmEdit = new frmWareHouseDetailEdit();

            frmEdit.ShowDialog();
            FillToGrid();
        }