private void cmbTheatreList_SelectedIndexChanged(object sender, EventArgs e) { if (cmbTheatreList.SelectedIndex > -1) { MovieTheatre theatre = (MovieTheatre)cmbTheatreList.SelectedItem; lblTheatreNumber.Text = theatre.MovieTheatreID.ToString(); lblTheatreName.Text = theatre.MovieTheatreName; lblCapacity.Text = theatre.SeatingCapacity.ToString(); } ClearForm.DisposePanels(this); if (cmbTheatreList.SelectedIndex == 0) { CreateTheatre.TheatreA(this); } else if (cmbTheatreList.SelectedIndex == 1) { ; CreateTheatre.TheatreB(this); } if (cmbTheatreList.SelectedIndex == 2) { CreateTheatre.TheatreC(this); } }
protected void btnGonder_OnClick(object sender, EventArgs e) { if (Page.IsValid) { int id = Convert.ToInt32(Request.QueryString["id"]); if (Session["kullanici"] != null) { string k_adi = Session["kullanici"].ToString(); var user = db.Uyes.FirstOrDefault(x => x.u_kullanici_adi == k_adi); if (user != null) { Yorum yorum = new Yorum { y_icerik = txtYorum.Text, y_yapma_tarihi = DateTime.Now, y_onay = false, m_id = id, u_id = user.u_id }; db.Yorums.Add(yorum); db.SaveChanges(); ClearForm cl = new ClearForm(); cl.ClearTexts(Page); MultiView1.ActiveViewIndex = 0; } } else { MultiView1.ActiveViewIndex = 1; } } }
private void btnLogin_Click(object sender, EventArgs e) { bool loginCase = false; foreach (Employee employee in EmployeeDataTransaction.GetEmployeeList()) { if (txtUsername.Text == employee.Username && txtPassword.Text == employee.Password) { if (employee.Title == Enums.Title.Müdür) { isManager = true; } else if (employee.Title == Enums.Title.Biletçi) { isManager = false; } this.DialogResult = System.Windows.Forms.DialogResult.Yes; loginCase = true; } } if (!loginCase) { MessageBox.Show("Hatalı kullanıcı adı ve şifre girişi!", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Error); ClearForm.Clear(this); } }
private void btninit_Click(object sender, EventArgs e) { ClearForm frmClear = new ClearForm(); frmClear.ClearOK += new ClearForm.ClearOKHandler(this.frmclear_ClearOK); frmClear.ShowDialog(); }
private void EqualBtn_Click(object sender, EventArgs e) { var tmpValue = Convert.ToDouble(InputNumbLbl.Text); try { Calculator.NumberB = Convert.ToDouble(InputNumbLbl.Text); if (!CheckAnswer) { Calculator.HistoryShow.Add(InputNumbLbl.Text); } else { CheckAnswer = false; } Calculator.Equal(); if (Calculator.NumberA != null) { var savedData = (double)Calculator.NumberA; InputLbl.Text = Calculator.UpdateHistoryLog(); Calculator.HistoryShow.Add(" = "); Calculator.HistoryShow.Add(Calculator.NumberA.ToString()); History.Add(Calculator.HistoryShow); ClearForm?.Invoke(sender, e); InputNumbLbl.Text = savedData.ToString(CultureInfo.CurrentCulture); CheckEqual = true; } CheckAnswer = true; } catch (InvalidOperationException) { ClearForm?.Invoke(sender, e); InputNumbLbl.Text = tmpValue.ToString(CultureInfo.CurrentCulture); } }
private void lstSessions_KeyDown(object sender, KeyEventArgs e) { if (e.KeyValue == 27) { ClearForm.Clear(this); } }
private void lstMovies_SelectedIndexChanged(object sender, EventArgs e) { ClearForm.Clear(this); if (lstMovies.SelectedIndex > -1) { Movie movie = (Movie)lstMovies.SelectedItem; MovieDataTransaction.GetMovieDetailsById(movie); txtMovieName.Text = movie.Name; for (int i = 0; i < chkMovieGenre.Items.Count; i++) { for (int j = 0; j < movie.Genres.Count; j++) { if (movie.Genres[j].ID == ((MovieGenre)chkMovieGenre.Items[i]).ID) { chkMovieGenre.SetItemChecked(i, true); } } } dtpReleaseDate.Value = movie.ReleaseDate; numDuration.Value = movie.Duration; txtDescription.Text = movie.Description; if (movie.Poster != null) { ImageConverter imgConvert = new ImageConverter(); Image image = (Image)imgConvert.ConvertFrom(movie.Poster); pcbPoster.Image = image; } } }
private void But_Action_NewAction_Click(object sender, EventArgs e) { _ = new ClearForm(); _ = new ActionVerificationEnabled(); MainProgram.Self.actionView.SetActionName("New Action"); ActionID.Singleton.ID = 0; }
public void Salvar() { if (txtRazao.Text == "") { // erNome.SetError(lblNome, "Insira um nome para o cliente"); } // instancia a classe de negocio clFornecedor clFornecedores = new clFornecedor(); if (txtRazao.Text == "") { lblMemssagem.Text = "Insina uma Razão social para o Fornecedor"; return; } DialogResult resposta; resposta = MessageBox.Show("Confirma a inclusão?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (resposta.Equals(DialogResult.No)) { return; } //carrega as propriedades clFornecedores.cnpj = mskcnpj.Text; clFornecedores.ForRazao = txtRazao.Text; clFornecedores.ForContato = txtRazao.Text; clFornecedores.ForIE = mskIE.Text; clFornecedores.ForIM = txtIM.Text; clFornecedores.ForTel = mskTel.Text; clFornecedores.ForTel2 = mskTel2.Text; clFornecedores.ForCel = mskCel.Text; clFornecedores.ForCel2 = mskCel2.Text; clFornecedores.ForBairro = txtBairro.Text; clFornecedores.ForCEP = mskCep.Text; clFornecedores.ForComplemento = txtComplemento.Text; clFornecedores.ForEstado = cboEstado.Text; clFornecedores.ForFax = mskFax.Text; clFornecedores.ForMail = txtMail.Text; clFornecedores.ForMunicipio = txtCidade.Text; clFornecedores.ForNum = txtNumero.Text; clFornecedores.ForRua = txtEndereco.Text; clFornecedores.Data = dtmData.Text; //variavel com a sstring de conexao com o banco clFornecedores.banco = Properties.Settings.Default.conexaoDB; if (txtCodigo.Text == "") { clFornecedores.Gravar(); } else { clFornecedores.id = Convert.ToInt32(txtCodigo.Text); clFornecedores.Alterar(); } //mensagem de cofiguração MessageBox.Show("Cliente incluido com sucesso", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); ClearForm.ClearForms(this); }
public SessionForm() { InitializeComponent(); RefreshMovies(); cmbTheatres.ValueMember = "MovieTheatreID"; cmbTheatres.DisplayMember = "Name"; cmbTheatres.DataSource = MovieTheatreOperation.GetTheatreList(); RefreshSessionListBox(); ClearForm.Clear(this); }
public void Salvar() { { if (txtNome.Text == "") { erNome.SetError(lblNome, "Insira um nome para o cliente"); } } // instancia a classe de negocio clProduto clProduto = new clProduto(); if (txtNome.Text == "") { lblMenssagem.Text = "Insina um nome para o cliente"; return; } DialogResult resposta; resposta = MessageBox.Show("Confirma o Cadastro do produto?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (resposta.Equals(DialogResult.No)) { return; } //carrega as propriedades clProduto.proMarca = txtMarca.Text; clProduto.proPreco = txtPreco.Text; clProduto.proData = dtmData.Text; clProduto.proNome = txtNome.Text; clProduto.proNSerie = txtNSerie.Text; clProduto.proPNumber = txtPNumber.Text; clProduto.proPreco1 = PrecoFinal1; clProduto.proPreco2 = txtPreco2.Text; clProduto.proPreco3 = txtPreco3.Text; clProduto.proPreco4 = txtPreco4.Text; //variavel com a sstring de conexao com o banco clProduto.banco = Properties.Settings.Default.conexaoDB; if (txtCodigo.Text == "") { clProduto.Gravar(); } else { clProduto.proCodigo = Convert.ToInt32(txtCodigo.Text); clProduto.Alterar(); } //mensagem de cofiguração MessageBox.Show("Cliente incluido com sucesso", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); ClearForm.ClearForms(this); }
protected void btnEkle_OnClick(object sender, EventArgs e) { Kategori kategori = new Kategori(); kategori.k_ad = txtAd.Text; kategori.k_eklenme_tarihi = DateTime.Now; db.Kategoris.Add(kategori); db.SaveChanges(); ClearForm cl = new ClearForm(); cl.ClearTexts(Page); Response.Redirect("kategori.aspx"); }
public MovieForm() { InitializeComponent(); List <MovieGenre> genreList = MovieGenreOperation.GetMovieGenres(); foreach (MovieGenre genre in genreList) { chkMovieGenre.Items.Add(genre); } RefreshListBox(); ClearForm.Clear(this); }
private void ThreeBtn_Click(object sender, EventArgs e) { if (!CheckAnswer) { InputNumbLbl.Text += '3'; } else { if (Calculator.Action == Actions.Noaction) { ClearForm?.Invoke(sender, e); } InputNumbLbl.Text = 3.ToString(); CheckAnswer = false; } }
protected void btnEkle_OnClick(object sender, EventArgs e) { if (Page.IsValid) { Aparat aparat = new Aparat(); aparat.a_ad = txtAd.Text; aparat.a_fiyat = Convert.ToDouble(txtFiyat.Text); aparat.a_eklenme_tarihi = DateTime.Now; db.Aparats.Add(aparat); db.SaveChanges(); ClearForm cl = new ClearForm(); cl.ClearTexts(Page); Response.Redirect("aparat.aspx"); } }
private void btnAddSession_Click(object sender, EventArgs e) { if (dtpSessionDate.Value >= DateTime.Today && cmbMovies.SelectedIndex > -1 && cmbTheatres.SelectedIndex > -1) { Session session = new Session(); session.Date = dtpSessionDate.Value.Date; session.Time = dtpSessionDate.Value.TimeOfDay; session.Movie = (Movie)cmbMovies.SelectedItem; session.MovieTheatre = (MovieTheatre)cmbTheatres.SelectedItem; if (SessionDataTransaction.AddSession(session)) { MessageBox.Show("Seans ekleme işlemi başarılı...", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); } RefreshSessionListBox(); ClearForm.Clear(this); } }
private void lstSessions_SelectedIndexChanged(object sender, EventArgs e) { if (lstSessions.SelectedIndex == -1) { ClearForm.Clear(this); } else if (lstSessions.SelectedIndex > -1) { Session session = (Session)lstSessions.SelectedItem; dtpSessionDate.Value = session.Date + session.Time; cmbMovies.SelectedValue = session.Movie.ID; cmbTheatres.SelectedValue = session.MovieTheatre.MovieTheatreID; lstTickets.DataSource = null; lstTickets.DataSource = TicketDataTransaction.GetTicketDetail(session); } }
protected void btnKaydol_OnClick(object sender, EventArgs e) { var user = db.Uyes.FirstOrDefault(u => u.u_kullanici_adi == txtKullaniciAdi.Text); if (user != null) { MultiView1.ActiveViewIndex = 0; txtKullaniciAdi.Focus(); } else { Uye uye = new Uye(); uye.u_kullanici_adi = txtKullaniciAdi.Text; uye.u_sifre = txtSifre.Text; uye.u_ad = txtAd.Text; uye.u_soyad = txtSoyad.Text; uye.u_email = txtEmail.Text; uye.u_telefon = txtTelefon.Text; uye.u_adres = txtAdres.Text; uye.u_dogum_tarihi = Convert.ToDateTime(txtDt.Text); uye.u_kayit_tarihi = DateTime.Now; if (fuResim.HasFile) { fuResim.SaveAs( Server.MapPath("../files/images/user_images/" + uye.u_kullanici_adi + "-" + fuResim.FileName)); uye.u_resim = "../files/images/user_images/" + uye.u_kullanici_adi + "-" + uye.u_kayit_tarihi + "-" + fuResim.FileName; } else { uye.u_resim = "../files/images/user_images/uye.png"; } db.Uyes.Add(uye); db.SaveChanges(); Session["kullanici"] = txtKullaniciAdi.Text; ClearForm cl = new ClearForm(); cl.ClearTexts(Page); Response.Redirect("profil.aspx"); } }
private void btnSalvar_Click(object sender, EventArgs e) { if (txtRazao.Text == "") { // erNome.SetError(lblNome, "Insira um nome para o cliente"); } // instancia a classe de negocio clFornecedor clFornecedores = new clFornecedor(); if (txtRazao.Text == "") { lblMemssagem.Text = "Insina uma Razão social para o Fornecedor"; return; } DialogResult resposta; resposta = MessageBox.Show("Confirma a inclusão?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (resposta.Equals(DialogResult.No)) { return; } //carrega as propriedades clFornecedores.ForRazao = txtRazao.Text; clFornecedores.ForContato = txtRazao.Text; clFornecedores.ForIE = mskIE.Text; clFornecedores.ForIM = txtIM.Text; clFornecedores.ForTel = mskTel.Text; clFornecedores.ForTel2 = mskTel2.Text; clFornecedores.ForCel = mskCel.Text; clFornecedores.ForCel2 = mskCel2.Text; //variavel com a sstring de conexao com o banco clFornecedores.banco = Properties.Settings.Default.conexaoDB; //chama metodo para gravar clFornecedores.Gravar(); //mensagem de cofiguração MessageBox.Show("Fornecedor incluido com sucesso", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); lblMemssagem.Text = "Fornecedor cadastrado com sucesso"; ClearForm.ClearForms(this); }
protected void btnEkle_OnClick(object sender, EventArgs e) { Menu menu = new Menu(); menu.m_baslik = txtBaslik.Text; menu.m_aciklama = txtAciklama.Text; menu.m_fiyat = Convert.ToDouble(txtFiyat.Text); menu.m_eklenme_tarihi = DateTime.Now; menu.m_degistirilme_tarihi = DateTime.Now; fuResim.SaveAs(Server.MapPath("../files/images/menu_images/" + menu.m_baslik + "-" + menu.m_fiyat + "-" + fuResim.FileName)); menu.m_resim = "../files/images/menu_images/" + menu.m_baslik + "-" + menu.m_fiyat + "-" + fuResim.FileName; menu.k_id = Convert.ToInt32(DropDownListKategori.SelectedItem.Value); db.Menus.Add(menu); ClearForm cl = new ClearForm(); cl.ClearTexts(Page); db.SaveChanges(); Response.Redirect("menu.aspx"); }
public void Salvar() { if (txtNome.Text == "") { erNome.SetError(lblNome, "Insira um nome para o cliente"); } // instancia a classe de negocio clCliente clClientes = new clCliente(); if (txtNome.Text == "") { lblMensagem.Text = "Insina um nome para o cliente"; return; } DialogResult resposta; resposta = MessageBox.Show("Confirma a inclusão?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (resposta.Equals(DialogResult.No)) { return; } //carrega as propriedades clClientes.cliNome = txtNome.Text; clClientes.cliEndereco = txtEndereco.Text; clClientes.cliNumero = txtNumero.Text; clClientes.cliBairro = txtBairro.Text; clClientes.cliCidade = txtCidade.Text; clClientes.cliEstado = cboEstado.Text; clClientes.cliCEP = mskCep.Text; clClientes.cliCelular = mtbCelular.Text; //variavel com a sstring de conexao com o banco clClientes.banco = Properties.Settings.Default.conexaoDB; //chama metodo para gravar clClientes.Gravar(); //mensagem de cofiguração MessageBox.Show("Cliente incluido com sucesso", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); ClearForm.ClearForms(this); }
protected void btnKaydet_OnClick(object sender, EventArgs e) { string _kadi = Session["kullanici"].ToString(); var q = db.Uyes.FirstOrDefault(x => x.u_kullanici_adi == _kadi); if (resim.HasFile) { Uye uye = new Uye { u_id = q.u_id, u_kullanici_adi = q.u_kullanici_adi, u_sifre = q.u_sifre, u_ad = q.u_ad, u_soyad = q.u_soyad, u_email = q.u_email, u_dogum_tarihi = q.u_dogum_tarihi, u_adres = q.u_adres, u_telefon = q.u_telefon, u_kayit_tarihi = q.u_kayit_tarihi, u_degistirilme_tarihi = DateTime.Now }; resim.SaveAs( Server.MapPath("../files/images/user_images/" + uye.u_kullanici_adi + "-" + resim.FileName)); uye.u_resim = "../files/images/user_images/" + uye.u_kullanici_adi + "-" + resim.FileName; image.ImageUrl = uye.u_resim; db.Uyes.AddOrUpdate(uye); db.SaveChanges(); Session["kullanici"] = uye.u_kullanici_adi; ClearForm cl = new ClearForm(); cl.ClearTexts(Page); Response.Redirect("profil.aspx"); } else { Response.Write("<script>alert('Lütfen bir profil resmi seçin ');</script>"); } }
public LoadAction(string ActionName, decimal Year) { _ = new ClearForm(); _ = new ActionVerificationEnabled(); ActionDB Action = ActionController.FindAction(ActionName, Convert.ToInt32(Year)); ActionLoad.Load(Action); ANCChangeLoad.Load(Action.ID); CalculationMassLoad.Load(Action.ID); if (Action.PNC == true) { PNCLoad.Load(Action.ID); } if (Action.PNCSpec == true) { PNCSpecialLoad.Load(Action.ID); } ActionID.Delete(); ActionID.Singleton.ID = Action.ID; }
public LoadActionToForm() { _action = CopyAction.Value; _ = new ClearForm(); NameViewUpdate(); StateViewUpdate(); PlatformInstallation(); ECCCUpdate(); CalculationbyUpdate(); PNCEstymUpdate(); ANCChangeUpdate(); STKChangeUpdate(); NextChangeUpdate(); QuantityPercentChangeUpdate(); CalculationGroupUpdate(); SavingsLoadUpdate(); PNCListUpdate(); }
private void btnAddMovie_Click(object sender, EventArgs e) { if (txtMovieName.Text != string.Empty && chkMovieGenre.CheckedItems.Count > 0 && numDuration.Value > 0) { Movie movie = new Movie(); movie.Name = txtMovieName.Text; List <MovieGenre> genreList = new List <MovieGenre>(); for (int i = 0; i < chkMovieGenre.Items.Count; i++) { if (chkMovieGenre.GetItemChecked(i)) { genreList.Add((MovieGenre)chkMovieGenre.Items[i]); } } movie.Genres = genreList; movie.ReleaseDate = dtpReleaseDate.Value; movie.Duration = (short)numDuration.Value; movie.Description = txtDescription.Text; MemoryStream ms = new MemoryStream(); pcbPoster.Image.Save(ms, ImageFormat.Jpeg); byte[] toDatabase = ms.ToArray(); ms.Close(); ms.Dispose(); movie.Poster = toDatabase; MovieDataTransaction.AddMovie(movie); RefreshListBox(); MessageBox.Show("Film ekleme işlemi başarıyla gerçekleştirildi.", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearForm.Clear(this); } else { MessageBox.Show("Lütfen film eklemek için gereken bilgileri eksiksiz şekilde doldurunuz!", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btnLimpar_Click_1(object sender, EventArgs e) { ClearForm.ClearForms(this); }
private void toolStripButton2_Click(object sender, EventArgs e) { ClearForm.ClearForms(this); }
protected void btnGuncelle_OnClick(object sender, EventArgs e) { int id = Convert.ToInt32(Request.QueryString["id"]); var q = db.Uyes.FirstOrDefault(x => x.u_id == id); string eski_ad = q.u_kullanici_adi; if (txtKullaniciAdi.Text == eski_ad) { Uye uye = new Uye { u_id = q.u_id, u_kullanici_adi = txtKullaniciAdi.Text, u_sifre = txtSifre.Text, u_ad = q.u_ad, u_soyad = q.u_soyad, u_email = q.u_email, u_resim = q.u_resim, u_dogum_tarihi = q.u_dogum_tarihi, u_adres = q.u_adres, u_telefon = q.u_telefon, u_kayit_tarihi = q.u_kayit_tarihi, u_degistirilme_tarihi = DateTime.Now }; db.Uyes.AddOrUpdate(uye); db.SaveChanges(); Session["kullanici"] = uye.u_kullanici_adi; ClearForm cl = new ClearForm(); cl.ClearTexts(Page); Response.Redirect("profil.aspx"); } else { var user = db.Uyes.FirstOrDefault(u => u.u_kullanici_adi == txtKullaniciAdi.Text); if (user != null) { MultiView1.ActiveViewIndex = 0; txtKullaniciAdi.Focus(); } else { Uye uye = new Uye { u_id = q.u_id, u_kullanici_adi = txtKullaniciAdi.Text, u_sifre = txtSifre.Text, u_ad = q.u_ad, u_soyad = q.u_soyad, u_email = q.u_email, u_resim = q.u_resim, u_dogum_tarihi = q.u_dogum_tarihi, u_adres = q.u_adres, u_telefon = q.u_telefon, u_kayit_tarihi = q.u_kayit_tarihi, u_degistirilme_tarihi = DateTime.Now }; db.Uyes.AddOrUpdate(uye); db.SaveChanges(); ClearForm cl = new ClearForm(); cl.ClearTexts(Page); Session["kullanici"] = uye.u_kullanici_adi; Response.Redirect("profil.aspx"); } } }
public void Salvar() { string valor = maskedTextBox1.Text; { if (Negocio.clValidaCPF.IsCpf(valor)) { lblCPF.Text = "O número é um CPF Válido !"; } else { lblCPF.Text = "O número é um CPF Inválido !"; } } if (txtNome.Text == "") { erNome.SetError(lblNome, "Insira um nome para o cliente"); } // instancia a classe de negocio clCliente clClientes = new clCliente(); if (txtNome.Text == "") { lblMensagem.Text = "Insina um nome para o cliente"; return; } if (maskedTextBox1.Text == "") { lblMensagem.Text = "Insina um CPF para o cliente"; return; } DialogResult resposta; resposta = MessageBox.Show("Confirma a inclusão?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (resposta.Equals(DialogResult.No)) { return; } //carrega as propriedades clClientes.cliNome = txtNome.Text; clClientes.cliEndereco = txtEndereco.Text; clClientes.cliNumero = txtNumero.Text; clClientes.cliBairro = txtBairro.Text; clClientes.cliCidade = txtCidade.Text; clClientes.cliEstado = cboEstado.Text; clClientes.cliCEP = mskCep.Text; clClientes.cliCelular = mtbCelular.Text; clClientes.cliCPF = maskedTextBox1.Text; //variavel com a sstring de conexao com o banco clClientes.banco = Properties.Settings.Default.conexaoDB; if (txtCodigo.Text == "") { clClientes.Gravar(); } else { clClientes.cliCodigo = Convert.ToInt32(txtCodigo.Text); clClientes.Alterar(); } Pesquisarcli(); MessageBox.Show("Cliente Cadastrado com Sucesso", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); //mensagem de cofiguração MessageBox.Show("Cliente incluido com sucesso", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); ClearForm.ClearForms(this); erNome.SetError(lblNome, ""); // lblNome = ""; }
private void button3_Click(object sender, EventArgs e) { ClearForm.ClearForms(this); }