private void BtnPlanOlustur_Click(object sender, EventArgs e) { using (PlanYonetici py = new PlanYonetici()) { py.RassalPlanUret(); } }
private void AnaEkran_Load(object sender, EventArgs e) { //combobox'a planları yüklemek using (PlanYonetici py = new PlanYonetici()) { py.ComboPlanYukle(ref this.cmbPlan); } }
private void BtnPlanAktar_Click(object sender, EventArgs e) { var dosyaYolu = txtExcelFilePath.Text; using (PlanYonetici py = new PlanYonetici()) { py.FilePath = dosyaYolu; //excel planı oku py.ImportExceltoDatatable(); MessageBox.Show("Bilgilendirme", "Excel dosya planı okundu", MessageBoxButtons.OK, MessageBoxIcon.Information); //okunan dosya plana dönüştürülmeli py.DataTableToPlan(); } }
private void CmbPlan_SelectedIndexChanged(object sender, EventArgs e) { ComboBox comboBox = (ComboBox)sender; KeyValuePair <int, string> selectedEntry = (KeyValuePair <int, string>)comboBox.SelectedItem; int selectedKey = selectedEntry.Key; //index değiştikçe datagridview dolsun using (PlanYonetici py = new PlanYonetici()) { py.DataGridePlanYukle(selectedKey, ref this.dataGridView1); } }