Ejemplo n.º 1
0
 public void getDefault()
 {
     this.Invoke((MethodInvoker) delegate
     {
         this.Cursor = Cursors.WaitCursor;
         dataGridView1.DataSource = helper.getDataTable("SELECT " + COLS + " FROM CARI_KARTLAR_V2");
         this.Cursor = Cursors.Default;
     });
 }
Ejemplo n.º 2
0
        public void dataGridColWidth(DataGridView dtGrid, string TARGET_GRID)
        {
            DataTable dtCols = helper.getDataTable("SELECT*FROM SETTING_COL_WIDTH WHERE TARGET_GRID='" + TARGET_GRID + "'");

            foreach (DataRow drCol in dtCols.Rows)
            {
                foreach (DataGridViewColumn col in dtGrid.Columns)
                {
                    if (drCol["COL"].ToString() == col.Name)
                    {
                        col.Width = int.Parse(drCol["WIDTH"].ToString());
                    }
                }
            }
        }
Ejemplo n.º 3
0
        public void getDefault()
        {
            DateTime dtTime1 = Convert.ToDateTime(date1.Text);
            DateTime dtTime2 = Convert.ToDateTime(date2.Text);

            string dateFormat1 = dtTime1.Year + "-" + dtTime1.Month + "-" + dtTime1.Day;
            string dateFormat2 = dtTime2.Year + "-" + dtTime2.Month + "-" + dtTime2.Day;

            this.Invoke((MethodInvoker) delegate
            {
                this.Cursor = Cursors.WaitCursor;
                dataGridView1.DataSource = helper.getDataTable("SELECT " + COLS + " FROM SERVIS_FISLERI INNER JOIN CARI_KARTLAR_V2 ON SERVIS_FISLERI.MUSTERI_ID=CARI_KARTLAR_V2.ID WHERE FIS_TARIHI BETWEEN CONVERT(datetime, '" + dateFormat1 + "') AND CONVERT(datetime, '" + dateFormat2 + "') ORDER BY SERVIS_ID DESC");
                this.Cursor = Cursors.Default;
            });
        }
Ejemplo n.º 4
0
        private void MUSTERI_DUZENLE_Load(object sender, EventArgs e)
        {
            DataTable dt = helper.getDataTable("SELECT*FROM CARI_KARTLAR_V2 WHERE ID=" + ITEM_ID + "");

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    txtAdres.Text         = row["ADRES"].ToString();
                    txtCariKodu.Text      = row["CARI_KODU"].ToString();
                    txtCariTuru.Text      = row["CARI_TURU"].ToString();
                    txtCariUnvani.Text    = row["UNVANI"].ToString();
                    txtCepTelefon.Text    = row["CEP_TELEFON"].ToString();
                    txtGrupKodu.Text      = row["GRUP_KODU"].ToString();
                    txtIl.Text            = row["IL"].ToString();
                    txtIlce.Text          = row["ILCE"].ToString();
                    txtTelefon.Text       = row["TELEFON"].ToString();
                    txtVergiDairesi.Text  = row["VERGI_DAIRESI"].ToString();
                    txtVergiNumarasi.Text = row["VERGI_NUMARASI"].ToString();
                    txtYetkiliKisi.Text   = row["YETKILI_KISI"].ToString();
                    txtOzelKod1.Text      = row["OZEL_KODLAR_1"].ToString();
                    txtOzelKod2.Text      = row["OZEL_KODLAR_2"].ToString();
                    txtOzelKod3.Text      = row["OZEL_KODLAR_3"].ToString();
                    txtOzelKod4.Text      = row["OZEL_KODLAR_4"].ToString();
                    txtOzelKod5.Text      = row["OZEL_KODLAR_5"].ToString();
                    txtFaturaAdresi.Text  = row["FATURA_ADRESI"].ToString();
                }
            }
        }
Ejemplo n.º 5
0
        public void processCommand()
        {
            DateTime dtTime1 = Convert.ToDateTime(date1.Text);
            DateTime dtTime2 = Convert.ToDateTime(date2.Text);

            string dateFormat1 = dtTime1.Year + "-" + dtTime1.Month + "-" + dtTime1.Day;
            string dateFormat2 = dtTime2.Year + "-" + dtTime2.Month + "-" + dtTime2.Day;

            dataGridView1.DataSource = helper.getDataTable("SELECT " + COLS + " FROM SERVIS_FISLERI INNER JOIN CARI_KARTLAR_V2 ON SERVIS_FISLERI.MUSTERI_ID=CARI_KARTLAR_V2.ID  WHERE FIS_TARIHI BETWEEN CONVERT(datetime, '" + dateFormat1 + "') AND CONVERT(datetime, '" + dateFormat2 + "') ORDER BY SERVIS_ID DESC");
        }
Ejemplo n.º 6
0
 private void txtCariID_TextChanged(object sender, EventArgs e)
 {
     DataTable dt = helper.getDataTable("SELECT TOP 1 * FROM CARI_KARTLAR_V2 WHERE ID=" + txtCariID.Text + "");
     if (dt.Rows.Count == 1)
     {
         txtAdSoyad.Text = dt.Rows[0]["UNVANI"].ToString();
         txtCepTelefon.Text = dt.Rows[0]["CEP_TELEFON"].ToString();
         txtTelefon.Text = dt.Rows[0]["TELEFON"].ToString();
         txtAdres.Text = dt.Rows[0]["ADRES"].ToString();
     }
 }
Ejemplo n.º 7
0
        public void getDefault()
        {
            string COLS = "ID,AD,SOYAD,EPOSTA_ADRESI,AKTIF";

            dataGridView1.DataSource = helper.getDataTable("SELECT " + COLS + " FROM KULLANICILAR");
        }