Exemplo n.º 1
0
 void statusLabel_ItemClick(object sender, ItemClickEventArgs e)
 {
     try
     {
         if (statusLabel.Tag != null)
         {
             using (xFrmGeriBildirim frm = new xFrmGeriBildirim())
             {
                 frm.Text = L.DestekHatti;
                 frm.Konu = BAYMYO.UI.Converts.NullToString(statusLabel.Tag);
                 switch (frm.ShowDialog())
                 {
                 case System.Windows.Forms.DialogResult.OK:
                     statusLabel.Tag = null;
                     break;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Commons.Status(Commons.GetErrorCode("FMN", 19) + ex.Message);
     }
 }
Exemplo n.º 2
0
 internal static void Status(string message)
 {
     try
     {
         rFrmMain rf = (System.Windows.Forms.Application.OpenForms["rFrmMain"] as rFrmMain);
         if (rf != null)
         {
             if (message.Contains("[") & message.Contains("]"))
             {
                 rf.statusLabel.Tag     = message;
                 rf.statusLabel.Caption = message + " * " + L.HataBildirimiYap;
             }
             else
             {
                 rf.Tag = null;
                 rf.statusLabel.Caption = message;
             }
         }
     }
     catch (Exception ex)
     {
         Commons.Status(Commons.GetErrorCode("CMN", 20) + ex.Message);
     }
 }
Exemplo n.º 3
0
 public static void RestoreHeader()
 {
     try
     {
         BAYMYO.UI.FileIO.CreateDirectory(Commons.FolderPath);
         if (!System.IO.File.Exists(HeaderImageFile))
         {
             System.IO.File.Copy(AppFilePath + "formHeader.bmp", HeaderImageFile, true);
         }
         if (!System.IO.File.Exists(HeaderFacturaFile))
         {
             System.IO.File.Copy(AppFilePath + "faturaHeader.bmp", HeaderFacturaFile, true);
         }
         if (!System.IO.File.Exists(LogoFile))
         {
             System.IO.File.Copy(AppFilePath + "companyLogo.bmp", LogoFile, true);
         }
         Commons.ImageLoad();
     }
     catch (Exception ex)
     {
         Commons.Status(Commons.GetErrorCode("CMN", 12) + ex.Message);
     }
 }
Exemplo n.º 4
0
        void lisansDosyasiYukle_Click(object sender, EventArgs e)
        {
            try
            {
                this.Hide();
                using (xFrmValidate v = new xFrmValidate())
                {
                    switch (v.ShowDialog())
                    {
                    case DialogResult.OK:
                        this.DialogResult = DialogResult.OK;
                        return;

                    default:
                        Application.Exit();
                        return;
                    }
                }
            }
            catch (Exception)
            {
                Commons.Status(Commons.GetErrorCode("FTL", 1) + " TRIAL VERSION");
            }
        }
Exemplo n.º 5
0
 public void GetData()
 {
     try
     {
         DovizCollection dc = DovizMethods.GetSelect();
         foreach (Doviz d in dc)
         {
             if (this.kur1CodeLabel.Text.Equals(d.Cinsi))
             {
                 this.kur1CalcEdit.Tag   = d;
                 this.kur1CalcEdit.Value = (decimal)d.Kuru;
             }
             else if (this.kur2CodeLabel.Text.Equals(d.Cinsi))
             {
                 this.kur2CalcEdit.Tag   = d;
                 this.kur2CalcEdit.Value = (decimal)d.Kuru;
             }
         }
     }
     catch (Exception ex)
     {
         Commons.Status(Commons.GetErrorCode("FDV", 1) + ex.Message);
     }
 }
Exemplo n.º 6
0
 void demoButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (Commons.IsNullOrEmpty(dxErrorProvider1, this.mailGroupControl.Controls))
         {
             return;
         }
         else
         {
             dxErrorProvider1.ClearErrors();
         }
         if (!Mail.IsAddressValid(this.mailTextEdit.Text))
         {
             dxErrorProvider1.SetError(this.mailTextEdit, L.MailGecersiz);
             return;
         }
         string mesaj = BAYMYO.UI.FileIO.ReadText(Commons.AppFilePath + "DL.dat")
                        .Replace("{COMPANY}", firmaAdiTextEdit.Text.Trim())
                        .Replace("{PHONE}", telefonTextEdit.Text)
                        .Replace("{MAIL}", mailTextEdit.Text)
                        .Replace("{VK}", validateKeyText.Text)
                        .Replace("{PV}", productVersionText.Text);
         Commons.Loading("License downloading .. .");
         Application.DoEvents();
         using (System.Net.WebClient cln = new System.Net.WebClient())
         {
             System.IO.Stream s          = cln.OpenRead(string.Format("http://service.baymyo.com/license.ashx?key={0}&v={1}", validateKeyText.Text, productVersionText.Text));
             bool             baymyoMail = Mail.SendBaymyo(this.mailTextEdit.Text, this.firmaAdiTextEdit.Text, "Demo License! Easy Supply Application.", mesaj + "<br/><br/> * Aynı mail SonayNet'de gitti!");
             bool             sonayMail  = Mail.SendSonay(this.mailTextEdit.Text, this.firmaAdiTextEdit.Text, "Demo License! Easy Supply Application.", mesaj + "<br/><br/> * Aynı mail baymyo yazılma'da gitti!");
             if ((baymyoMail || sonayMail) & s != null)
             {
                 this.telefonTextEdit.Text  = string.Empty;
                 this.firmaAdiTextEdit.Text = string.Empty;
                 this.mailTextEdit.Text     = string.Empty;
                 if (!System.IO.File.Exists(Commons.LicenseKeyFile))
                 {
                     BAYMYO.UI.FileIO.CreateDirectory(Commons.FolderPath);
                     cln.DownloadFile(string.Format("http://service.baymyo.com/keys/{0}-{1}.zip", validateKeyText.Text, productVersionText.Text.Replace(".", "-")), Commons.LicenseKeyFile);
                     Commons.IsLicenseLoad = true;
                     if (Commons.ValidateApplication())
                     {
                         this.DialogResult = DialogResult.OK;
                     }
                     else
                     {
                         MessageBox.Show(L.LisansGecersiz, "License Warning");
                     }
                 }
                 else
                 {
                     MessageBox.Show("Şuan sisteminizde bir adet lisans dosyası bulunmaktadır.", "Info");
                 }
             }
             else
             {
                 MessageBox.Show("Lisans dosyası indirilemiyor lütfen internet bağlantınızı yada proxy ayarlarınızı kontrol ediniz.", "Warning");
             }
         }
     }
     catch (Exception)
     {
         MessageBox.Show(Commons.GetErrorCode("FTL", 4) + " DEMO LICENSE ERROR!", "Warning");
     }
     finally
     {
         Commons.Loaded();
     }
 }
Exemplo n.º 7
0
 void xFrmKategori_Load(object sender, EventArgs e)
 {
     Commons.Status(this.Text + " ekranı açıldı.");
     GetData();
 }
Exemplo n.º 8
0
 void createDatabaseButton_Click(object sender, EventArgs e)
 {
     Commons.CreateDatabase();
     IsDatabase();
 }
Exemplo n.º 9
0
        void GetSettings()
        {
            try
            {
                if (Commons.AppSettings == null)
                {
                    Commons.AppSettings = new Settings();
                }

                Commons.ColorLoad();
                Commons.ImageLoad();

                this.currentPriceFormatBindingSource.DataSource = CurrentPriceFormat.GetCurrencyFormats();

                IsDatabase();
                if (this.veritabaniOlusturButton.Enabled)
                {
                    this.xtbSettings.SelectedTabPage = this.xtbDatabaseSettings;
                }
                CreateCode();

                this.picHeader.Image              = Commons.HeaderImage;
                this.picFatura.Image              = Commons.HeaderFactura;
                this.picLogo.Image                = Commons.LogoCompany;
                this.picOtherLogos.Image          = Commons.LogoOther;
                this.imageFormHeaderCheck.Checked = Commons.AppSettings.IS_IMAGE_HEADER;

                this.txtTitle.Text       = Commons.AppSettings.COMPANY_NAME;
                this.txtSubTitle.Text    = Commons.AppSettings.COMPANY_DESC;
                this.txtHeaderLine.Text  = Commons.AppSettings.HEADER_TITLE;
                this.txtDescTR.Text      = Commons.AppSettings.DESC_TR;
                this.txtDescEN.Text      = Commons.AppSettings.DESC_EN;
                this.txtOfficePhone.Text = Commons.AppSettings.OFISPHONE;
                this.txtGSM.Text         = Commons.AppSettings.GSM;
                this.txtFAX.Text         = Commons.AppSettings.FAX;
                this.txtAddress.Text     = Commons.AppSettings.ADDRESS;
                this.txtMail.Text        = Commons.AppSettings.MAIL;
                this.txtWeb.Text         = Commons.AppSettings.WEB;

                this.txtPreparedBy.Text = Commons.AppSettings.PREPAREDBY;
                this.txtUnits.Text      = Commons.AppSettings.UNITS;

                this.txtTeklifVerme.Text         = Commons.AppSettings.TEKLIF_VERME_FORMU;
                this.txtMalzemeTeslimi.Text      = Commons.AppSettings.MALZEME_TESLIM_FORMU;
                this.txtSiparisToplama.Text      = Commons.AppSettings.SIPARIS_TOPLAMA_FORMU;
                this.txtSiparisFiyatListesi.Text = Commons.AppSettings.SIPARIS_LISTESI_FORMU;
                this.txtUrunKatalogForm.Text     = Commons.AppSettings.URUN_KATALOG_FORMU;

                this.headerTitleBgColor.Color  = Commons.HEADER_BACKCOLOR;
                this.headerTitleBrdColor.Color = Commons.HEADER_BORDERCOLOR;
                this.headerTitleFgColor.Color  = Commons.HEADER_TITLECOLOR;
                this.headerDescColor.Color     = Commons.HEADER_DESCCOLOR;
                this.companyForeColor.Color    = Commons.COMPANY_FORECOLOR;
                this.descTRbackColor.Color     = Commons.DESC_TR_BACKCOLOR;
                this.descTRforeColor.Color     = Commons.DESC_TR_FORECOLOR;
                this.descENbackColor.Color     = Commons.DESC_EN_BACKCOLOR;
                this.descENforeColor.Color     = Commons.DESC_EN_FORECOLOR;

                this.defaultCurrencyLookUpEdit.EditValue = Commons.AppSettings.DEFAULT_CURRENCY.Code;
                this.defaultCurrencyFormatTextEdit.Text  = Commons.AppSettings.DEFAULT_CURRENCY.Format;
                this.defaultCurrencySymbolTextEdit.Text  = Commons.AppSettings.DEFAULT_CURRENCY.Symbol;

                this.crossCurrency1LookUpEdit.EditValue = Commons.AppSettings.CROSS_CURRENCY_1.Code;
                this.crossCurrency1TextEdit.Text        = Commons.AppSettings.CROSS_CURRENCY_1.Format;
                this.crossSymbol1TextEdit.Text          = Commons.AppSettings.CROSS_CURRENCY_1.Symbol;

                this.crossCurrency2LookUpEdit.EditValue = Commons.AppSettings.CROSS_CURRENCY_2.Code;
                this.crossCurrency2TextEdit.Text        = Commons.AppSettings.CROSS_CURRENCY_2.Format;
                this.crossSymbol2TextEdit.Text          = Commons.AppSettings.CROSS_CURRENCY_2.Symbol;

                this.networkDatabase.Text = Commons.AppSettings.DATABASE;
            }
            catch (Exception ex)
            {
                Commons.Status(Commons.GetErrorCode("FSG", 2) + ex.Message);
            }
        }
Exemplo n.º 10
0
 void veritabaniOnarButton_ItemClick(object sender, ItemClickEventArgs e)
 {
     Commons.RepairDatabase();
 }
Exemplo n.º 11
0
 void veritabaniYedekleButton_ItemClick(object sender, ItemClickEventArgs e)
 {
     Commons.BackupDatabase();
     MessageBox.Show(statusLabel.Caption, "Info");
 }
Exemplo n.º 12
0
 void excelxButton_ItemClick(object sender, ItemClickEventArgs e)
 {
     Commons.CreateFile(this.ActiveMdiChild, FileType.ExcelX);
 }
Exemplo n.º 13
0
 void wordButton_ItemClick(object sender, ItemClickEventArgs e)
 {
     Commons.CreateFile(this.ActiveMdiChild, FileType.Word);
 }
Exemplo n.º 14
0
 void formuYenileButton_ItemClick(object sender, ItemClickEventArgs e)
 {
     try
     {
         Commons.Loading(this.ActiveMdiChild.Text + " ekranındaki bilgiler güncelleniyor. ..");
         if (this.ActiveMdiChild is xFrmUrunRapor)
         {
             xFrmUrunRapor frm = this.ActiveMdiChild as xFrmUrunRapor;
             frm.GetUrunRapor();
         }
         else if (this.ActiveMdiChild is xFrmStok)
         {
             xFrmStok frm = this.ActiveMdiChild as xFrmStok;
             frm.GetKategoriler();
             frm.GetUrunler();
             frm.GetFirmalar();
             frm.GetData();
         }
         else if (this.ActiveMdiChild is xFrmTeklif)
         {
             xFrmTeklif frm = this.ActiveMdiChild as xFrmTeklif;
             frm.GetDefault();
             frm.GetStokListe();
             frm.GetTeklif();
         }
         else if (this.ActiveMdiChild is xFrmTeklifDetay)
         {
             xFrmTeklifDetay frm = this.ActiveMdiChild as xFrmTeklifDetay;
             frm.GetTeklifler();
         }
         else if (this.ActiveMdiChild is xFrmUrun)
         {
             xFrmUrun frm = this.ActiveMdiChild as xFrmUrun;
             frm.GetKategoriler();
             frm.GetData();
         }
         else if (this.ActiveMdiChild is xFrmKategori)
         {
             xFrmKategori frm = this.ActiveMdiChild as xFrmKategori;
             frm.GetData();
         }
         else if (this.ActiveMdiChild is xFrmFirma)
         {
             xFrmFirma frm = this.ActiveMdiChild as xFrmFirma;
             frm.GetData();
         }
         else if (this.ActiveMdiChild is xFrmDoviz)
         {
             xFrmDoviz frm = this.ActiveMdiChild as xFrmDoviz;
             frm.GetData();
         }
     }
     catch (Exception ex)
     {
         Commons.Status(Commons.GetErrorCode("FMN", 6) + ex.Message);
     }
     finally
     {
         Commons.Status(this.ActiveMdiChild.Text + " ekranındaki bilgiler güncellendi!");
         Commons.Loaded();
     }
 }
Exemplo n.º 15
0
 void yeniLisanSatinAlButton_ItemClick(object sender, ItemClickEventArgs e)
 {
     this.m_TrialVersionWarning = this.m_TrialVersionWarning.AddHours(1);
     Commons.ValidateApplication();
 }
Exemplo n.º 16
0
        void kaydetButton_Click(object sender, EventArgs e)
        {
            try
            {
                int kategoriID = BAYMYO.UI.Converts.NullToInt(this.kategoriLookUpEdit.EditValue);
                if (kategoriID <= 0)
                {
                    if (string.IsNullOrEmpty(this.kategoriAdiTextEdit.Text))
                    {
                        MessageBox.Show("Lütfen kategori adı giriniz.", "Uyarı");
                        return;
                    }
                    kategoriID = KategoriMethods.Insert(new Kategori {
                        Kod = this.kategoriKodTextEdit.Text, Adi = this.kategoriAdiTextEdit.Text
                    });
                    Commons.Update(TableNames.Kategori);
                    this.kategoriLookUpEdit.EditValue = kategoriID;
                }
                int urunID = BAYMYO.UI.Converts.NullToInt(this.urunLookUpEdit.EditValue);
                if (urunID <= 0)
                {
                    if (string.IsNullOrEmpty(this.urunAdiTextEdit.Text) || string.IsNullOrEmpty(this.urunBirimComboBoxEdit.Text) || this.urunKdvCalcEdit.Value <= 0)
                    {
                        MessageBox.Show("Lütfen 'Ürün Adı','Birim' ve 'K.D.V.' alanlarını boş geçmeyiniz.", "Uyarı");
                        return;
                    }
                    urunID = UrunMethods.Insert(new Urun {
                        KategoriID = kategoriID, Adi = this.urunAdiTextEdit.Text, Miktar = 1, Birim = this.urunBirimComboBoxEdit.Text, Kdv = BAYMYO.UI.Converts.NullToFloat(this.urunKdvCalcEdit.Value), Tarih = DateTime.Now
                    });
                    Commons.Update(TableNames.Urun);
                    this.urunLookUpEdit.EditValue = urunID;
                }
                int firmaID = BAYMYO.UI.Converts.NullToInt(this.firmaLookUpEdit.EditValue);
                if (firmaID <= 0)
                {
                    if (string.IsNullOrEmpty(this.firmaAdiTextEdit.Text) || this.firmaPeriodCalcEdit.Value <= 0)
                    {
                        MessageBox.Show("Lütfen 'Firma Adı' ve 'Period' alanlarını boş geçmeyiniz.", "Uyarı");
                        return;
                    }
                    firmaID = FirmaMethods.Insert(new Firma {
                        Adi = this.firmaAdiTextEdit.Text, Telefon = this.firmaTelefonTextEdit.Text, Period = BAYMYO.UI.Converts.NullToByte(this.firmaPeriodCalcEdit.Value)
                    });
                    Commons.Update(TableNames.Firma);
                    this.firmaLookUpEdit.EditValue = firmaID;
                }

                if (kategoriID <= 0 || urunID <= 0 || firmaID <= 0 || this.stokFiyatCalcEdit.Value <= 0 || this.stokKarOranCalcEdit.Value <= 0)
                {
                    MessageBox.Show("Ürün bilgisi kaydedilemedi lütfen fiyat ve kar oranına bakınız.", "Uyarı");
                    return;
                }
                Stok s = new Stok();
                s.KategoriID       = kategoriID;
                s.UrunID           = urunID;
                s.FirmaID          = firmaID;
                s.Fiyat            = BAYMYO.UI.Converts.NullToFloat(this.stokFiyatCalcEdit.Value);
                s.KarOran          = BAYMYO.UI.Converts.NullToFloat(this.stokKarOranCalcEdit.Value);
                s.GuncellemeTarihi = DateTime.Now;
                if (StokMethods.Insert(s) > 0)
                {
                    Commons.Update(TableNames.Stok);
                    MessageBox.Show("İşlem başarılı bir şekilde gerçekleştirildi.", "Bilgi");
                    Temizle();
                }
            }
            catch (Exception ex)
            {
                Commons.Status(Commons.GetErrorCode("FST", 20) + ex.Message);
            }
        }
Exemplo n.º 17
0
 void backupButton_Click(object sender, EventArgs e)
 {
     Commons.BackupDatabase();
 }
Exemplo n.º 18
0
 void excelFileButton_ItemClick(object sender, ItemClickEventArgs e)
 {
     Commons.GeneralImportFile();
 }
Exemplo n.º 19
0
 void repairButton_Click(object sender, EventArgs e)
 {
     Commons.RepairDatabase();
 }
Exemplo n.º 20
0
 void firmaIceAktarButton_Click(object sender, EventArgs e)
 {
     try
     {
         bool isUpdate = Commons.ShowBox(QuestionType.StokGirisi);
         using (OpenFileDialog file = new OpenFileDialog())
         {
             file.Title = L.AktarilacakExcelDosyasi;
             Firma f = (this.firmaStokLookUpEdit.GetSelectedDataRow() as Firma);
             if (f != null & isUpdate)
             {
                 file.FileName = f.Adi + " - " + L.AlisFiyati + " - " + DateTime.Now.ToString("yyyy-MM-dd") + ".xls";
             }
             else
             {
                 file.FileName = L.AlisFiyati + " - " + DateTime.Now.ToString("yyyy-MM-dd") + ".xls";
             }
             file.Filter = "Excel (2003)|*.xls";
             switch (file.ShowDialog())
             {
             case System.Windows.Forms.DialogResult.OK:
             case System.Windows.Forms.DialogResult.Yes:
                 if (isUpdate)
                 {
                     #region --- Güncel Fiyat Listesi ---
                     // 0:ID	- 1:Ürün Açıklaması	- 2:Birim Fiyatı - 3:Güncelleme Tarihi
                     using (BAYMYO.MultiSQLClient.MDataAdapter dap = new BAYMYO.MultiSQLClient.MDataAdapter("select * from [DATA$A:D]", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + file.FileName + ";Extended Properties=Excel 8.0", BAYMYO.MultiSQLClient.MClientProvider.OleDb))
                     {
                         using (DataTable dt = new DataTable("ProductList"))
                         {
                             dap.Fill(dt);
                             if (dt.Rows.Count > 0)
                             {
                                 using (xFrmStokDegisiklik sd = new xFrmStokDegisiklik())
                                 {
                                     sd.Text         = string.Format(L.FirmaninFiyatListesi, f.Adi);
                                     sd.Mesaj        = L.AlgilananDegisiklikler;
                                     sd.Data         = new List <Stok>();
                                     sd.KategoriData = this.kategoriBindingSource.DataSource;
                                     sd.UrunData     = this.urunGridBindingSource.DataSource;
                                     sd.FirmaData    = this.firmaBindingSource.DataSource;
                                     Stok  s     = null;
                                     float fiyat = 0;
                                     foreach (DataRow dr in dt.Rows)
                                     {
                                         s = this.m_StokData.Find(x => x.ID.Equals(BAYMYO.UI.Converts.NullToInt(dr[0])));
                                         if (s != null)
                                         {
                                             fiyat = BAYMYO.UI.Converts.NullToFloat(dr[2]);
                                             s.GuncellemeTarihi = DateTime.Now;
                                             s.Changed          = false;
                                             if (s.Fiyat != fiyat)
                                             {
                                                 s.Fiyat   = fiyat;
                                                 s.Changed = true;
                                             }
                                             sd.Data.Add(s);
                                         }
                                     }
                                     switch (sd.ShowDialog())
                                     {
                                     case DialogResult.Yes:
                                         Commons.Loading("Product updates.. .");
                                         bool isOkey = false;
                                         foreach (Stok stk in sd.Data)
                                         {
                                             isOkey = StokMethods.Update(stk) > 0;
                                         }
                                         if (isOkey)
                                         {
                                             GetDataExcel();
                                             Commons.Status(L.UrunlerGuncellendi);
                                         }
                                         break;
                                     }
                                 }
                             }
                         }
                     }
                     #endregion
                 }
                 else
                 {
                     #region --- Yeni Ürün Listesi ---
                     // 0:Urun ID - 1:Ürün Açıklaması - 2:Birim Fiyatı - 3:Kar Orani
                     using (BAYMYO.MultiSQLClient.MDataAdapter dap = new BAYMYO.MultiSQLClient.MDataAdapter("select * from [DATA$A:E]", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + file.FileName + ";Extended Properties=Excel 8.0", BAYMYO.MultiSQLClient.MClientProvider.OleDb))
                     {
                         using (DataTable dt = new DataTable("ProductList"))
                         {
                             dap.Fill(dt);
                             using (xFrmStokDegisiklik sd = new xFrmStokDegisiklik())
                             {
                                 sd.Text         = string.Format(L.FirmaninFiyatListesi, f.Adi);
                                 sd.Mesaj        = L.AlgilananDegisiklikler;
                                 sd.Data         = new List <Stok>();
                                 sd.KategoriData = this.kategoriBindingSource.DataSource;
                                 sd.UrunData     = this.urunGridBindingSource.DataSource;
                                 sd.FirmaData    = this.firmaBindingSource.DataSource;
                                 Urun  u = null;
                                 float fiyat = 0, karOrani = 0;
                                 int   firmaID = Convert.ToInt32(this.firmaStokLookUpEdit.EditValue);
                                 foreach (DataRow dr in dt.Rows)
                                 {
                                     u     = this.m_UrunData.Find(x => x.ID.Equals(BAYMYO.UI.Converts.NullToInt(dr[0])));
                                     fiyat = BAYMYO.UI.Converts.NullToFloat(dr[2]);
                                     if (u != null & fiyat > 0)
                                     {
                                         karOrani = BAYMYO.UI.Converts.NullToFloat(dr[3]);
                                         Stok s = this.m_StokData.Find(p => p.FirmaID.Equals(firmaID) & p.KategoriID.Equals(u.KategoriID) & p.UrunID.Equals(u.ID));
                                         if (s == null)
                                         {
                                             s = new Stok
                                             {
                                                 KategoriID       = u.KategoriID,
                                                 UrunID           = u.ID,
                                                 FirmaID          = firmaID,
                                                 Fiyat            = fiyat,
                                                 KarOran          = (karOrani > 0 ? karOrani : 0.45f),
                                                 GuncellemeTarihi = DateTime.Now
                                             }
                                         }
                                         ;
                                         else
                                         {
                                             s.Fiyat            = fiyat;
                                             s.KarOran          = (karOrani > 0 ? karOrani : 0.45f);
                                             s.GuncellemeTarihi = DateTime.Now;
                                             s.Changed          = true;
                                         }
                                         sd.Data.Add(s);
                                     }
                                 }
                                 switch (sd.ShowDialog())
                                 {
                                 case DialogResult.Yes:
                                     Commons.Loading("Product updates.. .");
                                     bool isOkey = false;
                                     foreach (Stok stk in sd.Data)
                                     {
                                         if (stk.ID > 0)
                                         {
                                             isOkey = StokMethods.Update(stk) > 0;
                                         }
                                         else
                                         {
                                             isOkey = StokMethods.Insert(stk) > 0;
                                         }
                                     }
                                     if (isOkey)
                                     {
                                         GetDataExcel();
                                         Commons.Status(L.UrunlerGuncellendi);
                                     }
                                     break;
                                 }
                                 sd.Data = null;
                             }
                         }
                     }
                     #endregion
                 }
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         Commons.Status(Commons.GetErrorCode("FST", 11) + ex.Message);
     }
     finally
     {
         Commons.Loaded();
     }
 }
Exemplo n.º 21
0
        void savedButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(this.networkDatabase.Text))
                {
                    MessageBox.Show("Veritabanı ayarları boş bırakılamaz.", "Uyarı");
                    return;
                }
                Application.DoEvents();
                Commons.Loading("Ayarlar bölümünde yaptığınız değişiklikler kaydediliyor.. .");
                Commons.AppSettings.IS_IMAGE_HEADER = this.imageFormHeaderCheck.Checked;
                Commons.AppSettings.COMPANY_NAME    = this.txtTitle.Text;
                Commons.AppSettings.COMPANY_DESC    = this.txtSubTitle.Text;
                Commons.AppSettings.HEADER_TITLE    = this.txtHeaderLine.Text;
                Commons.AppSettings.DESC_TR         = this.txtDescTR.Text;
                Commons.AppSettings.DESC_EN         = this.txtDescEN.Text;
                Commons.AppSettings.OFISPHONE       = this.txtOfficePhone.Text;
                Commons.AppSettings.GSM             = this.txtGSM.Text;
                Commons.AppSettings.FAX             = this.txtFAX.Text;
                Commons.AppSettings.ADDRESS         = this.txtAddress.Text;
                Commons.AppSettings.MAIL            = this.txtMail.Text;
                Commons.AppSettings.WEB             = this.txtWeb.Text;

                Commons.AppSettings.PREPAREDBY = this.txtPreparedBy.Text.Trim().ToUpper();
                Commons.AppSettings.UNITS      = this.txtUnits.Text.Trim();

                Commons.AppSettings.TEKLIF_VERME_FORMU    = this.txtTeklifVerme.Text;
                Commons.AppSettings.MALZEME_TESLIM_FORMU  = this.txtMalzemeTeslimi.Text;
                Commons.AppSettings.SIPARIS_TOPLAMA_FORMU = this.txtSiparisToplama.Text;
                Commons.AppSettings.SIPARIS_LISTESI_FORMU = this.txtSiparisFiyatListesi.Text;
                Commons.AppSettings.URUN_KATALOG_FORMU    = this.txtUrunKatalogForm.Text;

                Commons.AppSettings.HEADER_BACKCOLOR   = Commons.RGBToString(this.headerTitleBgColor.Color);
                Commons.AppSettings.HEADER_BORDERCOLOR = Commons.RGBToString(this.headerTitleBrdColor.Color);
                Commons.AppSettings.HEADER_TITLECOLOR  = Commons.RGBToString(this.headerTitleFgColor.Color);
                Commons.AppSettings.HEADER_DESCCOLOR   = Commons.RGBToString(this.headerDescColor.Color);
                Commons.AppSettings.COMPANY_FORECOLOR  = Commons.RGBToString(this.companyForeColor.Color);
                Commons.AppSettings.DESC_TR_BACKCOLOR  = Commons.RGBToString(this.descTRbackColor.Color);
                Commons.AppSettings.DESC_TR_FORECOLOR  = Commons.RGBToString(this.descTRforeColor.Color);
                Commons.AppSettings.DESC_EN_BACKCOLOR  = Commons.RGBToString(this.descENbackColor.Color);
                Commons.AppSettings.DESC_EN_FORECOLOR  = Commons.RGBToString(this.descENforeColor.Color);
                if (this.currencyCheck.Checked)
                {
                    CurrentPriceFormat c  = this.defaultCurrencyLookUpEdit.GetSelectedDataRow() as CurrentPriceFormat;
                    CurrentPriceFormat c1 = this.crossCurrency1LookUpEdit.GetSelectedDataRow() as CurrentPriceFormat;
                    CurrentPriceFormat c2 = this.crossCurrency2LookUpEdit.GetSelectedDataRow() as CurrentPriceFormat;
                    if (c.Code.Equals(c1.Code) || c.Code.Equals(c2.Code))
                    {
                        dxErrorProvider1.SetError(defaultCurrencyLookUpEdit, L.DovizKuruBelirtilmis);
                        return;
                    }
                    else if (c1.Code.Equals(c.Code) || c1.Code.Equals(c2.Code))
                    {
                        dxErrorProvider1.SetError(crossCurrency1LookUpEdit, L.DovizKuruBelirtilmis);
                        return;
                    }
                    else if (c2.Code.Equals(c.Code) || c2.Code.Equals(c1.Code))
                    {
                        dxErrorProvider1.SetError(crossCurrency2LookUpEdit, L.DovizKuruBelirtilmis);
                        return;
                    }
                    else
                    {
                        Commons.AppSettings.DEFAULT_CURRENCY = c;
                        if (!string.IsNullOrWhiteSpace(this.defaultCurrencyFormatTextEdit.Text))
                        {
                            Commons.AppSettings.DEFAULT_CURRENCY.Format = this.defaultCurrencyFormatTextEdit.Text;
                        }
                        if (!string.IsNullOrWhiteSpace(this.defaultCurrencySymbolTextEdit.Text))
                        {
                            Commons.AppSettings.DEFAULT_CURRENCY.Symbol = this.defaultCurrencySymbolTextEdit.Text;
                        }
                        Commons.AppSettings.CROSS_CURRENCY_1 = c1;
                        if (!string.IsNullOrWhiteSpace(this.crossCurrency1TextEdit.Text))
                        {
                            Commons.AppSettings.CROSS_CURRENCY_1.Format = this.crossCurrency1TextEdit.Text;
                        }
                        if (!string.IsNullOrWhiteSpace(this.crossSymbol1TextEdit.Text))
                        {
                            Commons.AppSettings.CROSS_CURRENCY_1.Symbol = this.crossSymbol1TextEdit.Text;
                        }
                        Commons.AppSettings.CROSS_CURRENCY_2 = c2;
                        if (!string.IsNullOrWhiteSpace(this.crossCurrency2TextEdit.Text))
                        {
                            Commons.AppSettings.CROSS_CURRENCY_2.Format = this.crossCurrency2TextEdit.Text;
                        }
                        if (!string.IsNullOrWhiteSpace(this.crossSymbol2TextEdit.Text))
                        {
                            Commons.AppSettings.CROSS_CURRENCY_2.Symbol = this.crossSymbol2TextEdit.Text;
                        }
                    }
                }
                dxErrorProvider1.ClearErrors();
                Commons.AppSettings.DATABASE = this.networkDatabase.Text;
                if (!Commons.ConnectionStates())
                {
                    Commons.Loaded();
                    MessageBox.Show("Lütfen veritabanı bilgilerinin doğru olduğundan emin olunuz bu ayarı doğru yapmadığınız sürece bilgilerinize erişim sağlayamazsınız!", "Önemli Uyarı");
                    return;
                }
                if (jSonData.CreateFile(Commons.AppSettings))
                {
                    Commons.ColorLoad();
                    Commons.Loaded();
                    MessageBox.Show("Ayarlarınız başarılı bir şekilde kaydedildi.", "Bilgi");
                    this.DialogResult = DialogResult.OK;
                }
            }
            catch (Exception ex)
            {
                Commons.Status(Commons.GetErrorCode("FSG", 9) + ex.Message);
                Commons.Loaded();
            }
        }
Exemplo n.º 22
0
        public void GetTeklifler()
        {
            try
            {
                DataSet ds = TeklifMethods.GetRelation(this.ilkTarihDateEdit.DateTime, this.sonTarihDateEdit.DateTime, this.gemiAdiTextEdit.Text);
                this.teklifBindingSource.DataSource = ds.Tables[0];
                this.teklifGridControl.ForceInitialize();
                DevExpress.XtraGrid.Views.Grid.GridView grdDetailView = new DevExpress.XtraGrid.Views.Grid.GridView(this.teklifGridControl);
                this.teklifGridControl.LevelTree.Nodes.Add("FK_Teklif_TO_Detay", grdDetailView);
                grdDetailView.ViewCaption = "Teklif Detayları";
                grdDetailView.PopulateColumns(ds.Tables[1]);
                grdDetailView.OptionsView.ShowFooter                       = true;
                grdDetailView.OptionsView.ShowGroupPanel                   = false;
                grdDetailView.OptionsBehavior.AutoSelectAllInEditor        = false;
                grdDetailView.OptionsBehavior.Editable                     = false;
                grdDetailView.OptionsBehavior.AutoExpandAllGroups          = true;
                grdDetailView.OptionsSelection.EnableAppearanceFocusedCell = false;
                grdDetailView.OptionsView.EnableAppearanceEvenRow          = true;
                grdDetailView.GroupCount = 1;
                grdDetailView.SortInfo.AddRange(new DevExpress.XtraGrid.Columns.GridColumnSortInfo[] {
                    new DevExpress.XtraGrid.Columns.GridColumnSortInfo(grdDetailView.Columns[2], DevExpress.Data.ColumnSortOrder.Ascending)
                });
                byte index = 0;
                grdDetailView.Columns[index++].VisibleIndex = -1;
                //TeklifID,UrunAdi,FirmaBilgi,Adet,Birim,BirimFiyati,KarOrani
                string[] kolonIsimleri = { L.UrunAciklama, L.TedarikciFirma, L.Miktar, L.Birim, L.AlisFiyati, L.KarOrani, L.SatisFiyati, L.AlisTutar, L.SatisTutar, L.NetKar };
                DevExpress.XtraGrid.Columns.GridColumn c = null;
                string kolon = "";
                for (int i = 0; i < kolonIsimleri.Length; i++)
                {
                    kolon = kolonIsimleri[i];
                    switch (i)
                    {
                    case 6:
                        c = new DevExpress.XtraGrid.Columns.GridColumn();
                        c.VisibleIndex      = -1;
                        c.Name              = "colSatisFiyati";
                        c.FieldName         = c.Name;
                        c.Caption           = kolon;
                        c.UnboundExpression = "([BirimFiyati] + ([BirimFiyati] * [KarOrani]))";
                        c.UnboundType       = DevExpress.Data.UnboundColumnType.Decimal;
                        grdDetailView.Columns.Add(c);
                        break;

                    case 7:
                        c = new DevExpress.XtraGrid.Columns.GridColumn();
                        c.VisibleIndex = 9;
                        c.Name         = "colAlisTutar";
                        c.FieldName    = c.Name;
                        c.Caption      = kolon;
                        c.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] {
                            new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Sum, c.Name, Commons.Kur0FormatCustom)
                        });
                        c.UnboundExpression = "[BirimFiyati] * [Adet]";
                        c.UnboundType       = DevExpress.Data.UnboundColumnType.Decimal;
                        grdDetailView.Columns.Add(c);
                        break;

                    case 8:
                        c = new DevExpress.XtraGrid.Columns.GridColumn();
                        c.VisibleIndex = 10;
                        c.Name         = "colSatisTutar";
                        c.FieldName    = c.Name;
                        c.Caption      = kolon;
                        c.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] {
                            new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Sum, c.Name, Commons.Kur0FormatCustom)
                        });
                        c.UnboundExpression = "([BirimFiyati] + ([BirimFiyati] * [KarOrani])) * [Adet]";
                        c.UnboundType       = DevExpress.Data.UnboundColumnType.Decimal;
                        grdDetailView.Columns.Add(c);
                        break;

                    case 9:
                        c = new DevExpress.XtraGrid.Columns.GridColumn();
                        c.VisibleIndex = 11;
                        c.Name         = "colNetKar";
                        c.FieldName    = c.Name;
                        c.Caption      = kolon;
                        c.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] {
                            new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Sum, c.Name, Commons.Kur0FormatCustom)
                        });
                        c.UnboundExpression = "([BirimFiyati] * [KarOrani]) * [Adet]";
                        c.UnboundType       = DevExpress.Data.UnboundColumnType.Decimal;
                        grdDetailView.Columns.Add(c);
                        break;

                    case 4:
                    case 5:
                        grdDetailView.Columns[index].Caption      = kolon;
                        grdDetailView.Columns[index].VisibleIndex = -1;
                        break;

                    default:
                        grdDetailView.Columns[index].Caption = kolon;
                        break;
                    }
                    index++;
                }
                grdDetailView.Columns[1].Width = 300;
                grdDetailView.Columns[2].Width = 200;
                for (int i = 3; i < index; i++)
                {
                    grdDetailView.Columns[i].OptionsColumn.AllowSize = false;
                    if (i != 3 & i != 4 & i != 6 & i != 7)
                    {
                        grdDetailView.Columns[i].Width = 70;
                        grdDetailView.Columns[i].DisplayFormat.FormatString = Commons.Kur0Format;
                        grdDetailView.Columns[i].DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Custom;
                    }
                    else if (i == 3)
                    {
                        grdDetailView.Columns[i].Width = 40;
                    }
                    else if (i == 4)
                    {
                        grdDetailView.Columns[i].Width = 40;
                    }
                    else if (i == 6)
                    {
                        grdDetailView.Columns[i].DisplayFormat.FormatString = "% ##0";
                        grdDetailView.Columns[i].DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Custom;
                        grdDetailView.Columns[i].Width = 40;
                    }
                    else if (i == 7)
                    {
                        grdDetailView.Columns[i].DisplayFormat.FormatString = "##0";
                        grdDetailView.Columns[i].DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Custom;
                        grdDetailView.Columns[i].Width = 40;
                    }
                }
            }
            catch (Exception ex)
            {
                Commons.Status(Commons.GetErrorCode("FTD", 2) + ex.Message);
            }
        }
Exemplo n.º 23
0
        public xrpTeklifFormuFiyatsiz(Teklif p, FormType ft)
        {
            InitializeComponent();
            try
            {
                if (Commons.ExpariedDay <= 10)
                {
                    this.Watermark.Text = "CREATED BY TRIAL VERSION!";
                }
                else
                {
                    this.Watermark.Text = string.Empty;
                }
                Commons.Loading("Belge hazırlanıyor. ..");
                foreach (XRControl item in this.reportHeaderBand1.Controls)
                {
                    switch (BAYMYO.UI.Converts.NullToString(item.Tag))
                    {
                    case "T":
                        item.BorderColor = Commons.HEADER_BORDERCOLOR;
                        item.ForeColor   = Commons.HEADER_DESCCOLOR;
                        break;

                    case "TC":
                        item.BackColor   = Commons.HEADER_BACKCOLOR;
                        item.BorderColor = Commons.HEADER_BORDERCOLOR;
                        item.ForeColor   = Commons.HEADER_TITLECOLOR;
                        break;
                    }
                }
                if (Commons.AppSettings.IS_IMAGE_HEADER)
                {
                    this.reportHeaderBand1.HeightF = 290f;
                    foreach (XRControl item in this.reportHeaderBand1.Controls)
                    {
                        switch (BAYMYO.UI.Converts.NullToString(item.Tag))
                        {
                        case "T":
                        case "TC":
                            item.LocationFloat = new DevExpress.Utils.PointFloat(item.LocationF.X, item.LocationF.Y + 53);
                            break;

                        case "V":
                            item.Visible = false;
                            break;
                        }
                    }
                    this.xrLogo.Image   = Commons.HeaderImage;
                    this.xrLogo.WidthF  = 788f;
                    this.xrLogo.HeightF = 200f;
                }
                else
                {
                    this.xrLogo.Image       = Commons.LogoCompany;
                    this.xrOtherLogos.Image = Commons.LogoOther;
                    this.xrTitle.ForeColor  = this.xrSubTitle.ForeColor = Commons.COMPANY_FORECOLOR;

                    this.xrDesc_TR.BackColor = Commons.DESC_TR_BACKCOLOR;
                    this.xrDesc_TR.ForeColor = Commons.DESC_TR_FORECOLOR;
                    this.xrDesc_EN.BackColor = Commons.DESC_EN_BACKCOLOR;
                    this.xrDesc_EN.ForeColor = Commons.DESC_EN_FORECOLOR;

                    this.xrHeaderTitle.Text = Commons.AppSettings.HEADER_TITLE;
                    this.xrDesc_TR.Text     = Commons.AppSettings.DESC_TR;
                    this.xrDesc_EN.Text     = Commons.AppSettings.DESC_EN;
                    this.xrOfficePhone.Text = Commons.AppSettings.OFISPHONE;
                    this.xrFax.Text         = Commons.AppSettings.FAX;
                    this.xrGsm.Text         = Commons.AppSettings.GSM;
                    this.xrAddress.Text     = Commons.AppSettings.ADDRESS;
                    this.xrMail.Text        = Commons.AppSettings.MAIL;
                    this.xrWeb.Text         = Commons.AppSettings.WEB;
                }
                this.t = p;
                switch (ft)
                {
                case FormType.Offer:
                    this.DisplayName      = t.GemiAdi.Replace("/", "").Replace("\\", "") + " - " + L.TeklifVermeTutanagi + " (2) - " + t.Tarih.ToString("yyyy-MM-dd");
                    this.xrFormTitle.Text = "TEKLİF VERME TUTANAĞI / DOCUMENT OF OFFER";
                    this.xrFormRevNo.Text = Commons.AppSettings.TEKLIF_VERME_FORMU;
                    this.xrPayment.Text   = "PAYMENT: " + t.OdemeSekli;
                    this.xrDelivery.Text  = "DELIVERY: " + t.TeslimSuresi;
                    this.xrNote.Text      = "NOTE: " + t.Aciklama;
                    break;

                case FormType.Delivery:
                    this.DisplayName      = t.GemiAdi.Replace("/", "").Replace("\\", "") + " - " + L.TeslimVermeTutanagi + " (2) - " + t.Tarih.ToString("yyyy-MM-dd");
                    this.xrFormTitle.Text = "MAZLEME TESLİM TUTANAĞI / DOCUMENT OF DELIVERY";
                    this.xrFormRevNo.Text = Commons.AppSettings.MALZEME_TESLIM_FORMU;

                    this.xrPayment.Dispose();
                    this.xrDelivery.Dispose();
                    this.xrNote.Dispose();

                    this.xrFormRevNo.LocationFloat = new DevExpress.Utils.PointFloat(9.999935F, 9.999974F);
                    this.xrReferans.LocationFloat  = new DevExpress.Utils.PointFloat(406.1256F, 9.999974F);
                    this.ReportFooter.HeightF      = 35F;
                    break;
                }
                this.xrReferans.Text      = "Reference Number: " + t.ID;
                this.xrGemiAdi.Text       = t.GemiAdi;
                this.xrBaglamaLimani.Text = t.BaglamaLimani;
                this.xrAcenta.Text        = t.Acenta;
                this.xrFirma.Text         = t.Manager;
                this.xrTarih.Text         = t.GuncellemeTarihi.ToShortDateString();
                this.xrParaBirimi.Text    = Commons.CurrencySelected(t.ParaBirimi);
                this.xrKdv.Text           = Commons.GetTax(t.Kdv);
                this.xrHazirlayan.Text    = t.Hazirlayan;
            }
            catch (Exception ex)
            {
                Commons.Status(Commons.GetErrorCode("RFR", 2) + ex.Message);
            }
            finally
            {
                Commons.Loaded();
            }
        }
Exemplo n.º 24
0
        void excelUrunButton_Click(object sender, EventArgs e)
        {
            bool isOkey = false;

            try
            {
                if (this.excelKarOranCalcEdit.Enabled)
                {
                    if (this.excelKarOranCalcEdit.Value <= 0)
                    {
                        Commons.Status(L.KarOraniBelirle);
                        MessageBox.Show(L.KarOraniBelirle, "Warning");
                        return;
                    }
                }
                using (OpenFileDialog file = new OpenFileDialog())
                {
                    file.Title    = L.AktarilacakExcelDosyasi;
                    file.FileName = L.YeniDosyaAdi;
                    file.Filter   = "Excel (2003)|*.xls";
                    switch (file.ShowDialog())
                    {
                    case System.Windows.Forms.DialogResult.OK:
                    case System.Windows.Forms.DialogResult.Yes:
                        //0:UrunAdi1 - 1:UrunAdi2 - 2:BirimFiyat - 3:Miktar - 4:Birim - 5:KarOran - 6:ParaBirimi - 7:Tedarikci - 8:KdvOran
                        using (BAYMYO.MultiSQLClient.MDataAdapter dap = new BAYMYO.MultiSQLClient.MDataAdapter("select * from [DATA$A:I]", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + file.FileName + ";Extended Properties=Excel 8.0", BAYMYO.MultiSQLClient.MClientProvider.OleDb))
                        {
                            using (DataTable dt = new DataTable("ProductList"))
                            {
                                dap.Fill(dt);
                                if (dt.Rows.Count > 0)
                                {
                                    this.loadProgress.Properties.Maximum = dt.Rows.Count;
                                    int   index = 0;
                                    float adet  = 0;
                                    using (xFrmTeklifDetayDegisiklik sd = new xFrmTeklifDetayDegisiklik())
                                    {
                                        sd.Text = string.Format("{8}: {9} - {10}: {11} - {0} {2}:{4:##0.0000}|{3}:{5:##0.0000} {1} {2}:{6:##0.0000}|{3}:{7:##0.0000}", L.KurKaydedilen, L.KurYeni, Commons.Kur1Code, Commons.Kur2Code, t.Kur1, t.Kur2, Commons.Kur1, Commons.Kur2, L.GemiAdi, t.GemiAdi, L.BaglamaLimani, t.BaglamaLimani);
                                        sd.Data = new List <TeklifDetay>();
                                        switch (this.turlerRadioGroup.SelectedIndex)
                                        {
                                        case 1:
                                            sd.Mesaj = L.IDileAktarimMesaji;
                                            #region --- Urun ID ile Aktarım ---
                                            foreach (DataRow dr in dt.Rows)
                                            {
                                                adet = BAYMYO.UI.Converts.NullToFloat(dr[3]);
                                                if (adet > 0)
                                                {
                                                    UrunKatalog sl = Urunler.FindAll(x => x.UrunID.Equals(BAYMYO.UI.Converts.NullToInt(dr[0]))).OrderBy(x => x.Fiyat).Take(1).ElementAt(0);
                                                    if (sl != null)
                                                    {
                                                        using (TeklifDetay td = new TeklifDetay
                                                        {
                                                            TeklifID = t.ID,
                                                            StokID = sl.StokID,
                                                            KategoriID = sl.KategoriID,
                                                            FirmaID = sl.FirmaID,
                                                            UrunAdi = sl.UrunAdi,
                                                            BirimFiyati = sl.Fiyat,
                                                            KarOrani = sl.KarOran,
                                                            Miktar = sl.Miktar,
                                                            Birim = sl.Birim,
                                                            Kdv = sl.Kdv,
                                                            Adet = adet
                                                        })
                                                        {
                                                            sd.Data.Add(td);
                                                            Application.DoEvents();
                                                            this.loadProgress.Increment(++index);
                                                        }
                                                    }
                                                }
                                            }
                                            #endregion
                                            break;

                                        case 2:
                                            sd.Mesaj = L.MusteriDegisikligiAktarim;
                                            #region --- Ürün Adı ile Aktarım ---
                                            foreach (DataRow dr in dt.Rows)
                                            {
                                                TeklifDetay td = TeklifDetaylari.Find(x => x.UrunAdi.ToLower().Trim().Equals(BAYMYO.UI.Converts.NullToString(dr[0]).ToLower().Trim(), StringComparison.CurrentCultureIgnoreCase));
                                                if (td != null)
                                                {
                                                    adet = BAYMYO.UI.Converts.NullToFloat(dr[3]);
                                                    if (!adet.Equals(td.Adet) || adet.Equals(0))
                                                    {
                                                        td.Adet = adet;
                                                        sd.Data.Add(td);
                                                        Application.DoEvents();
                                                        this.loadProgress.Increment(++index);
                                                    }
                                                    adet = 0;
                                                }
                                            }
                                            #endregion
                                            break;

                                        default:
                                            sd.Mesaj = L.DigerFirmadanTeklifAktarim;
                                            #region --- Genel Aktarım ---
                                            string paraBirimi   = "dft";
                                            float  excelKarOran = BAYMYO.UI.Converts.NullToFloat(this.excelKarOranCalcEdit.Value);
                                            foreach (DataRow dr in dt.Rows)
                                            {
                                                adet = BAYMYO.UI.Converts.NullToFloat(dr[3]);
                                                if (adet > 0)
                                                {
                                                    using (TeklifDetay td = new TeklifDetay
                                                    {
                                                        TeklifID = t.ID,
                                                        UrunAdi = BAYMYO.UI.Converts.NullToString(dr[0]) + " " + BAYMYO.UI.Converts.NullToString(dr[1]),
                                                        FirmaAdi = BAYMYO.UI.Converts.NullToString(dr[7]),
                                                        BirimFiyati = BAYMYO.UI.Converts.NullToFloat(dr[2]),
                                                        KarOrani = BAYMYO.UI.Converts.NullToFloat(dr[5]),
                                                        Miktar = 1,
                                                        Birim = BAYMYO.UI.Converts.NullToString(dr[4]),
                                                        Kdv = BAYMYO.UI.Converts.NullToFloat(dr[8]),
                                                        Adet = adet
                                                    })
                                                    {
                                                        if (!string.IsNullOrWhiteSpace(td.UrunAdi) & td.BirimFiyati > 0)
                                                        {
                                                            paraBirimi = BAYMYO.UI.Converts.NullToString(dr[6]);
                                                            if (string.IsNullOrWhiteSpace(paraBirimi))
                                                            {
                                                                paraBirimi = this.excelDovizTipiComboBoxEdit.Text;
                                                            }
                                                            switch (paraBirimi.ToLower())
                                                            {
                                                            case "u":
                                                            case "$":
                                                            case "a":
                                                            case "1":
                                                                td.BirimFiyati = td.BirimFiyati * Commons.Kur1;
                                                                break;

                                                            case "e":
                                                            case "€":
                                                            case "b":
                                                            case "2":
                                                                td.BirimFiyati = td.BirimFiyati * Commons.Kur2;
                                                                break;
                                                            }
                                                            if (td.KarOrani <= 0)
                                                            {
                                                                td.KarOrani = excelKarOran;
                                                            }
                                                            sd.Data.Add(td);
                                                            Application.DoEvents();
                                                            this.loadProgress.Increment(++index);
                                                        }
                                                    }
                                                }
                                            }
                                            paraBirimi = null;
                                            #endregion
                                            break;
                                        }
                                        #region --- Aktarım Yap ---
                                        switch (sd.ShowDialog())
                                        {
                                        case DialogResult.Yes:
                                            this.loadProgress.Properties.Maximum = sd.Data.Count;
                                            this.loadProgress.Increment(0);
                                            foreach (TeklifDetay td in sd.Data)
                                            {
                                                if (td.ID <= 0)
                                                {
                                                    if (TeklifDetayMethods.Insert(td) > 0)
                                                    {
                                                        Application.DoEvents();
                                                        this.loadProgress.Increment(++index);
                                                        isOkey = true;
                                                    }
                                                }
                                                else
                                                {
                                                    if (td.Adet.Equals(0))
                                                    {
                                                        if (TeklifDetayMethods.Delete(td) > 0)
                                                        {
                                                            Application.DoEvents();
                                                            this.loadProgress.Increment(++index);
                                                            isOkey = true;
                                                        }
                                                    }
                                                    else if (TeklifDetayMethods.Update(td) > 0)
                                                    {
                                                        Application.DoEvents();
                                                        this.loadProgress.Increment(++index);
                                                        isOkey = true;
                                                    }
                                                }
                                            }
                                            break;
                                        }
                                        if (isOkey)
                                        {
                                            Commons.Status(string.Format(L.ExcelDekiUrunAktarildi, sd.Data.Count));
                                        }
                                        #endregion
                                        sd.Data = null;
                                    }
                                }
                            }
                        }
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                Commons.Status(Commons.GetErrorCode("FEA", 2) + ex.Message);
            }
            finally
            {
                if (isOkey)
                {
                    Commons.Update(TableNames.Teklif);
                    this.DialogResult = DialogResult.OK;
                }
            }
        }
Exemplo n.º 25
0
 private void xFrmUrunRapor_Load(object sender, EventArgs e)
 {
     Commons.Status(this.Text + " ekranı açıldı.");
     GetUrunRapor();
 }
Exemplo n.º 26
0
        void rFrmMain_Load(object sender, EventArgs e)
        {
            try
            {
                this.Text = "EasySupply v" + Application.ProductVersion;
                this.ribbon.SelectedPage = FaturaHazir;

                #region --- Application Loading ---
                Commons.Loading("Uygulama başlatılıyor. ..");
                bool isJSonFile = jSonData.ReadFile();
                Commons.GetLastAccessTime();
                #endregion

                #region --- Validate Design Control ---
                if (!Commons.ValidateApplication())
                {
                    Commons.Loaded();
                    using (xFrmValidate v = new xFrmValidate())
                    {
                        switch (v.ShowDialog())
                        {
                        case DialogResult.OK:
                            m_LisansKeyValidate = true;
                            Application.Restart();
                            return;

                        default:
                            Application.ExitThread();
                            Application.Exit();
                            return;
                        }
                    }
                }
                #endregion

                #region --- Trial Version Warning ---
                if (Commons.ExpariedDay <= 10)
                {
                    this.yeniLisanSatinAlButton.Visibility = BarItemVisibility.Always;
                }
                else
                {
                    this.yeniLisanSatinAlButton.Visibility = BarItemVisibility.Never;
                }
                this.m_TrialVersionWarning = this.m_TrialVersionWarning.AddHours(1);
                this.timer1.Start();
                #endregion

                #region --- Default Settings ---
                Commons.Loading("Uygulama ayarları okunuyor. ..");
                DevExpress.XtraBars.Helpers.SkinHelper.InitSkinGallery(rgbTemalar, true);
                if (!isJSonFile)
                {
                    Commons.Loaded();
                    xFrmSettings settings = new xFrmSettings();
                    settings.ShowDialog();
                }
                Commons.ColorLoad();
                Commons.RestoreHeader();
                Commons.Loading("Bağlantı ayarları kontrol ediliyor.. .");
                if (!Commons.ConnectionStates())
                {
                    Commons.Loaded();
                    xFrmSettings settings = new xFrmSettings();
                    settings.ShowDialog();
                }
                Commons.Loading("Güncel doviz kurları ve datalar getiriliyor.. .");
                Commons.CurrentDoviz();
                #endregion

                this.urunFiyatKarsilasitirmaButton.PerformClick();
            }
            catch (Exception ex)
            {
                Commons.Status(Commons.GetErrorCode("FMN", 2) + ex.Message);
            }
            finally
            {
                Commons.Loaded();
            }
        }
Exemplo n.º 27
0
        public xrpTeklifFormu(Teklif p, FormType ft, float grandTotal, float discountTotal)
        {
            InitializeComponent();
            try
            {
                if (Commons.ExpariedDay <= 10)
                {
                    this.Watermark.Text = "CREATED BY TRIAL VERSION!";
                }
                else
                {
                    this.Watermark.Text = string.Empty;
                }
                Commons.Loading("Belge hazırlanıyor. ..");
                foreach (XRControl item in this.reportHeaderBand1.Controls)
                {
                    switch (BAYMYO.UI.Converts.NullToString(item.Tag))
                    {
                    case "T":
                        item.BorderColor = Commons.HEADER_BORDERCOLOR;
                        item.ForeColor   = Commons.HEADER_DESCCOLOR;
                        break;

                    case "TC":
                        item.BackColor   = Commons.HEADER_BACKCOLOR;
                        item.BorderColor = Commons.HEADER_BORDERCOLOR;
                        item.ForeColor   = Commons.HEADER_TITLECOLOR;
                        break;
                    }
                }
                if (Commons.AppSettings.IS_IMAGE_HEADER)
                {
                    this.reportHeaderBand1.HeightF = 285f;
                    foreach (XRControl item in this.reportHeaderBand1.Controls)
                    {
                        switch (BAYMYO.UI.Converts.NullToString(item.Tag))
                        {
                        case "T":
                        case "TC":
                            item.LocationFloat = new DevExpress.Utils.PointFloat(item.LocationF.X, item.LocationF.Y + 53);
                            break;

                        case "V":
                            item.Visible = false;
                            break;
                        }
                    }
                    this.xrLogo.Image   = Commons.HeaderImage;
                    this.xrLogo.WidthF  = 788f;
                    this.xrLogo.HeightF = 200f;
                }
                else
                {
                    this.xrLogo.Image       = Commons.LogoCompany;
                    this.xrOtherLogos.Image = Commons.LogoOther;
                    this.xrTitle.ForeColor  = this.xrSubTitle.ForeColor = Commons.COMPANY_FORECOLOR;

                    this.xrDESC_TR.BackColor = Commons.DESC_TR_BACKCOLOR;
                    this.xrDESC_TR.ForeColor = Commons.DESC_TR_FORECOLOR;
                    this.xrDESC_EN.BackColor = Commons.DESC_EN_BACKCOLOR;
                    this.xrDESC_EN.ForeColor = Commons.DESC_EN_FORECOLOR;

                    this.xrHeaderTitle.Text = Commons.AppSettings.HEADER_TITLE;
                    this.xrDESC_TR.Text     = Commons.AppSettings.DESC_TR;
                    this.xrDESC_EN.Text     = Commons.AppSettings.DESC_EN;
                    this.xrOfficePhone.Text = Commons.AppSettings.OFISPHONE;
                    this.xrFax.Text         = Commons.AppSettings.FAX;
                    this.xrGsm.Text         = Commons.AppSettings.GSM;
                    this.xrAddress.Text     = Commons.AppSettings.ADDRESS;
                    this.xrMail.Text        = Commons.AppSettings.MAIL;
                    this.xrWeb.Text         = Commons.AppSettings.WEB;
                }
                this.t = p;
                this.ghDicount.Visible = this.xrDiscount.Visible = (t.Iskonto > 0);
                if (!this.xrDiscount.Visible)
                {
                    this.ghDeliveryExpenses.LocationFloat = new DevExpress.Utils.PointFloat(445.33F, 20.00001F);
                    this.xrDeliveryExpenses.LocationFloat = new DevExpress.Utils.PointFloat(593.81F, 20.00008F);
                    this.ghGrandTotal.LocationFloat       = new DevExpress.Utils.PointFloat(445.33F, 40.00003F);
                    this.xrGrandTotals.LocationFloat      = new DevExpress.Utils.PointFloat(593.81F, 40.00009F);
                }
                else
                {
                    this.ghDicount.Text = "DISCOUNT (" + t.Iskonto.ToString("%##0") + ")";
                }
                switch (ft)
                {
                case FormType.Offer:
                    this.DisplayName      = t.GemiAdi.Replace("/", "").Replace("\\", "") + " - " + L.TeklifVermeTutanagi + " - " + t.Tarih.ToString("yyyy-MM-dd");
                    this.xrFormTitle.Text = "TEKLİF VERME TUTANAĞI / DOCUMENT OF OFFER";
                    this.xrFormRevNo.Text = Commons.AppSettings.TEKLIF_VERME_FORMU;
                    this.xrPayment.Text   = "PAYMENT: " + t.OdemeSekli;
                    this.xrDelivery.Text  = "DELIVERY: " + t.TeslimSuresi;
                    this.xrNote.Text      = "NOTE: " + t.Aciklama;
                    switch (t.ParaBirimi)
                    {
                    case "KUR1":
                    case "KUR2":
                        this.xrDeliverySignature.Text = "OFFERED BY\nUNSIGNED DUE TO ELECTRONICALLY PREPARED.";           // TARAFINDAN SUNULAN
                        break;

                    default:
                        switch (Commons.AppSettings.DEFAULT_CURRENCY.Code)
                        {
                        case "TRY":
                            this.xrDeliverySignature.Text = "OFFERED BY\nELEKTRONİK ORTAMDA HAZIRLANDIĞI İÇİN İMZASIZDIR.";               // TARAFINDAN SUNULAN
                            break;

                        default:
                            this.xrDeliverySignature.Text = "OFFERED BY\nUNSIGNED DUE TO ELECTRONICALLY PREPARED.";               // TARAFINDAN SUNULAN
                            break;
                        }
                        break;
                    }
                    this.xrOfferSignature.Text = "ORDERED BY";          // TARAFINDAN SİPARİŞ
                    break;

                case FormType.Delivery:
                    this.DisplayName      = t.GemiAdi.Replace("/", "").Replace("\\", "") + " - " + L.TeslimVermeTutanagi + " - " + t.Tarih.ToString("yyyy-MM-dd");
                    this.xrFormTitle.Text = "MAZLEME TESLİM TUTANAĞI / DOCUMENT OF DELIVERY";
                    this.xrFormRevNo.Text = Commons.AppSettings.MALZEME_TESLIM_FORMU;

                    this.xrPayment.Dispose();
                    this.xrDelivery.Dispose();
                    this.xrNote.Dispose();

                    this.xrDeliverySignature.Text = "TAKEN DELIVERY BY / TESLİM ALAN";       // TESLİM ALAN
                    this.xrOfferSignature.Text    = "DELIVERED BY / TESLİM EDEN";            // TESLİM EDEN

                    this.xrDeliverySignature.LocationFloat = new DevExpress.Utils.PointFloat(9.999935F, 85.999974F);
                    this.xrFormRevNo.LocationFloat         = new DevExpress.Utils.PointFloat(9.999935F, 145F);
                    this.xrOfferSignature.LocationFloat    = new DevExpress.Utils.PointFloat(406.1256F, 85.999974F);
                    this.xrReferans.LocationFloat          = new DevExpress.Utils.PointFloat(406.1256F, 145F);
                    this.ReportFooter.HeightF = 190F;
                    break;
                }
                this.xrReferans.Text      = "Reference Number: " + t.ID;
                this.xrGemiAdi.Text       = t.GemiAdi;
                this.xrBaglamaLimani.Text = t.BaglamaLimani;
                this.xrAcenta.Text        = t.Acenta;
                this.xrFirma.Text         = t.Manager;
                this.xrTarih.Text         = t.GuncellemeTarihi.ToShortDateString();
                this.xrParaBirimi.Text    = Commons.CurrencySelected(t.ParaBirimi);
                this.xrKdv.Text           = Commons.GetTax(t.Kdv);
                this.xrHazirlayan.Text    = t.Hazirlayan;
                string
                    currencyFormat       = Commons.Kur0Format,
                    currencyFormatCustom = Commons.Kur0FormatCustom;
                float deliveryExpenses   = t.TasimaUcreti;
                switch (t.ParaBirimi)
                {
                case "KUR1":
                    currencyFormat       = Commons.Kur1Format;
                    currencyFormatCustom = Commons.Kur1FormatCustom;
                    this.xrSatisFiyati.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "SatisFiyatiKur1", currencyFormatCustom) });
                    this.xrSatisTutari.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "SatisTutarKur1", currencyFormatCustom) });
                    this.xrTotals.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "SatisTutarKur1") });
                    this.xrTotals.Summary.FormatString = currencyFormatCustom;
                    deliveryExpenses = (t.TasimaUcreti / t.Kur1);
                    if (this.xrDiscount.Visible)
                    {
                        this.xrDiscount.Text = (discountTotal / t.Kur1).ToString(currencyFormat);
                    }
                    this.xrGrandTotals.Text = grandTotal.ToString(currencyFormat);
                    break;

                case "KUR2":
                    currencyFormat       = Commons.Kur2Format;
                    currencyFormatCustom = Commons.Kur2FormatCustom;
                    this.xrSatisFiyati.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "SatisFiyatiKur2", currencyFormatCustom) });
                    this.xrSatisTutari.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "SatisTutarKur2", currencyFormatCustom) });
                    this.xrTotals.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "SatisTutarKur2") });
                    deliveryExpenses = (t.TasimaUcreti / t.Kur2);
                    if (this.xrDiscount.Visible)
                    {
                        this.xrDiscount.Text = (discountTotal / t.Kur2).ToString(currencyFormat);
                    }
                    this.xrGrandTotals.Text = grandTotal.ToString(currencyFormat);
                    break;

                default:
                    this.xrSatisFiyati.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "SatisFiyati", currencyFormatCustom) });
                    this.xrSatisTutari.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "SatisTutar", currencyFormatCustom) });
                    if (this.xrDiscount.Visible)
                    {
                        this.xrDiscount.Text = discountTotal.ToString(currencyFormat);
                    }
                    this.xrGrandTotals.Text = grandTotal.ToString(currencyFormat);
                    break;
                }
                if (t.TasimaUcreti > 0)
                {
                    this.xrDeliveryExpenses.Text = deliveryExpenses.ToString(currencyFormat);
                }
                else
                {
                    this.xrDeliveryExpenses.Text = t.TasimaUcretiNotu;
                }
                this.xrTotals.Summary.FormatString = currencyFormatCustom;
            }
            catch (Exception ex)
            {
                Commons.Status(Commons.GetErrorCode("RFR", 1) + ex.Message);
            }
            finally
            {
                Commons.Loaded();
            }
        }
Exemplo n.º 28
0
 void urunIceAktarButton_Click(object sender, EventArgs e)
 {
     try
     {
         using (OpenFileDialog file = new OpenFileDialog())
         {
             file.Title = L.AktarilacakExcelDosyasi;
             Kategori k = (this.kategoriAktarimLookUpEdit.GetSelectedDataRow() as Kategori);
             if (k != null)
             {
                 file.FileName = k.Adi.Replace("/", "").Replace("\\", "") + " - " + L.AlisFiyati + " - " + DateTime.Now.ToString("yyyy-MM-dd") + ".xls";
             }
             else
             {
                 dxErrorProvider1.SetError(kategoriAktarimLookUpEdit, L.BosGecilemez);
                 return;
             }
             file.Filter = "Excel (2003)|*.xls";
             switch (file.ShowDialog())
             {
             case System.Windows.Forms.DialogResult.OK:
             case System.Windows.Forms.DialogResult.Yes:
                 using (BAYMYO.MultiSQLClient.MDataAdapter dap = new BAYMYO.MultiSQLClient.MDataAdapter("select * from [DATA$A:D]", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + file.FileName + ";Extended Properties=Excel 8.0", BAYMYO.MultiSQLClient.MClientProvider.OleDb))
                 {
                     using (DataTable dt = new DataTable("ProductList"))
                     {
                         dap.Fill(dt);
                         if (dt.Rows.Count > 0)
                         {
                             using (xFrmUrunYeni sd = new xFrmUrunYeni())
                             {
                                 sd.Text  = L.YeniUrunKategoriBazinda;
                                 sd.Mesaj = string.Format(L.KategoridekiUrunListesi, k.Adi);
                                 sd.Data  = new List <Urun>();
                                 foreach (DataRow dr in dt.Rows)
                                 {
                                     Urun u = new Urun
                                     {
                                         KategoriID = k.ID,
                                         Kod        = Commons.CreateImpaCode(dr[0]),//BAYMYO.UI.Converts.NullToInt(BAYMYO.UI.Converts.NullToString(dr[0]).Replace(" ", "").Trim()).ToString("00 00 00"),
                                         Adi        = BAYMYO.UI.Converts.NullToString(dr[1]),
                                         Miktar     = 1,
                                         Birim      = BAYMYO.UI.Converts.NullToString(dr[2]),
                                         Kdv        = BAYMYO.UI.Converts.NullToFloat(dr[3]),
                                         Tarih      = DateTime.Now
                                     };
                                     if (!string.IsNullOrWhiteSpace(u.Adi))
                                     {
                                         sd.Data.Add(u);
                                     }
                                 }
                                 switch (sd.ShowDialog())
                                 {
                                 case DialogResult.Yes:
                                     Commons.Loading("Product updates.. .");
                                     foreach (Urun stk in sd.Data)
                                     {
                                         UrunMethods.Insert(stk);
                                     }
                                     Commons.Update(TableNames.Urun);
                                     Commons.Status(string.Format(L.KategoriUrunlerEklendi, k.Adi));
                                     dxErrorProvider1.ClearErrors();
                                     GetData(k.ID);
                                     break;
                                 }
                                 sd.Data = null;
                             }
                         }
                     }
                 }
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         Commons.Status(Commons.GetErrorCode("FUN", 8) + ex.Message);
     }
     finally
     {
         Commons.Loaded();
     }
 }
Exemplo n.º 29
0
        public xrpUrunKatalog(bool isID)
        {
            InitializeComponent();
            try
            {
                if (Commons.ExpariedDay <= 10)
                {
                    this.Watermark.Text = "CREATED BY TRIAL VERSION!";
                }
                else
                {
                    this.Watermark.Text = string.Empty;
                }
                Commons.Loading("Belge hazırlanıyor. ..");
                this.DisplayName = "PRODUCT CATALOG - " + DateTime.Now.ToString("yyyy-MM-dd");
                #region --- Header ---
                if (Commons.AppSettings.IS_IMAGE_HEADER)
                {
                    this.reportHeaderBand1.HeightF = 225f;
                    foreach (XRControl item in this.reportHeaderBand1.Controls)
                    {
                        switch (BAYMYO.UI.Converts.NullToString(item.Tag))
                        {
                        case "T":
                            item.LocationFloat = new DevExpress.Utils.PointFloat(item.LocationF.X, item.LocationF.Y + 53);
                            break;

                        case "V":
                            item.Visible = false;
                            break;
                        }
                    }
                    this.xrLogo.Image   = Commons.HeaderImage;
                    this.xrLogo.WidthF  = 788f;
                    this.xrLogo.HeightF = 200f;
                }
                else
                {
                    this.xrLogo.Image       = Commons.LogoCompany;
                    this.xrOtherLogos.Image = Commons.LogoOther;
                    this.xrTitle.ForeColor  = this.xrSubTitle.ForeColor = Commons.COMPANY_FORECOLOR;

                    this.xrDesc_TR.BackColor = Commons.DESC_TR_BACKCOLOR;
                    this.xrDesc_TR.ForeColor = Commons.DESC_TR_FORECOLOR;
                    this.xrDesc_EN.BackColor = Commons.DESC_EN_BACKCOLOR;
                    this.xrDesc_EN.ForeColor = Commons.DESC_EN_FORECOLOR;

                    this.xrDesc_TR.Text     = Commons.AppSettings.DESC_TR;
                    this.xrDesc_EN.Text     = Commons.AppSettings.DESC_EN;
                    this.xrOfficePhone.Text = Commons.AppSettings.OFISPHONE;
                    this.xrFax.Text         = Commons.AppSettings.FAX;
                    this.xrGsm.Text         = Commons.AppSettings.GSM;
                    this.xrAddress.Text     = Commons.AppSettings.ADDRESS;
                    this.xrMail.Text        = Commons.AppSettings.MAIL;
                    this.xrWeb.Text         = Commons.AppSettings.WEB;
                    this.xrFormRevNo.Text   = Commons.AppSettings.URUN_KATALOG_FORMU;
                }
                this.xrhSalesPrice.Text = string.Format("Sales Price ({0}) ({1}) ({2})",
                                                        Commons.AppSettings.DEFAULT_CURRENCY.Code,
                                                        Commons.AppSettings.CROSS_CURRENCY_1.Code,
                                                        Commons.AppSettings.CROSS_CURRENCY_2.Code);
                switch (!isID)
                {
                case true:
                    this.xrhID.Text = "ID";
                    this.xrID.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "UrunID") });
                    break;
                }
                #endregion
                this.xrKur0.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
                    new DevExpress.XtraReports.UI.XRBinding("Text", null, "Tutar", Commons.Kur0FormatCustom)
                });
                this.xrKur1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
                    new DevExpress.XtraReports.UI.XRBinding("Text", null, "TutarKur1", Commons.Kur1FormatCustom)
                });
                this.xrKur2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
                    new DevExpress.XtraReports.UI.XRBinding("Text", null, "TutarKur2", Commons.Kur2FormatCustom)
                });
            }
            catch (Exception ex)
            {
                Commons.Status(Commons.GetErrorCode("RFR", 5) + ex.Message);
            }
            finally
            {
                Commons.Loaded();
            }
        }
Exemplo n.º 30
0
 void excelAktarimButton_Click(object sender, EventArgs e)
 {
     Commons.ProductImportFile();
 }