private void Main_Load(object sender, EventArgs e) { //provo lidhjen me bazen try { conObject = new ConnDbase(); Main.serial = GetVolumeSerial("C"); //Main.serial = "4995274"; NgarkoSkedare frm = new NgarkoSkedare(); frm.ShowDialog(); if (!frm.ngarkuar) { Application.Exit(); } //dsTelefon mban te gjithe nr e telefonit dsTelefon = frm.dsTelefon.Copy(); gridEXSMS.DataSource = dsSMS.Tables[0]; AddConditionalFormatting(); } catch (Exception ex) { if (ex.Message == "Nuk mund të kryhet lidhja me bazën e të dhënave!") { MessageBox.Show(ex.Message + Environment.NewLine + "Programi do të mbyllet!", Text, MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } } //bej inicializimet e duhura dtpMbarimi.Value = DateTime.Now; dtpFillimi.Value = DateTime.Now.AddDays(-6); vitiShkollor = GjejVitinAktual(); }
private void KerkeseSMS_Load(object sender, EventArgs e) { conObject = new ConnDbase(); }