private void simpleButton5_Click(object sender, EventArgs e)
        {
            string pkFirma = "0";
            frmMusteriAraSiparis MusteriAra = new frmMusteriAraSiparis();

            MusteriAra.ShowDialog();
            if (MusteriAra.Tag.ToString() == "0")
            {
                return;
            }
            for (int i = 0; i < MusteriAra.gridView1.DataRowCount; i++)
            {
                DataRow dr = MusteriAra.gridView1.GetDataRow(i);
                pkFirma = dr["pkFirma"].ToString();
                if (dr["Sec"].ToString() != "True")
                {
                    continue;
                }
                ArrayList list = new ArrayList();
                list.Add(new SqlParameter("@fkpersoneller", lUEPersonel.EditValue.ToString()));
                list.Add(new SqlParameter("@fkFirma", pkFirma));
                DB.ExecuteSQL("UPDATE Firmalar SET fkPerTeslimEden=@fkpersoneller where pkFirma=@fkFirma", list);
                DB.ExecuteSQL("UPDATE MusteriZiyaretGunleri SET  Aktif=1 where fkFirma=" + pkFirma);
                OlmayanlariEkle(pkFirma);
            }
            PersoneleBagliMusteriListesiGetir();
        }
예제 #2
0
        private void btnMusteriBul_Click(object sender, EventArgs e)
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                frmMesajBox mesaj = new frmMesajBox(200);
                mesaj.label1.Text = "Stok Seçiniz";
                mesaj.Show();
                return;
            }
            DataRow drs     = gridView1.GetDataRow(gridView1.FocusedRowHandle);
            string  pkFirma = "0";
            frmMusteriAraSiparis MusteriAra = new frmMusteriAraSiparis();

            MusteriAra.checkEdit1.Checked = true;
            MusteriAra.ShowDialog();
            if (MusteriAra.Tag.ToString() == "0")
            {
                return;
            }
            for (int i = 0; i < MusteriAra.gridView1.DataRowCount; i++)
            {
                DataRow dr = MusteriAra.gridView1.GetDataRow(i);
                pkFirma = dr["pkFirma"].ToString();
                if (dr["Sec"].ToString() != "True")
                {
                    continue;
                }
                ArrayList list = new ArrayList();
                list.Add(new SqlParameter("@fkStokKarti", drs["pkStokKarti"].ToString()));
                list.Add(new SqlParameter("@fkFirma", pkFirma));
                list.Add(new SqlParameter("@OzelSatisFiyati", drs["SatisFiyati"].ToString().Replace(",", ".")));
                list.Add(new SqlParameter("@YeniSatisFiyati", drs["SatisFiyati"].ToString().Replace(",", ".")));
                DB.ExecuteSQL(@"INSERT INTO SatisFiyatlariMusteriBazli (fkStokKarti,fkFirma,OzelSatisFiyati,YeniSatisFiyati,Aktif) 
            VALUES(@fkStokKarti,@fkFirma,@OzelSatisFiyati,@YeniSatisFiyati,1)", list);
                //list.Add(new SqlParameter("@fkpersoneller", lUEPersonel.EditValue.ToString()));
                //list.Add(new SqlParameter("@fkFirma", pkFirma));
                //DB.ExecuteSQL("UPDATE Firmalar SET fkPerTeslimEden=@fkpersoneller where pkFirma=@fkFirma", list);
                //DB.ExecuteSQL("UPDATE MusteriZiyaretGunleri SET  Aktif=1 where fkFirma=" + pkFirma);
                //OlmayanlariEkle(pkFirma);
            }

            //if (gridView1.FocusedRowHandle < 0) return;
            //DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle);
            //string fkFirma = musteriara();
            //ArrayList list = new ArrayList();
//            list.Add(new SqlParameter("@fkStokKarti", dr["pkStokKarti"].ToString()));
//            list.Add(new SqlParameter("@fkFirma", fkFirma));
//            list.Add(new SqlParameter("@OzelSatisFiyati", dr["SatisFiyati"].ToString().Replace(",", ".")));
//            list.Add(new SqlParameter("@YeniSatisFiyati", dr["SatisFiyati"].ToString().Replace(",", ".")));
//            DB.ExecuteSQL(@"INSERT INTO SatisFiyatlariMusteriBazli (fkStokKarti,fkFirma,OzelSatisFiyati,YeniSatisFiyati,Aktif)
//            VALUES(@fkStokKarti,@fkFirma,@OzelSatisFiyati,@YeniSatisFiyati,1)", list);
            SatisFiyatlariMusteriBazliGetir();
        }
예제 #3
0
        private void simpleButton4_Click(object sender, EventArgs e)
        {
            string pkFirma = "0";
            frmMusteriAraSiparis MusteriAra = new frmMusteriAraSiparis();

            MusteriAra.ShowDialog();
            if (MusteriAra.Tag.ToString() == "0")
            {
                return;
            }

            for (int i = 0; i < MusteriAra.gridView1.DataRowCount; i++)
            {
                DataRow dr = MusteriAra.gridView1.GetDataRow(i);

                if (dr["Sec"].ToString() != "True")
                {
                    continue;
                }

                pkFirma = dr["pkFirma"].ToString();

                if (pkFirmaGuncelle.Text == "0")
                {
                    YeniFirmaGuncelle();
                }
                if (DB.GetData("select * from FirmaGuncelleDetay with(nolock) where fkFirmaGuncelle=" +
                               pkFirmaGuncelle.Text + " and fkFirma=" + pkFirma).Rows.Count == 0)
                {
                    ArrayList list = new ArrayList();
                    list.Add(new SqlParameter("@fkFirma", pkFirma));
                    list.Add(new SqlParameter("@fkFirmaGuncelle", pkFirmaGuncelle.Text));
                    //list.Add(new SqlParameter("@Mesaj", mesaj));
                    DB.ExecuteSQL("INSERT INTO FirmaGuncelleDetay (fkFirma,fkFirmaGuncelle,Durumu,OncekiFiyatdanSatDurumu)" +
                                  "values(@fkFirma,@fkFirmaGuncelle,0,0)", list);
                }
            }
            yesilisikyeni();
        }