//
    //Event handler for Delete clicks
    protected void cmdDelete_Click(object sender, EventArgs e)
    {
        //Declare Connection Variable (Connection)
        //Create a new object SqlConnection with the connection string initialized
        //Set the Connection variable to point to the new object instance.
        //If connection goes out of scope the database connection won't be closed and must be closed with either ( Close or Disopose )
        EFDal ed = new EFDal();
        SqlConnection Connection = new SqlConnection(ed.connStr);

        //Opens a connection to the database.
        //If available draws from an open conneciton from the connection pool(if available)
        Connection.Open();

        String sql = "delete from [dbo].[Vekalet] where [Id] = @Id";
        //
        //Declare SQLCommand Object named Command
        //Create a new Command object with a delete statement that will removed the current item being edited
        SqlCommand Command = new SqlCommand(sql, Connection);
        Command.Parameters.AddWithValue("@Id", RequestValue("ID"));
        //
        //Run the statement ExecuteNonQuery returns no Results.
        Command.ExecuteNonQuery();

        //Closes the Connection to the back to the connection pool.
        Connection.Close();
        Response.Redirect("Vekalet.aspx");
    }
    protected void Ekle()
    {
        EFDal ed = new EFDal();
        DataSet ds = new DataSet();
        using (sfKalDataEntities ent = new sfKalDataEntities())
        {
            try
            {

                GorevFirma oGorevFirma = new GorevFirma();
                oGorevFirma.GorevID = int.Parse(txtGorevID.Text.Trim());
                oGorevFirma.FirmaID =int.Parse(txtFirmaID.Text.Trim());
                oGorevFirma.Tarih = clnGorevTarihi.SelectedDate.Value;
                oGorevFirma.GoreveGidilenAracinPlakasi = ddlAracPlakasi.SelectedItem.Text;
                ent.AddToGorevFirma(oGorevFirma);
                ent.SaveChanges();
                Session["RaporIcinAracPlakasi"] = ddlAracPlakasi.SelectedItem.Text;
                lblUyari.ForeColor = System.Drawing.Color.Green;
                lblUyari.Text = "Görev-Firma başarılı olarak eklendi..";
                if (Session["OturumIcinGorevID"]==null)
                Session["OturumIcinGorevID"] = int.Parse(txtGorevID.Text.Trim());
                GorevIDdenGrdiBagla(int.Parse(txtGorevID.Text.Trim()));
            }
            catch (Exception exc)
            {
                lblUyari.ForeColor = System.Drawing.Color.Red;
                lblUyari.Text = "Görev-Firma ekleme başarısız.Hata:" + exc.Message;
            }
        }
    }
 protected void Ekle()
 {
     EFDal ed = new EFDal();
     using (sfKalDataEntities ent = new sfKalDataEntities())
     {
         try
         {
             Egitim oEgitim = new Egitim();
             oEgitim.FirmaId = int.Parse(_FirmaId.Text.Trim());
             oEgitim.Egitimci = _Egitimci.Text.Trim();
             oEgitim.EgitimiAlan = _EgitimiAlan.Text.Trim();
             oEgitim.EgitimTarihi = clnEgitimTar.SelectedDate.Value;
             //oEgitim.EgitimTarihi = DateTime.Parse("2010.06.14");
             oEgitim.EgitiminKonusu = _EgitiminKonusu.Text.Trim();
             oEgitim.SertifikaNo = _SertifikaNo.Text.Trim();
             oEgitim.EgitimYeri = _EgitimYeri.Text.Trim();
             oEgitim.BolgeKodu = (short)ed.kal_BolgeKoduDon(Context.User.Identity.Name);
             oEgitim.EgitimBedeli = decimal.Parse(_EgitimBedeli.Text);
             oEgitim.EgitimGunSayisi = short.Parse(_EgitimGunSayisi.Text);
             ent.AddToEgitim(oEgitim);
             ent.SaveChanges();
             lblUyari.ForeColor = System.Drawing.Color.Green;
             lblUyari.Text = "Kayıt ekleme işlemi başarılı!";
         }
         catch (Exception exc)
         {
             lblUyari.ForeColor = System.Drawing.Color.Red;
             lblUyari.Text = "Kayıt ekleme işlemi başarısız!Hata:" + exc.Message;
         }
     }
 }
 protected void Ekle()
 {
     using (sfKalDataEntities ent = new sfKalDataEntities())
     {
         EFDal ed = new EFDal();
         referans oreferans = new referans();
         oreferans.LABKOD = txtLABKOD.Text.Trim();
         oreferans.CIHAZ = txtCIHAZ.Text.Trim();
         oreferans.DBASNO = txtDBASNO.Text.Trim();
         oreferans.MARKA = txtMARKA.Text.Trim();
         oreferans.TIPMODEL = txtTIPMODEL.Text.Trim();
         oreferans.SERINO = txtSERINO.Text.Trim();
         oreferans.OLCARALIGI = txtOLCARALIGI.Text.Trim();
         oreferans.OLCBUYUKLUGU = txtOLCBUYUKLUGU.Text.Trim();
         oreferans.BAKKARTNO = txtBAKKARTNO.Text.Trim();
         oreferans.SINIF = txtSINIF.Text.Trim();
         oreferans.KALPERIYOT = txtKALPERIYOT.Text.Trim();
         oreferans.TEMINTAR = raddtTeminTar.SelectedDate.Value;
         oreferans.TEMINDURUMU = txtTEMINDURUMU.Text.Trim();
         oreferans.KAPSAMDISI = chkKAPSAMDISI.Checked;
         oreferans.BOLGEKODU = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
         oreferans.NICK = txtNICK.Text.Trim();
         ent.AddToreferans(oreferans);
         ent.SaveChanges();
     }
 }
    protected void btnEkle_Click(object sender, EventArgs e)
    {
        EFDal ed = new EFDal();
        int BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
        int SiradakiFirmaId = ed.FirmaIdMaxDon() + 1;
        sfKalDataEntities KalData=new sfKalDataEntities();
        firma oFirma = new firma();
        oFirma.MUSTNO = int.Parse(txtMustNo.Text.Trim());
        oFirma.FIRMAADI = txtFirmaAdi.Text.Trim();
        oFirma.ADRESI = txtAdres1.Text.Trim();
        oFirma.ADRESII = txtAdres2.Text.Trim();
        oFirma.IL_ILCE = txtIlce.Text.Trim();
        oFirma.TELEFON = txtTelefon.Text.Trim();
        oFirma.FAX = txtFax.Text.Trim();
        oFirma.ILGILI = txtIlgili.Text.Trim();
        oFirma.EMAIL = txtEmail.Text.Trim();
        oFirma.NOTLAR = txtNotlar.Text.Trim();
        oFirma.FATADRES = txtFatAdresi.Text.Trim();
        oFirma.VERGIDAIRESI = txtVergiDairesi.Text.Trim();
        oFirma.VERGINO = txtVergiNo.Text.Trim();
        oFirma.BOLGEKODU = (short)BolgeKodu;
        oFirma.KAMUFIRMASI = chkKamufirması.Checked;
        oFirma.TSEBELGELI = chkTseBelgeli.Checked;
        KalData.AddTofirma(oFirma);

        firmaChild ofirmaChild = new firmaChild();
        ofirmaChild.AnneFirmaFirmaId = int.Parse(Session["ChildFirmaIcingidecekFirmaId"].ToString());
        ofirmaChild.ChildFirmaId = SiradakiFirmaId;
        KalData.AddTofirmaChild(ofirmaChild);
        KalData.SaveChanges();
    }
    protected void RaporuOlustur()
    {
        //Create new CultureInfo
        var cultureInfo = new System.Globalization.CultureInfo("tr-TR");

        // Set the language for static text (i.e. column headings, titles)
        System.Threading.Thread.CurrentThread.CurrentUICulture = cultureInfo;

        // Set the language for dynamic text (i.e. date, time, money)
        System.Threading.Thread.CurrentThread.CurrentCulture = cultureInfo;

        EFDal ed = new EFDal();
        var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
        instanceReportSource.ReportDocument = new KalibrasyonRaporlari.PersGetiriAnaliz();
        this.rptPersonelGetiri.ReportSource = instanceReportSource;
        Telerik.Reporting.Report report = (Telerik.Reporting.Report)instanceReportSource.ReportDocument;

        report.ReportParameters["BolgeKodu"].Value = Convert.ToInt32(Session["dshBolgeKodu"].ToString());//ed.kal_BolgeKoduDon(Context.User.Identity.Name);
        report.ReportParameters["BasTar"].Value = DateTime.Parse(Session["dshBasTar"].ToString());
        report.ReportParameters["SonTar"].Value = DateTime.Parse(Session["dshSonTar"].ToString());
        report.ReportParameters["Personel"].Value = Context.User.Identity.Name;

        Telerik.Reporting.TextBox txtReportHeader = report.Items.Find("txtReportHeader", true)[0] as Telerik.Reporting.TextBox;
        txtReportHeader.Value = report.ReportParameters["BasTar"].Value.ToString().Replace(" 00:00:00", "") + " ve " + report.ReportParameters["SonTar"].Value.ToString().Replace(" 00:00:00", "") +
                            " tarihleri arasında gerçekleştirilen kalibrasyonları  aşağıda görebilirsiniz";
    }
Example #7
0
 protected void MailGonder(int FirmaId, DateTime KalBitTar)
 {
     //try
     //{
         EFDal ed = new EFDal();
         string EMail = ed.FirmaIddenFirmaEmailDon(FirmaId);
         MailMessage mail = new MailMessage();
         //mail.To.Add(EMail);
         mail.To = EMail;
         //mail.Bcc = "[email protected];[email protected]";
         mail.Bcc = "*****@*****.**";
         mail.From = "*****@*****.**";
         mail.Subject = "Kalibrasyon bilgilendirme";
         string Body = "Sn. " + ed.FirmaIddenFirmaAdiDon(FirmaId) + " yetkilisi,<br/> Yaklaşık bir sene  önce kurumumuz kalibrasyon laboratuvarları bünyesinde aşağıda listesi verilen cihazlarınızın kalibrasyonları yapılmıştır. Bu cihazlar için yaklaşan kalibrasyon zamanını saygılarımızla hatırlatırız.<br/> Lütfen bu e-postaya yanıt dönmeyiniz.<br/>";
         Body += MailBodyOlustur(FirmaId, KalBitTar);
         mail.Body = Body + "<br/><br/>TSE Kalibrasyon Merkezi Başkanlığı";
         SmtpMail.SmtpServer = "10.6.1.7";
         mail.BodyFormat = MailFormat.Html;
         //lblDeneme.Text = Body;
         SmtpMail.Send(mail);
     //}
     //catch (Exception exc)
     //{
     //    lblDeneme.Text += exc.Message;
     //}
 }
Example #8
0
 protected string MailBodyOlustur(int FirmaId, DateTime KalBitTar)
 {
     EFDal ed = new EFDal();
     string MailBody = "";
     MailBody += "<table border=\"1\"><tr>" +
                     "<td><b>Marka</b></td>" +
                     "<td><b>Model</b></td>" +
                     "<td><b>Seri No</b></td>" +
                     "<td><b>Kalibrasyon Tarihi</b></td>" +
                     "<td><b>Sertifika No</b></td>" +
                     "<td><b>Ölçüm Aralığı</b></td>" +
                 "</tr>";
     DataSet ds = new DataSet();
     ds = ed.FirmaIDveKalTardanCihazListesiDon(FirmaId, KalBitTar);
     for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
     {
         MailBody += "<tr>";
         string Marka = "<td>" + ds.Tables[0].Rows[i]["IMALATCI"].ToString() + "</td>";
         string Model = "<td>" + ds.Tables[0].Rows[i]["MODEL"].ToString() + "</td>";
         string SeriNo = "<td>" + ds.Tables[0].Rows[i]["SERINO"].ToString() + "</td>";
         string KalBitTar2 = "<td>" + ds.Tables[0].Rows[i]["KALBITTAR"].ToString().Replace(" 00:00:00", "") + "</td>";
         string SertifikaNo = "<td>" + ds.Tables[0].Rows[i]["SERTIFIKANO"].ToString() + "</td>";
         string OlcAraligi = "<td>" + ds.Tables[0].Rows[i]["OLCUMARALIGI"].ToString() + "</td>";
         MailBody += Marka + Model + SeriNo + KalBitTar2 + SertifikaNo + OlcAraligi + "</tr>";
     }
     MailBody += "</table>";
     ds.Dispose();
     return MailBody;
 }
Example #9
0
    protected void btnEkle_Click(object sender, EventArgs e)
    {
        EFDal ed=new EFDal();
        int SiradakiFirmaId = ed.FirmaIdMaxDon() + 1;
        if (btnEkle.Text == "Yeni Firma Eklemek İstiyorum")
        {
            txtMustNo.Text = SiradakiMustNoDon().ToString();
            btnEkle.Text = "Ekle";
        }
        else
        {
            try
            {
                if (Ekle())
                {
                    //Eger firma için bir şifre tanımlanmamışsa şifreyi tanımla ve Yetki tablosuna kaydet; Hepsini alltaki fonksiyon yapacak
                    ed.FirmaCredentialsEkle(SiradakiFirmaId);
                    if (cusCustomtxtVergiNo.IsValid)
                    {
                        Session["IstekleriGosterilecekFirmaId"] = SiradakiFirmaId.ToString();
                        Response.Redirect("FirmadanGelenIstekler.aspx");
                    }
                }
            }
            catch
            {

            }
        }
    }
Example #10
0
    protected void SevKGorunumunuAyarla(int IstId)
    {
        EFDal ed = new EFDal();
        short BolgeKodu = (short)ed.kal_BolgeKoduDon(Context.User.Identity.Name);

        using (Service1Client proxy = new Service1Client())
        {
            //List<kal_IstekAraEnGenelDisBirimeGidenCihazlarDahil_Result> oSevkAramaSonucu = null;
            //oSevkAramaSonucu = proxy.IstekAraEnGenelDisBirimeGidenCihazlarDahil(0, 0, 0,BolgeKodu,null, null, null, IstId, null, null, null, null, null);
            //List<kal_IstekAraEnGenelDisBirimeGidenCihazlarDahil_Result> oSevkAramaSonucu  = proxy.IstekAraEnGenelDisBirimeGidenCihazlarDahil(0, 0, 0, BolgeKodu, null, null, IstId, null, null, null, null, null);
            ServiceReference1.kal_IstekAraEnGenelDisBirimeGidenCihazlarDahil_Result[] oSevkAramaSonucu = proxy.IstekAraEnGenelDisBirimeGidenCihazlarDahil(0, 0, 0, BolgeKodu, null, null, IstId, null, null, null, null, null);
            int cnt = oSevkAramaSonucu.Count();
            if (cnt > 0)
            {
                pnlSevkBirimi.Visible = true;
                //İçeriği doldur
                lblSevkBirimi.Text = oSevkAramaSonucu[0].ALTBIRIMADI;
                lblSevkEden.Text = oSevkAramaSonucu[0].Gonderen;
                lblGonderilmeTarihi.Text = oSevkAramaSonucu[0].GonderilmeTarihi != null ? oSevkAramaSonucu[0].GonderilmeTarihi.Value.ToString("dd.MM.yyyy") : " ";
                //lblDonusTarihi.Text = oSevkAramaSonucu[0].GeriDonusTarihi.Value.ToString("dd.MM.yyyy");
                lblDonusTarihi.Text = oSevkAramaSonucu[0].GeriDonusTarihi != null ? oSevkAramaSonucu[0].GeriDonusTarihi.Value.ToString("dd.MM.yyyy") : " ";
            }
            else
            {
                pnlSevkBirimi.Visible = false;
            }
        }
    }
    protected void RaporuOlustur()
    {
        //Create new CultureInfo
        var cultureInfo = new System.Globalization.CultureInfo("tr-TR");

        // Set the language for static text (i.e. column headings, titles)
        System.Threading.Thread.CurrentThread.CurrentUICulture = cultureInfo;

        // Set the language for dynamic text (i.e. date, time, money)
        System.Threading.Thread.CurrentThread.CurrentCulture = cultureInfo;

        EFDal ed = new EFDal();
        var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
        instanceReportSource.ReportDocument = new KalibrasyonRaporlari.Laboratuvarlar();
        this.rptLaboratuvarlar.ReportSource = instanceReportSource;
        Telerik.Reporting.Report report = (Telerik.Reporting.Report)instanceReportSource.ReportDocument;

        /*
        report.ReportParameters["BolgeKodu"].Value = Convert.ToInt32(Session["dshBolgeKodu"].ToString());//ed.kal_BolgeKoduDon(Context.User.Identity.Name);
        report.ReportParameters["BasTar"].Value = DateTime.Parse("2015-01-01");
        report.ReportParameters["SonTar"].Value = DateTime.Parse("2015-06-01");
        //report.ReportParameters["Personel"].Value = Context.User.Identity.Name;
        */

        report.ReportParameters["BolgeKodu"].Value = Convert.ToInt32(Session["dshBolgeKodu"].ToString());//ed.kal_BolgeKoduDon(Context.User.Identity.Name);
        report.ReportParameters["BasTar"].Value = DateTime.Parse(Session["dshBasTar"].ToString());
        report.ReportParameters["SonTar"].Value = DateTime.Parse(Session["dshSonTar"].ToString());

        Telerik.Reporting.TextBox txtAciklama = report.Items.Find("txtAciklama", true)[0] as Telerik.Reporting.TextBox;
        txtAciklama.Value = ed.BolgeKodundanBolgeAdiniDon(Convert.ToInt32(report.ReportParameters["BolgeKodu"].Value.ToString())) + " bölgesinde, " + report.ReportParameters["BasTar"].Value.ToString().Replace(" 00:00:00", "") + " ve " + report.ReportParameters["SonTar"].Value.ToString().Replace(" 00:00:00", "") +
                            " tarihleri arasında bölgelere ait özet durumu  aşağıda görebilirsiniz";
    }
Example #12
0
    protected void ButtonDene_Click(object sender, EventArgs e)
    {
        //Create new CultureInfo
        var cultureInfo = new System.Globalization.CultureInfo("tr-TR");

        // Set the language for static text (i.e. column headings, titles)
        System.Threading.Thread.CurrentThread.CurrentUICulture = cultureInfo;

        // Set the language for dynamic text (i.e. date, time, money)
        System.Threading.Thread.CurrentThread.CurrentCulture = cultureInfo;

        EFDal ed = new EFDal();
        var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
        instanceReportSource.ReportDocument = new KalibrasyonRaporlari.KYS();
        this.KYSReport.ReportSource = instanceReportSource;
        Telerik.Reporting.Report report = (Telerik.Reporting.Report)instanceReportSource.ReportDocument;

        report.ReportParameters["BolgeKodu"].Value = 1;
        //report.ReportParameters[0].Value = 1;
        report.ReportParameters["BasTar"].Value = DateTime.Parse("2015-01-01");
        report.ReportParameters["SonTar"].Value = DateTime.Parse("2015-06-01");

        Telerik.Reporting.TextBox txtAciklama = report.Items.Find("txtAciklama", true)[0] as Telerik.Reporting.TextBox;
        txtAciklama.Value = ed.BolgeKodundanBolgeAdiniDon(Convert.ToInt32(report.ReportParameters["BolgeKodu"].Value)) +
                            " bölgesi için " + report.ReportParameters["BasTar"].Value.ToString().Replace(" 00:00:00", "") + " ve " + report.ReportParameters["SonTar"].Value.ToString().Replace(" 00:00:00", "") +
                            " tarihleri arasında gecikme sürelerini aşağıda görebilirsiniz";
    }
 private void GridiBagla()
 {
     EFDal ed = new EFDal();
     Guid ikbsPersonelUN = ed.UserNamedenPersonelUNDon(Context.User.Identity.Name);
     grdImzaBekleyenBelgeler.DataSource = ed.PersonelinImzasınıBekleyenBelgeleriDon(ikbsPersonelUN);
     grdImzaBekleyenBelgeler.DataBind();
 }
    protected void btnTelefonNoKaydet_Click(object sender, EventArgs e)
    {
        if (ddlPersonel.SelectedValue != "-1")
        {
            EFDal ed = new EFDal();
            var master = (App_Master_standardized)this.Page.Master;
            try
            {
                Guid ikbsPersonelUN = ed.UserNamedenPersonelUNDon(ddlPersonel.SelectedValue);
                if (ed.PersonelTelefonNumarasiDahaOnceGirilmisMi(ikbsPersonelUN))
                {
                    ed.PersonelTelefonNumarasiniGuncelle(ikbsPersonelUN, txtTelefonNo.Text);
                }
                else
                {
                    ed.PersonelTelefonNumaralarinaEkle(ikbsPersonelUN, txtTelefonNo.Text.Trim());
                }

                master.MesajGoster(true, "Başarılı", "Telefon numarası başarılı biçimde eklendi...");
            }
            catch (Exception exc)
            {

                master.MesajGoster(false, "Hata", "Telefon numarası eklenemdi...");
            }

        }
    }
    protected void btnIndirimiGeriAl_Click(object sender, EventArgs e)
    {
        //string[] arrVirgulleAyrilmiIstIdler = GridUzerindeSecilmisSatirlarinIdleriniDon().Split(',');
        using (Service1Client proxy = new Service1Client())
        {
            EFDal ed = new EFDal();
            int BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
            //string arrVirgulleAyrilmiIstIdler = proxy.OnaylananFaturaNoIcerigiIstIdleriniDon((short)BolgeKodu, lblFaturaNo.Text);
            //string[] IstIdler = arrVirgulleAyrilmiIstIdler.Split(',');

            string arrVirgulleAyrilmiIstIdler = proxy.OnaylananFaturaNoIcerigiIstIdleriniDon((short)BolgeKodu, lblFaturaNo.Text);
            string[] IstIdler = arrVirgulleAyrilmiIstIdler.Split(',');
            try
            {
                foreach (string itemIstId in IstIdler)
                {
                    proxy.SeciliIstekIcinIndirimiGeriAl(int.Parse(itemIstId));
                }
                RefreshdenSonraIndirimIsleriniAyarla();
                grdFaturaIcerigiGridiniBagla(lblFaturaNo.Text, lblFirmaAdi.Text);
                RadNotification1.Text = "Uygulanan indirim geri alma işlemi <font color='green'>başarılı!</font>"; ;
                RadNotification1.Show();
            }
            catch
            {
                RadNotification1.Text = "Uygulanan indirim geri alma işlemi <font color='red'>başarısız!</font>"; ;
                RadNotification1.Show();
            }
        }
    }
Example #16
0
 protected void btnMustNodanAra_Click(object sender, EventArgs e)
 {
     EFDal ed = new EFDal();
     DataSet ds = ed.kal_MustNodanAra(int.Parse(txtAranacakMustNo.Text.Trim()), intBolgeKodu);
     grdBulunanFirmalar.DataSource = ds;
     grdBulunanFirmalar.DataBind();
 }
    protected void ddlPersonel_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (ddlPersonel.SelectedValue != "-1")
        {
            var master = (App_Master_standardized)this.Page.Master;
            try
            {
                EFDal ed = new EFDal();
                Guid ikbsPersonelUN = ed.UserNamedenPersonelUNDon(ddlPersonel.SelectedValue);

                if (ed.PersonelTelefonNumarasiDahaOnceGirilmisMi(ikbsPersonelUN))
                {
                    if (ed.PersonelinTelefonunuDon(ikbsPersonelUN) != "-")
                    {
                        txtTelefonNo.Text = ed.PersonelinTelefonunuDon(ikbsPersonelUN);
                        master.MesajGoster(true, "Uyarı", "Bu personelin zaten kayıtlı bir telefonu var.Güncellemek için yeni numarayı girip kaydediniz");

                    }
                }
                else
                {
                    txtTelefonNo.Text = string.Empty;
                }

            }
            catch (Exception exc)
            {

                master.MesajGoster(false, "Hata", "Telefon numarası eklenemedi...");
            }

        }
    }
Example #18
0
    protected void grdIstIdninImzaileIlgiliBelgeleri2_OnItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            Label lblKimlerImzalamis = (Label)item.FindControl("lblImzalayanlar");

            EFDal ed=new EFDal();
            string path = ed.ImzaliDosyalarIddenPathDon(Convert.ToInt32(item["Id"].Text));
            //lblKimlerImzalamis.Text=  ed.SignersInfo(path);

            item["Imzalayan"].Text = ed.SignersInfo(path);

            item["Imzalayan"].ForeColor = System.Drawing.Color.Red;
            if (item["Imzalayan"].Text == "00000000-0000-0000-0000-000000000000" || item["Imzalayan"].Text == "&nbsp;")
            {
                item["Imzalayan"].BackColor = System.Drawing.Color.Gainsboro;
                item["Imzalayan"].Text = "İmzalanmamış";
            }
            else
            {
                item["Imzalayan"].BackColor = System.Drawing.Color.LightYellow;
            }

           using (Service1Client proxy = new Service1Client())
           {
               item["Yukleyen"].Text = proxy.kal_UserIddenUserNameDon(Guid.Parse(item["Yukleyen"].Text));
           }

            item["DokumanTipi"].Text = ed.DokumanTipiIddenDokumanAdiDon(Convert.ToInt32(item["DokumanTipi"].Text));

        }
    }
Example #19
0
 protected void btnVergiNodanAra_Click(object sender, EventArgs e)
 {
     EFDal ed = new EFDal();
     DataSet ds = ed.kal_VergiNodanAra(intBolgeKodu, txtAranacakVergiNo.Text.Trim());
     grdBulunanFirmalar.DataSource = ds;
     grdBulunanFirmalar.DataBind();
 }
 private void PopulaterdgvIstekDokumanlari()
 {
     EFDal ed = new EFDal();
     rdgvIstekDokumanlari.DataSource =
         ed.IstekIddenIstekDokumanlariniDon(IstId);
     rdgvIstekDokumanlari.DataBind();
 }
 protected void NewMessagesNotification_CallbackUpdate(object sender, Telerik.Web.UI.RadNotificationEventArgs e)
 {
     //NewMessagesNotification.Text = "You have " + DateTime.Now.Second.ToString() + " new message(s)";
     EFDal ed = new EFDal();
     NewMessagesNotification.Text =  ed.PersonelinImzasınıBekleyenBelgeleriDon(ed.UserNamedenPersonelUNDon(Context.User.Identity.Name)).Tables[0]
         .Rows.Count.ToString() + " adet belge imzanızı bekliyor. Görmek için aşağıdaki linke tıklayınız.<br/><a href='/sfKalibrasyon/UserControls/Pages/PersonelinImzasiniBekleyenBelgeler.aspx'>İmzanızı bekleyen belgeler</a>";
     ;
 }
 protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     EFDal ed = new EFDal();
     int key = (int)GridView1.DataKeys[e.RowIndex].Value;
     string delSQL = "delete from GorevPersonel where ID=" + key.ToString();
     ed.Sil(delSQL);
     GorevPersonelGridiniBagla(int.Parse(GorevID.Text.Trim()));
 }
Example #23
0
 private void FirmaIdDenFirmaAdiDon()
 {
     int FirmaId = int.Parse(ViewState["FirmaId"].ToString());
     string Sonuc = "";
     EFDal ed = new EFDal();
     Sonuc = ed.FirmaIddenFirmaAdiDon(FirmaId);
     //return Sonuc;
     lblDene.Text = Sonuc;
 }
 protected void GorevPersonelGridiniBagla(int GorevId)
 {
     EFDal ed = new EFDal();
     DataSet ds = new DataSet();
     ds = ed.GorevPersonelDon(GorevId);
     GridView1.DataSource = ds;
     GridView1.DataBind();
     //ds.Dispose();
 }
 public void ddlPersonelDoldur()
 {
     EFDal ed = new EFDal();
     ddlPersonel.DataSource = ed.kal_BolgeyeGoreLabPersonelGruplariDon(ed.kal_BolgeKoduDon(Context.User.Identity.Name).ToString(), "LabPers");
     ddlPersonel.DataTextField = "UserName";
     ddlPersonel.DataValueField = "UserName";
     ddlPersonel.DataBind();
     ddlPersonel.Items.Insert(0, new ListItem("Seçiniz...", "-1"));
 }
Example #26
0
 protected void GorevIDdenGrdiBagla(int GorevId)
 {
     EFDal ed = new EFDal();
     DataSet ds = new DataSet();
     ds = ed.GorevFirmaDon(GorevId);
     GridView1.DataSource = ds;
     GridView1.DataBind();
     ds.Dispose();
 }
 protected void btnSil_Click(object sender, EventArgs e)
 {
     EFDal ed = new EFDal();
     int Id = int.Parse(txtID.Text.Trim());
     string delSQL = "delete from refkalibrasyon where ID=" + Id.ToString();
     ed.Sil(delSQL);
     Temizle();
     grdReferansKalibrasyonlariBagla();
 }
Example #28
0
 protected void ddlSevkEdildigiBirimiDoldur()
 {
     EFDal ed = new EFDal();
     ddlSevkEdildigiBirim.DataSource = ed.BirimListesiniDon();
     ddlSevkEdildigiBirim.DataTextField = "ALTBIRIMADI";
     ddlSevkEdildigiBirim.DataValueField = "BIRIMID";
     ddlSevkEdildigiBirim.DataBind();
     ddlSevkEdildigiBirim.Items.Insert(0, new ListItem("Cihazın sevk edileceği birimi seçiniz...", "0"));
     ddlSevkEdildigiBirim.SelectedValue = "0";
 }
Example #29
0
 protected void RadListView1Bagla()
 {
     EFDal ed=new EFDal();
     DataSet ds = new DataSet();
     int BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
     ds = ed.kal_IsDetayi(BolgeKodu);
     RadListView1.DataSource = ds;
     RadListView1.DataBind();
     lblKayitSayisi.Text = ds.Tables[0].Rows.Count.ToString()+ " adet kayıt bulundu";
 }
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        int AppId = Convert.ToInt32(apt.ID);
        EFDal ed = new EFDal();
        string BolgeAdi = ed.AppointmentIddenBolgeAdiDon(AppId);

        StartingOn.Text = apt.Owner.UtcToDisplay(apt.Start).ToString().Remove(11, 8) + "-" + apt.Owner.UtcToDisplay(apt.End).ToString().Remove(11, 8)+"     Bölge:"+BolgeAdi;
        FullText.Text = apt.Subject;
    }
Example #31
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EFDal ed        = new EFDal();
        int   BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);

        if (!IsPostBack)
        {
            clnBastar.SelectedDate = DateTime.Today.AddMonths(-1);
            clnBitTar.SelectedDate = DateTime.Today;

            IlBazliAnalizGridiniBagla(BolgeKodu, clnBastar.SelectedDate.Value, clnBitTar.SelectedDate.Value);
        }
        else
        {
            IlBazliAnalizGridiniBagla(BolgeKodu, clnBastar.SelectedDate.Value, clnBitTar.SelectedDate.Value);
        }
    }
Example #32
0
    /// <summary>
    /// Binds the grid view
    /// </summary>
    private void BindData()
    {
        //try
        //{
        //    DisPersonels disPersonels = new DisPersonels();

        //    DisPersonelManager disPersonelManager = new DisPersonelManager();
        //    disPersonels = disPersonelManager.GetAll();

        //    if (disPersonels.Count == 0)
        //        ResultsLiteral.Text = "No records were found.";
        //    else
        //    {
        //        int start = (((gridViewDisPersonel.PageIndex + 1) * PagingSize) - PagingSize) + 1;
        //        int end = ((start + PagingSize) - 1 > disPersonels.Count ? disPersonels.Count : (start + PagingSize) - 1);
        //        ResultsLiteral.Text = string.Format("Showing {0} to {1} of {2}", start, end, disPersonels.Count);
        //    }

        //    gridViewDisPersonel.DataSource = disPersonels;
        //    gridViewDisPersonel.DataBind();
        //}
        //catch (BusinessLayerException ex)
        //{
        //    throw new Exception("An error while gettings all DisPersonel records. " + ex.Message, ex);
        //}
        EFDal ed = new EFDal();
        IList <DisPersonel> DisPersonelList =
            ed.BoleglerinTumDisPersonelleriniDon(ed.kal_BolgeKoduDon(Context.User.Identity.Name));
        //int DisPersonelSayisi = ed.BoleglerinTumDisPersonelleriniDon(ed.kal_BolgeKoduDon(Context.User.Identity.Name)).Count();
        int DisPersonelSayisi = DisPersonelList.Count();

        if (DisPersonelSayisi == 0)
        {
            lblUyari.Text = "Bölgeye ait dış personel bulunamadı.";
        }
        else
        {
            int start = (((gridViewDisPersonel.CurrentPageIndex + 1) * gridViewDisPersonel.PageSize) - gridViewDisPersonel.PageSize) + 1;
            int end   = ((start + gridViewDisPersonel.PageSize) - 1 > DisPersonelSayisi ? DisPersonelSayisi : (start + gridViewDisPersonel.PageSize) - 1);
            lblUyari.Text = string.Format("Showing {0} to {1} of {2}", start, end, DisPersonelSayisi);
        }
        //gridViewDisPersonel.DataSource = ed.BoleglerinTumDisPersonelleriniDon(ed.kal_BolgeKoduDon(Context.User.Identity.Name));
        gridViewDisPersonel.DataSource = DisPersonelList;
        gridViewDisPersonel.DataBind();
    }
Example #33
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EFDal ed       = new EFDal();
        int   TarifeId = ed.CihazKapsamAyrintiTablosuDon(this.IstId);

        grdFaturaIcerigi.DataSource = ed.kal_FaturalandirmaAyrintilari(this.IstId, TarifeId);
        grdFaturaIcerigi.DataBind();
        ToplamBedelYaz(this.IstId);

        /*
         * using (Service1Client proxy = new Service1Client())
         * {
         *  var oistek = proxy.IstekFind(this.IstId);
         *  TarifeId=oistek.CIHAZKAPSAMAYRINTITABLOSU;
         * }
         */
        //EFDal ed = new EFDal();
    }
Example #34
0
    protected void grdFaturaIcerigi_PageSizeChanged(object sender, GridPageSizeChangedEventArgs e)
    {
        EFDal ed        = new EFDal();
        short BolgeKodu = (short)ed.kal_BolgeKoduDon(Context.User.Identity.Name);

        using (Service1Client proxy = new Service1Client())
        {
            if (Session["CachegrdFaturaIcerigi"] != null)
            {
                grdFaturaIcerigi.DataSource = Session["CachegrdFaturaIcerigi"];
            }
            else
            {
                grdFaturaIcerigi.DataSource      = proxy.OnaylananFaturaNoIcerigiFirmaAdli(BolgeKodu, lblFaturaNo.Text, lblFirmaAdi.Text);
                Session["CachegrdFaturaIcerigi"] = grdFaturaIcerigi.DataSource;
            }
        }
    }
Example #35
0
    protected void grdReferansBagla()
    {
        EFDal   ed           = new EFDal();
        int     intBolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
        DataSet ds           = new DataSet();

        ds = ed.kal_BolgeyeAitReferansListesiDon(intBolgeKodu, ddlLablar.SelectedItem.Text);
        grdReferans.DataSource = ds;
        grdReferans.DataBind();
        if (ds.Tables[0].Rows.Count > 0)
        {
            lblKayitSayisi.Text = ds.Tables[0].Rows.Count.ToString() + " adet referans saptandı.";
        }
        else
        {
            lblKayitSayisi.Text = "";
        }
    }
Example #36
0
    protected void rdgrDahaOncePakatKapsaminaAlinanlar_ItemCommand(object source, GridCommandEventArgs e)
    {
        EFDal ed    = new EFDal();
        int   IstId = 0;

        if (e.CommandName == RadGrid.SelectCommandName && e.Item is GridDataItem)
        {
            GridDataItem dataItem = (GridDataItem)e.Item;
            int          key      = int.Parse(dataItem.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["PaketNoID"].ToString());
            //Paket numaralari silinmezden önce istek tablosunda PaketNoId alanını -1'e çekmen gerekir
            IstId = ed.PaketNumaralariTablosundaPaketNoIddenIstIdDon(key);
            ed.IstekTablosundaIstIdlikaydinPaketNoIdsiniEksiBirYap(IstId);


            ed.Sil("delete from PaketNumaralari where PaketNoID =" + key.ToString());//önceki aynı ISTID li kayitlari sil
            rdgrDahaOncePakatKapsaminaAlinanlarGridiniBagla();
        }
    }
Example #37
0
    protected void Guncelle(int Id)
    {
        EFDal ed = new EFDal();

        using (sfKalDataEntities ent = new sfKalDataEntities())
        {
            var oteklif = (from c in ent.teklif where c.ID == Id select c).First();
            oteklif.FIRMAID      = int.Parse(txtFirmaId.Text.Trim());
            oteklif.YIL          = int.Parse(txtYIL.Text.Trim());
            oteklif.FIRMA        = txtFIRMA.Text.Trim();
            oteklif.FAX          = txtFAX.Text.Trim();
            oteklif.MUSTNO       = int.Parse(txtMUSTNO.Text.Trim());
            oteklif.TEKLIFTAR    = raddtTEKLIFTAR.SelectedDate;
            oteklif.TEKLIFNO     = (txtTEKLIFNO.Text.Trim());
            oteklif.CIHAZADI     = txtCIHAZADI.Text.Trim();
            oteklif.OLCUMARALIGI = txtOLCUMARALIGI.Text.Trim();
            oteklif.KALYERI      = txtKALYERI.Text.Trim();
            oteklif.OLCMETODU    = txtOLCMETODU.Text.Trim();
            oteklif.BIRIMFIYAT   = decimal.Parse(txtBIRIMFIYAT.Text.Trim());
            oteklif.ADET         = short.Parse(txtADET.Text.Trim());
            oteklif.TOPLAMFIYAT  = decimal.Parse(txtBIRIMFIYAT.Text.Trim()) * short.Parse(txtADET.Text.Trim());//decimal.Parse(txtTOPLAMFIYAT.Text.Trim());
            oteklif.TAHKALSURESI = raddtTahKalZamani.SelectedDate;
            oteklif.NOTLAR       = txtNOTLAR.Text.Trim();
            oteklif.ILGILI       = txtILGILI.Text.Trim();
            oteklif.ILGI         = txtILGI.Text.Trim();
            oteklif.ILGLAB       = txtILGLAB.Text.Trim();
            oteklif.ONAYLANDI    = chkONAY.Checked;
            oteklif.TEKLIFSIRASI = short.Parse(txtTEKLIFSIRASI.Text.Trim());
            oteklif.BASILDI      = chkBASILDI.Checked;
            oteklif.BOLGEKODU    = short.Parse(txtBOLGEKODU.Text.Trim());
            oteklif.ISTID        = int.Parse(txtISTID.Text.Trim());
            oteklif.FATURASIRA   = int.Parse(txtFATURASIRA.Text.Trim());

            if (int.Parse(txtFATURASIRA.Text.Trim()) > 0)//Eski kayıtlardan değilse
            {
                string TamTabloAdi = chkbxlstTarife.SelectedValue;
                oteklif.CIHAZKAPSAMAYRINTITABLOSU = ed.TamTabloAdindanCihazKapsamAyrintiTablosuIdDon(TamTabloAdi);
            }
            ent.SaveChanges();
            //Guncelleme Sonucunda Indirimli Teklifler Tablosunda sadece bedel değişcektir.
            // Bu durumu gozonunde bulundurarak Indirimli Teklifler Tablosunda sadece bedeli yeni duruma gore guncellememiz gerekiyor
            IndirimliTekliflertablosunuGuncelle(Id, txtTEKLIFNO.Text.Trim(), oteklif.TOPLAMFIYAT.Value, (int)oteklif.BOLGEKODU);
        }
    }
Example #38
0
    protected void RadComboBoxFirma_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        EFDal  ed        = new EFDal();
        int    BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
        int    FirmaId   = int.Parse(RadComboBoxFirma.SelectedValue);
        string FirmaAdi  = ed.FirmaIddenFirmaAdiDon(FirmaId);

        txtFIRMA.Text               = FirmaAdi;
        txtFirmaId.Text             = FirmaId.ToString();
        txtFAX.Text                 = ed.FirmaIddenFaxNodon(FirmaId);
        txtMUSTNO.Text              = ed.FirmaIddenMustNoDon(FirmaId).ToString();
        raddtTEKLIFTAR.SelectedDate = DateTime.Today;
        txtILGILI.Text              = ed.FirmaIddenIlgiliDon(FirmaId);
        txtISTID.Text               = "0";
        txtYIL.Text                 = DateTime.Now.Year.ToString();
        RadComboBoxFirma.Visible    = false;
        txtFIRMA.Visible            = true;

        using (Service1Client client = new Service1Client())
        {
            if (client.FirmaninBugunIcinIndirimiVarmi(FirmaId))
            {
                lblIndirim.Text       = client.FirmaninBugunIcinIndirimBilgisiniDon(FirmaId);
                RadNotification1.Text = " <font color='red'>" + FirmaAdi + " isimli firmanın güncel protokolü saptandı! Hazırlanan teklif indirim içerecektir!</font>";;
                RadNotification1.Show();
            }
        }


        if (Session["TeklifNoKutusuBosOlmadigiIcinAktarilanTeklifNo"] != null)
        {
            txtTEKLIFNO.Text = Session["TeklifNoKutusuBosOlmadigiIcinAktarilanTeklifNo"].ToString();
            string[] arr = txtTEKLIFNO.Text.Trim().Split('-');
            txtTEKLIFSIRASI.Text = arr[1].ToString();
            txtTEKLIFNO.ToolTip  = "Yeni teklif bilgisi butonuna bastığınızda Teklif No kutucuğu boş olmadığı için otomatik olarak bu Teklif Numarası yazıldı...";
        }
        else
        {
            txtTEKLIFNO.ToolTip = "Yeni teklif bilgisi butonuna bastığınızda Teklif No kutucuğu boş olduğu için sıradaki teklif numarası olarak bu verildi...";
            txtTEKLIFNO.Text    = ed.kal_teklifTeklifSirasiAl(BolgeKodu);
            string[] arr = txtTEKLIFNO.Text.Trim().Split('-');
            txtTEKLIFSIRASI.Text = arr[1].ToString();
        }
    }
Example #39
0
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager manager = RadAjaxManager.GetCurrent(this.Page);

        manager.AjaxSettings.AddAjaxSetting(manager, grdTeklifler, RadAjaxLoadingPanel1);
        manager.AjaxSettings.AddAjaxSetting(manager, lblKayitSayisi, RadAjaxLoadingPanel1);
        manager.AjaxSettings.AddAjaxSetting(manager, txtTeklifNo, RadAjaxLoadingPanel1);
        manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManager1_AjaxRequest);
        //if (!IsPostBack)
        //{

        //}
        if (txtTeklifNo.Text.Trim() != "")
        {
            Session["TeklifNoKutusuBosOlmadigiIcinAktarilanTeklifNo"] = txtTeklifNo.Text.Trim();
        }
        else
        {
            Session["TeklifNoKutusuBosOlmadigiIcinAktarilanTeklifNo"] = null;
        }
        if (IsPostBack)
        {
            lnkYeniTeklifEkle.Attributes.Clear();
            lnkYeniTeklifEkle.Attributes["href"]    = "#";
            lnkYeniTeklifEkle.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", 0, 0);

            lnkTeklifiYazdir.Attributes.Clear();
            lnkTeklifiYazdir.Attributes["href"] = "#";
            using (Service1Client client = new Service1Client())
            {
                EFDal ed        = new EFDal();
                int   BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
                if (client.TeklifNoIndirimlimi(txtTeklifNo.Text.Trim(), BolgeKodu))
                {
                    lnkTeklifiYazdir.Attributes["onclick"] = String.Format("return ShowIndirimliTeklifYazdirForm('{0}','{1}');", txtTeklifNo.Text.Trim(), 0);
                    lblIndirimOrani.Text = "Bu teklif indirim uygulanmış bir tekliftir!";
                }
                else
                {
                    lnkTeklifiYazdir.Attributes["onclick"] = String.Format("return ShowTeklifYazdirForm('{0}','{1}');", txtTeklifNo.Text.Trim(), 0);
                }
            }
        }
    }
Example #40
0
    protected void RaporuOlustur()
    {
        //Create new CultureInfo
        var cultureInfo = new System.Globalization.CultureInfo("tr-TR");

        // Set the language for static text (i.e. column headings, titles)
        System.Threading.Thread.CurrentThread.CurrentUICulture = cultureInfo;

        // Set the language for dynamic text (i.e. date, time, money)
        System.Threading.Thread.CurrentThread.CurrentCulture = cultureInfo;



        EFDal ed = new EFDal();
        var   instanceReportSource = new Telerik.Reporting.InstanceReportSource();

        //instanceReportSource.ReportDocument = new KalibrasyonReportLibrary.Egitimler();
        instanceReportSource.ReportDocument = new KalibrasyonRaporlari.Egitimler();



        this.rptEgitimler.ReportSource = instanceReportSource;
        Telerik.Reporting.Report report = (Telerik.Reporting.Report)instanceReportSource.ReportDocument;


        /*
         * report.ReportParameters["BolgeKodu"].Value = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
         * report.ReportParameters["BasTar"].Value = DateTime.Parse("2015-01-01");
         * report.ReportParameters["BitTar"].Value = DateTime.Parse("2015-06-01");
         */

        report.ReportParameters["BolgeKodu"].Value = Convert.ToInt32(Session["dshBolgeKodu"].ToString());//ed.kal_BolgeKoduDon(Context.User.Identity.Name);
        report.ReportParameters["BasTar"].Value    = DateTime.Parse(Session["dshBasTar"].ToString());
        report.ReportParameters["BitTar"].Value    = DateTime.Parse(Session["dshSonTar"].ToString());
        //report.ReportParameters["SeciliDonemGetirisi"].Value = ed.EgitimRaporuIcinSeciliDonemGetirisiDon(Convert.ToInt32(Session["dshBolgeKodu"].ToString()), DateTime.Parse(Session["dshBasTar"].ToString()), DateTime.Parse(Session["dshSonTar"].ToString()));
        report.ReportParameters["SeciliDonemGetirisi"].Value = ed.EgitimRaporuIcinSeciliDonemGetirisiDon(Convert.ToInt32(report.ReportParameters["BolgeKodu"].Value), DateTime.Parse(report.ReportParameters["BasTar"].Value.ToString()), DateTime.Parse(report.ReportParameters["BitTar"].Value.ToString()));


        //report.ReportParameters["Personel"].Value = Context.User.Identity.Name;

        Telerik.Reporting.TextBox txtAciklama = report.Items.Find("txtAciklama", true)[0] as Telerik.Reporting.TextBox;
        txtAciklama.Value = report.ReportParameters["BasTar"].Value.ToString().Replace(" 00:00:00", "") + " ve " + report.ReportParameters["BitTar"].Value.ToString().Replace(" 00:00:00", "") +
                            " tarihleri arasında bölgelere ait özet eğitim bilgisini aşağıda görebilirsiniz";
    }
Example #41
0
    protected void grdFirmaninImzaliBelgelerir_ItemDataBound(object sender, GridItemEventArgs e)
    {
        EFDal ed = new EFDal();

        if (e.Item is GridDataItem)
        {
            GridDataItem dataItem = e.Item as GridDataItem;
            //dataItem["Imzalayanlar"].Text = "İptal";
            //dataItem["Imzalayanlar"].Text = ed.ImzaliDosyalarIddenPathDon(Convert.ToInt32(dataItem["Id"].Text));
            string dosyaYolu = ed.ImzaliDosyalarIddenPathDon(Convert.ToInt32(dataItem["Id"].Text));
            dataItem["Imzalayanlar"].Text = ed.SignersInfo(dosyaYolu);
            if (dataItem["Imzalayanlar"].Text != "")
            {
                dataItem["Imzalayanlar"].ForeColor = System.Drawing.Color.Red;
                //dataItem["Imzalayanlar"].BackColor = System.Drawing.Color.Red;
                //dataItem["Imzalayanlar"].ToolTip = "İptal edilmiş kayıt";
            }
        }
    }
Example #42
0
        private void btnInsert_Click(object sender, EventArgs e)
        {
            //take user input for insert
            var record = new tbl_employee
            {
                Ecode  = int.Parse(txtEcode.Text),
                Ename  = txtEname.Text,
                salary = int.Parse(txtSalary.Text),
                deptid = int.Parse(txtDeptid.Text)
            };
            //insert using dal
            var dal = new EFDal();

            dal.AddEmployee(record);
            MessageBox.Show("record inserted");

            //referesh the data
            dgv.DataSource = dal.GetAllEmps();
        }
Example #43
0
    protected void rdgvEgitim_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        EFDal ed = new EFDal();

        if (e.Item is GridDataItem)
        {
            GridDataItem dataItem = e.Item as GridDataItem;
            int          key      = int.Parse(dataItem["FirmaId"].Text);
            dataItem["FirmaAdi1"].Text = ed.FirmaIddenFirmaAdiDon(key);

            /*
             * if (dataItem["FirmaAdi"].Text == "İptal")
             * {
             *  //dataItem.Cells[3].ForeColor = System.Drawing.Color.Red;
             *  dataItem.BackColor = System.Drawing.Color.Red;
             *  dataItem.ToolTip = "İptal edilmiş kayıt";
             * }*/
        }
    }
Example #44
0
    protected void grdIstIdninImzaileIlgiliBelgeleri_OnItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == "DokumaniGoster2")
        {
            dvRT2.Controls.Clear();
            EFDal        ed                    = new EFDal();
            GridDataItem dataItem              = (GridDataItem)e.Item;
            int          key                   = int.Parse(dataItem.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["Id"].ToString());
            string       dosyaYolu             = ed.ImzaliDosyalarIddenPathDon(key);
            int          dosyaYoluLength       = dosyaYolu.Length;
            int          DosyaSistemininKonumu = dosyaYolu.IndexOf("DosyaSistemi");
            dosyaYolu = dosyaYolu.Substring(DosyaSistemininKonumu, dosyaYoluLength - DosyaSistemininKonumu);


            dosyaYolu = "../../" + dosyaYolu.Replace("\\", "/");
            string innerHTML = "<iframe src='" + dosyaYolu + "' width='100%' height='600px' ></iframe>";
            dvRT2.InnerHtml = innerHTML;
        }
    }
Example #45
0
        public ActionResult DisplayAllEmps()
        {
            EFDal dal    = new EFDal();
            var   emplst = dal.GetAllEmps()
                           .Select(o => new Employee
            {
                Ecode  = o.Ecode,
                Ename  = o.Ename,
                salary = (int)o.salary,
                deptid = (int)o.deptid
            });

            if (emplst.Count() == 0)
            {
                ViewData["msg"] = "no records";
            }

            return(View(emplst));
        }
Example #46
0
    protected int SiradakiMustNoDon()
    {
        EFDal ed                      = new EFDal();
        int   BolgeKodu               = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
        int   SiradakiMustNo          = 0;
        SqlConnectionStringBuilder sb = new SqlConnectionStringBuilder();

        sb.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["KalData"].ToString();
        SqlConnection conn    = new SqlConnection(sb.ToString());
        SqlCommand    command = new SqlCommand("kal_MustNoAl", conn);

        command.CommandType = CommandType.StoredProcedure;
        command.Parameters.Add("@BolgeKodu", SqlDbType.Int).Value = BolgeKodu;
        SqlDataAdapter adapter = new SqlDataAdapter(command);
        DataSet        ds      = new DataSet();

        adapter.Fill(ds);
        SiradakiMustNo = int.Parse(ds.Tables[0].Rows[0]["SiradakiMustNo"].ToString());
        return(SiradakiMustNo);
    }
    protected void Ekle()
    {
        EFDal ed = new EFDal();

        using (sfKalDataEntities ent = new sfKalDataEntities())
        {
            refkalibrasyon orefkalibrasyon = new refkalibrasyon();
            orefkalibrasyon.BAKKARTNO       = txtBAKKARTNO.Text.Trim();
            orefkalibrasyon.KALTAR          = raddtKALTAR.SelectedDate.Value;
            orefkalibrasyon.GELKALTAR       = raddtGELKALTAR.SelectedDate.Value;
            orefkalibrasyon.KALYERI         = txtKALYERI.Text.Trim();
            orefkalibrasyon.SERTNO          = txtSERTNO.Text.Trim();
            orefkalibrasyon.OLCBELIRSIZLIGI = txtOLCBELIRSIZLIGI.Text.Trim();
            orefkalibrasyon.UYARI           = txtUYARI.Text.Trim();
            orefkalibrasyon.KALPER          = int.Parse(txtKALPER.Text.Trim());
            orefkalibrasyon.BOLGEKODU       = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
            ent.AddTorefkalibrasyon(orefkalibrasyon);
            ent.SaveChanges();
        }
    }
Example #48
0
    protected void FirmaninAltFirmalariniYaz(int FirmaId)
    {
        string ChildFirmaIdleri = "";
        EFDal  ed = new EFDal();

        if (ed.FirmayaAitChildFirmaVarmi(FirmaId))
        {
            lblAltFirmalar.Text    = "<b>Firma altında kayıtlı bulunan diğer firmalar </b><br/>";
            lblAltFirmalar.ToolTip = "Bu fonksiyon, vergi numaraları aynı olup da, alt firma olarak tanımlanan firmanın, bir diğerinin şubesi olduğu durumlar için tanımlanmıştır. Böylece bir firma altına, o firmanın şubeleri alt firma olarak kaydedilebilecektir.";
            ChildFirmaIdleri       = ed.FirmayaAitChildFirmaListesiniDon(FirmaId).Remove(0, 1);
            string[] ChildFirmaIds = ChildFirmaIdleri.Split(',');
            foreach (string word in ChildFirmaIds)
            {
                //<a href="IstektenAra.aspx">İstek</a>
                //Firma.aspx?Mode=S&FirmaId=1664
                //lblAltFirmalar.Text =lblAltFirmalar.Text+ dc.FirmaIddenFirmaAdiDon(int.Parse(word))+"<br/>";
                lblAltFirmalar.Text = lblAltFirmalar.Text + "<a href='Firma.aspx?Mode=S&FirmaId=" + word + "'>" + ed.FirmaIddenFirmaAdiDon(int.Parse(word)) + "</a>" + "<br/>";
            }
        }
    }
Example #49
0
    protected void lnkFirmaUzerineYeniCihazEkle_Click(object sender, EventArgs e)
    {
        EFDal ed = new EFDal();
        int   CihazEklenecekFirmaId = int.Parse(Session["IstekleriGosterilecekFirmaId"].ToString());

        if (ed.CihazEklencekFirmaninGecerliEmailAdresiVarmi(CihazEklenecekFirmaId))//evet gecerli bir e-mail adresi var
        {
            Session["UzerineKayitYapilacakFirmaAdi"] = lblFirmaAdi.Text;
            rwDialog.Width             = 700;
            rwDialog.Height            = 500;
            rwDialog.Modal             = true;
            rwDialog.VisibleOnPageLoad = true;
            rwDialog.Title             = "Yeni istek bilgisi ekleniyor";
            rwDialog.NavigateUrl       = "~/UserControls/Pages/Istek.aspx?IstId=0";//Id=0 demek yeni istek eklenmek üzere açılıyor demek
        }
        else//hayır gecerli bir e-mail adresi yok
        {
            Response.Redirect("Firma.aspx?err=Email&Mode=S&FirmaId=" + CihazEklenecekFirmaId.ToString());
        }
    }
Example #50
0
 public ActionResult AddEmp(Employee emp)
 {
     if (ModelState.IsValid)
     {
         EFDal dal = new EFDal();
         dal.AddEmployee(new tbl_employee
         {
             Ecode  = emp.Ecode,
             Ename  = emp.Ename,
             salary = emp.salary,
             deptid = emp.deptid
         });
         //return View();//to return in same page
         return(RedirectToAction("DisplayAllEmps"));
     }
     else
     {
         return(View());
     }
 }
Example #51
0
    protected bool FaturaIcindeHaliazirdaUygulanmisIndirimVarmi()
    {
        bool Sonuc = false;

        using (Service1Client client = new Service1Client())
        {
            EFDal  ed        = new EFDal();
            int    BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
            string VirgulleAyrilmiIstIdler = client.OnaylananFaturaNoIcerigiIstIdleriniDon((short)BolgeKodu, lblFaturaNo.Text);

            DataSet ds = new DataSet();

            ds = client.Sorgula("select count(*) as Sayac from IndirimliIstekler where IstId in (" + VirgulleAyrilmiIstIdler + ")");
            if (int.Parse(ds.Tables[0].Rows[0]["Sayac"].ToString()) > 0)
            {
                Sonuc = true;
            }
        }
        return(Sonuc);
    }
Example #52
0
    protected void BugunGitmesiGerekenTumMailleriGonder()
    {
        EFDal   ed = new EFDal();
        DataSet ds = new DataSet();

        ds = ed.kal_335gunOnceYapilanKalibrasyonlar();
        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            int      FirmaId   = int.Parse(ds.Tables[0].Rows[i]["FIRMAID"].ToString());
            DateTime KalBitTar = DateTime.Parse(ds.Tables[0].Rows[i]["KALBITTAR"].ToString());
            try
            {
                MailGonder(FirmaId, KalBitTar);
                ed.FirmaIdKalBitTarlilarinMailUyariAlanlariniGuncelle(FirmaId, KalBitTar);
            }
            catch
            {
            }
        }
    }
Example #53
0
 protected void DisPersonelDoldur(int Id)
 {
     try
     {
         EFDal       ed           = new EFDal();
         DisPersonel oDisPersonel = ed.DisPersonelDon(Id);
         lblDisPersonelId.Text = oDisPersonel.Id.ToString();
         UIdTextBox.Text       = oDisPersonel.UId.ToString();
         AdSoyadTextBox.Text   = oDisPersonel.AdSoyad;
         FaaliyetDropDownList.SelectedValue  = oDisPersonel.Faaliyet;
         BolgeKoduDropDownList.SelectedValue = oDisPersonel.BolgeKodu.ToString();
         SilindiCheckBox.Checked             = oDisPersonel.Silindi;
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
     }
 }
Example #54
0
    protected void Doldur(int Id)
    {
        EFDal ed = new EFDal();

        using (sfKalDataEntities ent = new sfKalDataEntities())
        {
            var oEgitim = (from c in ent.Egitim where c.Id == Id select c).First();
            txtFirmaAdi.Text          = ed.FirmaIddenFirmaAdiDon(oEgitim.FirmaId);
            _FirmaId.Text             = oEgitim.FirmaId.ToString();
            _Egitimci.Text            = oEgitim.Egitimci;
            _EgitimiAlan.Text         = oEgitim.EgitimiAlan;
            clnEgitimTar.SelectedDate = oEgitim.EgitimTarihi;
            _EgitiminKonusu.Text      = oEgitim.EgitiminKonusu;
            _SertifikaNo.Text         = oEgitim.SertifikaNo;
            _EgitimYeri.Text          = oEgitim.EgitimYeri;
            txtBolgeKodu.Text         = ed.kal_BolgeKoduDon(Context.User.Identity.Name).ToString();
            _EgitimBedeli.Text        = oEgitim.EgitimBedeli.ToString();
            _EgitimGunSayisi.Text     = oEgitim.EgitimGunSayisi.ToString();
            lblEgitimIdTut.Text       = Id.ToString();
        }
    }
Example #55
0
    protected bool PaketKapsaminaAlinamayacakCihazVarmi()
    {
        EFDal   ed              = new EFDal();
        bool    Sonuc           = false;
        string  SQL             = "select max(PaketNo) as SiradakiPaketNo from PaketNumaralari";
        DataSet ds              = ed.Sorgula(SQL);
        int     SiradakiPaketNo = int.Parse(ds.Tables[0].Rows[0]["SiradakiPaketNo"].ToString()) + 1;

        ds.Dispose();
        string[] strings = Session["PaketKapsaminaAlinacakIDListesi"].ToString().Split(',');
        int[]    ints    = new int[strings.Length];
        for (int i = 0; i < strings.Length; i++)
        {
            ints[i] = int.Parse(strings[i]); // Provide some protection here
            if (!PaketKapsaminaAlinabilirlikKontrol(ints[i]))
            {
                Sonuc = true;
            }
        }
        return(Sonuc);
    }
Example #56
0
    protected void grdFirmaninImzaliBelgeleri_ItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == "DokumaniGoster")
        {
            EFDal        ed                    = new EFDal();
            GridDataItem dataItem              = (GridDataItem)e.Item;
            int          key                   = int.Parse(dataItem.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["Id"].ToString());
            string       dosyaYolu             = ed.ImzaliDosyalarIddenPathDon(key);
            int          dosyaYoluLength       = dosyaYolu.Length;
            int          DosyaSistemininKonumu = dosyaYolu.IndexOf("DosyaSistemi");
            dosyaYolu = dosyaYolu.Substring(DosyaSistemininKonumu, dosyaYoluLength - DosyaSistemininKonumu);

            //D:\\Projects\\Kalibrasyon\\sfKalibrasyon\\DosyaSistemi\\1\\2015\\bd9d3a0b-270f-460d-b374-2b3cf3e3d892.pdf
            //dvRT.InnerHtml="<iframe src='../../DosyaSistemi/1/2015/bd9d3a0b-270f-460d-b374-2b3cf3e3d892.pdf' width='800px' height='600px' ></iframe>";
            //DosyaSistemi\\1\\2015\\bd9d3a0b-270f-460d-b374-2b3cf3e3d892.pdf
            dosyaYolu = "../../" + dosyaYolu.Replace("\\", "/");
            string innerHTML = "<iframe src='" + dosyaYolu + "' width='100%' height='600px' ></iframe>";
            //dvRT.InnerHtml="<iframe src='../../DosyaSistemi/1/2015/bd9d3a0b-270f-460d-b374-2b3cf3e3d892.pdf' width='800px' height='600px' ></iframe>";
            dvRT.InnerHtml = innerHTML;
        }
    }
Example #57
0
    protected void GetiriBazliEgitimAnalizYap()
    {
        if ((this.Parent.FindControl("clnBaslangicTarihi") as RadDatePicker).SelectedDate != null &&
            (this.Parent.FindControl("clnBitisTarihi") as RadDatePicker).SelectedDate != null)
        {
            DateTime Bastar = (this.Parent.FindControl("clnBaslangicTarihi") as RadDatePicker).SelectedDate.Value;
            DateTime Bittar = (this.Parent.FindControl("clnBitisTarihi") as RadDatePicker).SelectedDate.Value;

            decimal DataCount = 0;
            BolgeKodu = BolgeKoduBelirle();

            /*
             * using (Service1Client proxy = new Service1Client())
             * {
             *  List<kal_sfEgitimPersonelBazliGetiri_Result> Sonuc =
             *      proxy.kal_sfEgitimPersonelBazliGetiri_ResultDon((short) BolgeKodu, Bastar, Bittar).ToList();
             *  gvEgitimGetiriBazliAnaliz.DataSource = Sonuc;
             *  gvEgitimGetiriBazliAnaliz.DataBind();
             *  //DataCount = Sonuc.Count;
             *  foreach (var result in Sonuc)
             *  {
             *      DataCount = DataCount + Convert.ToDecimal(result.Getiri.Value);
             *  }
             *  lblToplamEgitimGetiri.Text = "Toplam eğitim getirisi=" + DataCount.ToString() + " TL";
             * }
             * */
            EFDal ed = new EFDal();
            //gvEgitimGetiriBazliAnaliz.DataSource = ed.kal_EgitimGetiriAnaliz(BolgeKodu, Bastar, Bittar);
            gvEgitimGetiriBazliAnaliz.DataSource = ed.kal_EgitimDonemiPersonelAnalizi(BolgeKodu, Bastar, Bittar);
            gvEgitimGetiriBazliAnaliz.DataBind();

            //lblToplamEgitimGetiri.Text = "Toplam eğitim getirisi=" + ed.kal_EgitimDonemGetirisi(BolgeKodu, Bastar, Bittar).Tables[0].Rows[0]["DonemGetirisi"].ToString() + " TL";
            lblToplamEgitimGetiri.Text    = "Toplam eğitim getirisi=" + ed.ParaFormatinaCevir(ed.kal_EgitimDonemiPersonelAnalizi(BolgeKodu, Bastar, Bittar).Tables[1].Rows[0]["DonemGetirisi"].ToString());
            lblEgitimToplamGunSayisi.Text = "Toplam eğitim gun sayısı=" + ed.kal_EgitimDonemiPersonelAnalizi(BolgeKodu, Bastar, Bittar).Tables[2].Rows[0]["DonemEgitimGunSayisi"].ToString();
        }
        else
        {
            lblUyari.Text = "Lütfen tarih aralığı seçiniz...";
        }
    }
Example #58
0
    protected void lnkCihazTeslimRaporu_Click(object sender, EventArgs e)
    {
        EFDal ed = new EFDal();
        int   CihazEklenecekFirmaId = int.Parse(Session["IstekleriGosterilecekFirmaId"].ToString());

        if (ed.CihazEklencekFirmaninGecerliEmailAdresiVarmi(CihazEklenecekFirmaId) && ed.DahaOnceYetkilendirmeYapilmismi(CihazEklenecekFirmaId))//evet gecerli bir email adresi var
        {
            bool   AyniIstekNodanOlmayanKayitvarmi = false;
            int    ItemCount = rdgvFairmadanGelenIstekler.Items.Count;
            string IstekNo   = rdgvFairmadanGelenIstekler.Items[0].Cells[4].Text;
            string Yil       = rdgvFairmadanGelenIstekler.Items[0].Cells[3].Text;
            for (int i = 0; i < ItemCount; i++)
            {
                if (IstekNo != rdgvFairmadanGelenIstekler.Items[i].Cells[4].Text)
                {
                    AyniIstekNodanOlmayanKayitvarmi = true;
                }
            }

            if (AyniIstekNodanOlmayanKayitvarmi)
            {
                //lblBuyukFirmaAdi.Text = "Olmadı";
                WebMessageBox1.Visible = true;
                WebMessageBox1.Show("Yukarıdaki tablo üzerinde istek numaraları farklı olan öğeler bulunmaktadır. Buradan cihaz kabul formu oluşturmak istiyorsanız, tabloyu tek istek numarası kalacak biçimde filtreleyiniz önce..", "error");
            }
            else
            {
                rwDialog.Width             = 700;
                rwDialog.Height            = 500;
                rwDialog.Modal             = true;
                rwDialog.VisibleOnPageLoad = true;
                rwDialog.Title             = "Cihaz kabul formu";
                rwDialog.NavigateUrl       = "~/UserControls/Pages/Rapor.aspx?RaporAdi=CihazKayit&Fmt=PDF&IstekNo=" + IstekNo + "&Yil=" + Yil + "&FirmaId=" + Session["IstekleriGosterilecekFirmaId"].ToString();
            }
        }
        else //hayır gecerli bir e-mail adresi yok, gecerli bir email adresi girilmesi için yönlendir
        {
            Response.Redirect("Firma.aspx?err=Email&Mode=S&FirmaId=" + CihazEklenecekFirmaId.ToString());
        }
    }
Example #59
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            lblVirgulleAyrilmisIstIdlerGorunmez.Text = Session["VirgulleAyrilmisIstIdler"].ToString();
            lblVirgulleAyrilmisIstIdlerGorunur.Text  = "İşlenecek IstIdler:" + Session["VirgulleAyrilmisIstIdler"].ToString();
            Session["VirgulleAyrilmisIstIdler"]      = null;
            string[] IstIdler  = lblVirgulleAyrilmisIstIdlerGorunmez.Text.Split(',');
            EFDal    ed        = new EFDal();
            int      BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);
            DataSet  ds        = ed.kal_IstIddenIstekDon(int.Parse(IstIdler[0].ToString()), BolgeKodu);
            int      IstekNo   = int.Parse(ds.Tables[0].Rows[0]["ISTEKNO"].ToString());
            int      Yil       = int.Parse(ds.Tables[0].Rows[0]["YIL"].ToString());
            grdFaturaTarihceBagla(BolgeKodu, Yil, lblVirgulleAyrilmisIstIdlerGorunmez.Text);

            /*
             * foreach (var item in IstIdler)
             * {
             *  if (!KayitKilitlimi(int.Parse(item)))
             *  {
             *      using (Service1Client proxy = new Service1Client())
             *      {
             *          proxy.OnaylanmisIsteklereEkle(int.Parse(item));
             *
             *          List<kal_IstekNoIcinDahaOnceAlinmisFaturaNumarasiniDon_Result> IstekIcinDahaOnceAlinmisFaturaNo = proxy.IstekNoIcinDahaOnceAlinmisFaturaNumarasiniDon(BolgeKodu, Yil, IstekNo).ToList();
             *          if (IstekIcinDahaOnceAlinmisFaturaNo.First().FATURANO.Length > 3)//Evet birisi daha once bu istek no için bir fatno almış
             *          {
             *              proxy.IstIdliFaturaOnyaziKaydinaFaturaNoAta(int.Parse(item), IstekIcinDahaOnceAlinmisFaturaNo.First().FATURANO);
             *          }
             *          else//Eger istek için daha önce bir fatno alınmadıysa şimdi bir fatno al
             *          {
             *              string KullanilacakFaturaNo = DateTime.Now.ToString("dd/MM/yy").Replace(".", "") + "-" + ed.kal_FaturaOnYaziIcinSiradakiGunlukSiraNoDon(BolgeKodu).ToString();
             *              proxy.IstIdliFaturaOnyaziKaydinaFaturaNoAta(int.Parse(item), KullanilacakFaturaNo);
             *          }
             *      }
             *  }
             * }*/
        }
        lblUyari.Text = "";
    }
Example #60
0
    protected void grdOnayAlmamisFaturaIcerigi_ItemDataBound(object sender, GridItemEventArgs e)
    {
        EFDal ed        = new EFDal();
        int   BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);

        if (e.Item is GridDataItem)
        {
            Label lbl = e.Item.FindControl("numberLabel") as Label;
            lbl.Text = (e.Item.ItemIndex + 1).ToString();
            GridDataItem dataItem = e.Item as GridDataItem;
            int          IstId    = int.Parse(dataItem["ISTID"].Text);
            using (Service1Client proxy = new Service1Client())
            {
                dataItem["CihazAdi"].Text = proxy.kal_IstIddenIstekDon(IstId, BolgeKodu).Tables[0].Rows[0]["CIHAZADI"].ToString();
                dataItem["Sorumlu"].Text  = proxy.kal_IstIddenIstekDon(IstId, BolgeKodu).Tables[0].Rows[0]["SORUMLU"].ToString();
                //Bu istek kaydı faturaonyazi tablosuna işlenmişmi
                int FaturaOnyaziTablosundaBuIstekNoyaSahipSatirSayisi = proxy.IstekKaydininFaturaBilgisiVarmi(IstId).ToList().Count;
                if (FaturaOnyaziTablosundaBuIstekNoyaSahipSatirSayisi > 0)//Evet faturaonyazi tablosuna işlenmiş
                {
                    //e.Item.BackColor = System.Drawing.Color.Green;
                    e.Item.ToolTip = "Faturalandırılmaya hazır";
                }
                else//Hayır faturaonyazi tablosuna işlenmemiş
                {
                    //e.Item.BackColor = System.Drawing.Color.Green;
                    e.Item.ToolTip = "Faturalandırılmaya hazır DEĞİL!";
                }
            }
            if (dataItem["EkBolgemi"].Text == "False")
            {
                dataItem["EkBolgemi"].Text = "<font color='white'>Hayır</font>";
                e.Item.BackColor           = System.Drawing.Color.Red;
            }
            else
            {
                dataItem["EkBolgemi"].Text = "<font color='white'>Evet</font>";
                e.Item.BackColor           = System.Drawing.Color.Pink;
            }
        }
    }