private void cmdNew_Click(object sender, EventArgs e) { curIndex = grdViewPackListTemp.RowCount; frmPackListTempDetail DiagnosisDetailForm = new frmPackListTempDetail(); DiagnosisDetailForm.txtPackListTempName.Tag = "0"; DiagnosisDetailForm.txtPackListTempName.Text = string.Empty; DiagnosisDetailForm.cmdSave.Tag = "Add"; DiagnosisDetailForm.ShowDialog(); BindingPackListTemp(); }
private void Edit() { curIndex = grdViewPackListTemp.GetDataSourceRowIndex(grdViewPackListTemp.FocusedRowHandle); frmPackListTempDetail PackListTempDetailForm = new frmPackListTempDetail(); PackListTempDetailForm.txtPackListTempName.Tag = drPackListTemp.ItemArray[0].ToString(); PackListTempDetailForm.txtPackListTempName.Text = drPackListTemp.ItemArray[1].ToString(); PackListTempDetailForm.chkIsActive.Checked = bool.Parse(drPackListTemp.ItemArray[2].ToString()); PackListTempDetailForm.cmdSave.Tag = "Edit"; PackListTempDetailForm.ShowDialog(); BindingPackListTemp(); }