コード例 #1
0
        private void dgvRabtBilDB_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            FrmPersonelTeknikServisFormu frm = (FrmPersonelTeknikServisFormu)Application.OpenForms["FrmPersonelTeknikServisFormu"];

            frm.cmbCihazDurumu.SelectedIndex = 0;
            frm.lblMusteriNo.Text            = dgvRabtBilDB.CurrentRow?.Cells[0].Value.ToString();
            frm.txtMusteriAdi.Text           = dgvRabtBilDB.CurrentRow?.Cells[1].Value.ToString();
            frm.mtxTelefon.Text             = dgvRabtBilDB.CurrentRow?.Cells[2].Value.ToString();
            frm.txtCihazModeli.Text         = dgvRabtBilDB.CurrentRow?.Cells[3].Value.ToString();
            frm.txtCihazinSeriNumarası.Text = dgvRabtBilDB.CurrentRow?.Cells[4].Value.ToString();
            frm.txtArizaninTanimi.Text      = dgvRabtBilDB.CurrentRow?.Cells[5].Value.ToString();
            frm.txtAksesuarlar.Text         = dgvRabtBilDB.CurrentRow?.Cells[6].Value.ToString();
            frm.txtEkBilgiler.Text          = dgvRabtBilDB.CurrentRow?.Cells[7].Value.ToString();
            frm.txtTakipNumarasi.Text       = dgvRabtBilDB.CurrentRow?.Cells[8].Value.ToString();
            frm.cmbCihazDurumu.Text         = dgvRabtBilDB.CurrentRow?.Cells[9].Value.ToString();
            frm.txtUcret.Text = $"{dgvRabtBilDB.CurrentRow?.Cells[10].Value:#.00}";

            frm.btnYeniKayit.Enabled = true;
            frm.btnKaydet.Enabled    = false;
            frm.btnGuncelle.Enabled  = true;
            frm.btnTeslimEt.Enabled  = true;
            frm.btnYazdir.Enabled    = true;
            frm.btnSil.Enabled       = true;

            Close();
        }
コード例 #2
0
 private void picProfilResmi_Click(object sender, EventArgs e)
 {
     using (OpenFileDialog resimSec = new OpenFileDialog())
     {
         FrmPersonelTeknikServisFormu frm = (FrmPersonelTeknikServisFormu)Application.OpenForms["FrmPersonelTeknikServisFormu"];
         resimSec.Title  = "Profil Resminizi Seçin";
         resimSec.Filter = "Resim Dosyaları(*.jpg, *.jpeg, *.jpe, *.jfif, *.png)|*.jpg; *.jpeg; *.jpe; *.jfif; *.png|SMF Biçimi(*.smf)|*.smf";
         if (resimSec.ShowDialog() == DialogResult.OK)
         {
             string kaynakResimYolu = resimSec.FileName;
             if (!Directory.Exists(SMF.ProfilKlasoru))
             {
                 Directory.CreateDirectory(SMF.ProfilKlasoru);
             }
             picProfilResmi.Image?.Dispose();
             frm.picProfilResmi.Image?.Dispose();
             try
             {
                 File.Copy(kaynakResimYolu, SMF.ProfilResmiYolu, true);
                 picProfilResmi.Image     = File.Exists(SMF.ProfilResmiYolu) ? Image.FromFile(SMF.ProfilResmiYolu) : Resources.varsayilanProfilResmi;
                 frm.picProfilResmi.Image = File.Exists(SMF.ProfilResmiYolu) ? Image.FromFile(SMF.ProfilResmiYolu) : Resources.varsayilanProfilResmi;
             }
             catch
             {
                 picProfilResmi.Image = Resources.varsayilanProfilResmi;
             }
         }
     }
 }
コード例 #3
0
        private void pdcBelge_PrintPage(object sender, PrintPageEventArgs e)
        {
            FrmPersonelTeknikServisFormu frm = (FrmPersonelTeknikServisFormu)Application.OpenForms["FrmPersonelTeknikServisFormu"];

            Font       yaziTipi  = new Font("Segoe UI", 12, FontStyle.Regular);
            SolidBrush yaziRengi = new SolidBrush(Color.Black);

            e.Graphics.DrawImage(Properties.Resources.RabtBilYaziciSablonu, 0, 0);
            if (frm != null)
            {
                e.Graphics.DrawString(frm.txtMusteriAdi.Text, yaziTipi, yaziRengi, 244, 356);
                e.Graphics.DrawString(frm.mtxTelefon.Text, yaziTipi, yaziRengi, 244, 400);
                e.Graphics.DrawString(frm.txtCihazModeli.Text, yaziTipi, yaziRengi, 244, 446);
                e.Graphics.DrawString(frm.txtCihazinSeriNumarası.Text, yaziTipi, yaziRengi, 244, 490);
                e.Graphics.DrawString(frm.txtArizaninTanimi.Text, yaziTipi, yaziRengi, 244, 533);
                e.Graphics.DrawString(frm.cmbCihazDurumu.Text, yaziTipi, yaziRengi, 244, 577);
                e.Graphics.DrawString(frm.txtTakipNumarasi.Text, yaziTipi, yaziRengi, 244, 624);
                e.Graphics.DrawString(frm.txtAksesuarlar.Text, yaziTipi, yaziRengi, 244, 671);
                e.Graphics.DrawString(frm.txtUcret.Text + " ₺", yaziTipi, yaziRengi, 657, 774);
                e.Graphics.DrawString(DateTime.Now.ToString(), yaziTipi, yaziRengi, 589, 310);
            }
        }
コード例 #4
0
        private void btnTeknikServisFormu_Click(object sender, EventArgs e)
        {
            FrmPersonelTeknikServisFormu frm = new FrmPersonelTeknikServisFormu();

            frm.ShowDialog();
        }