NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using wf_VideoMarket.Model;

namespace wf_VideoMarket
{
public partial class frmFilmSatis : Form
{
public frmFilmSatis()
{
InitializeComponent();
}
SqlConnection conn = new SqlConnection(Genel.connStr);
private void frmFilmSatis_Load(object sender, EventArgs e)
{
this.Top = 0;
this.Left = 0;

txtTarih.Text = DateTime.Now.ToShortDateString();
FilmSatis fs = new Model.FilmSatis();
fs.SatislariGoster(lvSatislar, txtToplamAdet, txtToplamTutar);
}
private void dtpTarih_ValueChanged(object sender, EventArgs e)
{
txtTarih.Text = dtpTarih.Value.ToShortDateString();
}
private void btnMusteriBul_Click(object sender, EventArgs e)
{
frmMusteriSorgulama frm = new wf_VideoMarket.frmMusteriSorgulama();
frm.StartPosition = FormStartPosition.CenterScreen;
frm.ShowDialog();
txtMusteri.Text = Genel.secilenmusteri;
}
private void btnFilmBul_Click(object sender, EventArgs e)
{
frmFilmSorgulama frm = new frmFilmSorgulama();
frm.StartPosition = FormStartPosition.CenterScreen;
frm.ShowDialog();
txtFilm.Text = Genel.secilenfilm;
txtStok.Text = Genel.secilenmiktar.ToString();
txtFiyat.Text = string.Format("{0:#,##0}", Genel.secilenfiyat);
}
private void btnYeni_Click(object sender, EventArgs e)
{
btnKaydet.Enabled = true;
btnDegistir.Enabled = false;
btnSil.Enabled = false;
Temizle();
btnMusteriBul.Enabled = true;
btnFilmBul.Enabled = true;
btnMusteriBul_Click(sender, e);
btnFilmBul_Click(sender, e);
txtAdet.Focus();
}
private void Temizle()
{
txtAdet.Text = "1";
txtFiyat.Text = "0";
txtMusteri.Clear();
txtFilm.Clear();
txtStok.Clear();
Genel.secilenfilm = "";
Genel.secilenfilmno = 0;
Genel.secilenmusteri = "";
Genel.secilenmusterino = 0;
Genel.secilenmiktar = 0;
Genel.secilenfiyat = 0;
}

private void txtAdet_TextChanged(object sender, EventArgs e)
{
if (txtAdet.Text.Trim() == "") { txtAdet.Text = "1"; txtAdet.SelectAll(); }
if (!string.IsNullOrEmpty(txtAdet.Text) && !string.IsNullOrEmpty(txtFiyat.Text))
{
txtTutar.Text = Convert.ToString(Convert.ToUInt32(txtAdet.Text) * Convert.ToDecimal(txtFiyat.Text));
}
else { txtTutar.Text = txtFiyat.Text; }
}

private void txtFiyat_TextChanged(object sender, EventArgs e)
{
if (txtFiyat.Text.Trim() == "") { txtFiyat.Text = "0"; txtFiyat.SelectAll(); }
if (!string.IsNullOrEmpty(txtAdet.Text) && !string.IsNullOrEmpty(txtFiyat.Text))
{
txtTutar.Text = Convert.ToString(Convert.ToUInt32(txtAdet.Text) * Convert.ToDecimal(txtFiyat.Text));
}
else { txtTutar.Text = txtFiyat.Text; }
}

private void txtAdet_MouseClick(object sender, MouseEventArgs e)
{
txtAdet.SelectAll();
}

private void txtFiyat_MouseClick(object sender, MouseEventArgs e)
{
txtFiyat.SelectAll();
}

private void btnKaydet_Click(object sender, EventArgs e)
{
if(txtMusteri.Text=="" || txtFilm.Text == "")
{
MessageBox.Show("Öncelikle müşteri veya film seçimi yapmalısınız");
}
else if (Convert.ToInt32(txtAdet.Text) > Genel.secilenmiktar)
{
MessageBox.Show("Stokta yeterli miktarda ürün yok");
}
else if (txtFiyat.Text == "0")
{
MessageBox.Show("Öncelikle fiyat girmelisiniz");
}
else
{
FilmSatis fs = new FilmSatis();
fs.Tarih = Convert.ToDateTime(txtTarih.Text);
fs.FilmNo = Genel.secilenfilmno;
fs.MusteriNo = Genel.secilenmusterino;
fs.Adet = Convert.ToInt32(txtAdet.Text);
fs.BirimFiyat = Convert.ToDecimal(txtFiyat.Text);
if (fs.SatisEkle(fs))
{
MessageBox.Show("Satış bilgileri kaydedildi");

Film f = new Model.Film();
if (f.StokGuncelleFromSatisEkle(fs.FilmNo, fs.Adet))
{
MessageBox.Show("Stok Güncellendi");
fs.SatislariGoster(lvSatislar, txtToplamAdet, txtToplamTutar);
btnKaydet.Enabled = false;
btnMusteriBul.Enabled = false;
btnFilmBul.Enabled = false;
}
else { MessageBox.Show("Stok Güncellenemedi!"); }
}
else { MessageBox.Show("Satış Tamamlanamadı"); }

}
}
}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.