private void butAdd_Click(object sender, System.EventArgs e) { FormEmployerEdit FormEE = new FormEmployerEdit(); FormEE.EmployerCur = new Employer(); FormEE.IsNew = true; FormEE.ShowDialog(); FillGrid(); }
private void butEdit_Click(object sender, System.EventArgs e) { if (listEmp.SelectedIndices.Count != 1) { MessageBox.Show(Lan.g(this, "Please select one item first.")); return; } FormEmployerEdit FormEE = new FormEmployerEdit(); FormEE.EmployerCur = Employers.List[listEmp.SelectedIndices[0]]; FormEE.ShowDialog(); if (FormEE.DialogResult != DialogResult.OK) { return; } FillGrid(); }
private void listEmp_DoubleClick(object sender, System.EventArgs e) { if (listEmp.SelectedIndices.Count == 0) { return; } //EmployerCur= //if(IsSelectMode){ // DialogResult=DialogResult.OK; // return; //} FormEmployerEdit FormEE = new FormEmployerEdit(); FormEE.EmployerCur = Employers.List[listEmp.SelectedIndices[0]]; FormEE.ShowDialog(); if (FormEE.DialogResult != DialogResult.OK) { return; } FillGrid(); }
private void butEdit_Click(object sender, System.EventArgs e) { if(listEmp.SelectedIndices.Count!=1){ MessageBox.Show(Lan.g(this,"Please select one item first.")); return; } FormEmployerEdit FormEE=new FormEmployerEdit(); FormEE.EmployerCur=ListEmployers[listEmp.SelectedIndices[0]]; FormEE.ShowDialog(); if(FormEE.DialogResult!=DialogResult.OK) return; FillGrid(); }
private void butAdd_Click(object sender, System.EventArgs e) { FormEmployerEdit FormEE=new FormEmployerEdit(); FormEE.EmployerCur=new Employer(); FormEE.IsNew=true; FormEE.ShowDialog(); FillGrid(); }
private void listEmp_DoubleClick(object sender, System.EventArgs e) { if(listEmp.SelectedIndices.Count==0) return; //EmployerCur= //if(IsSelectMode){ // DialogResult=DialogResult.OK; // return; //} FormEmployerEdit FormEE=new FormEmployerEdit(); FormEE.EmployerCur=ListEmployers[listEmp.SelectedIndices[0]]; FormEE.ShowDialog(); if(FormEE.DialogResult!=DialogResult.OK) return; FillGrid(); }