コード例 #1
0
 private void GridViewServisler_Click(object sender, EventArgs e)
 {
     if (GridViewServisler.GetFocusedDataRow() != null && !Focusta)
     {
         Focus_Servis();
     }
     _Focusta = false;
 }
コード例 #2
0
        void Focus_Servis()
        {
            if (Yukleme || GridViewServisler.GetFocusedDataRow() == null)
            {
                return;
            }

            GridViewServisler.OptionsSelection.EnableAppearanceFocusedRow = true;
            ucServisDetay1.Yukle_Servis(Convert.ToInt32(GridViewServisler.GetFocusedRowCellValue("ServisID")));
        }
コード例 #3
0
 private void GridViewServisler_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (e.RowHandle >= 0)
     {
         if (GridViewServisler.GetRowCellDisplayText(e.RowHandle, colTeslimTarih) == "Yok")
         {
             e.Appearance.BackColor  = Color.Salmon;
             e.Appearance.BackColor2 = Color.SeaShell;
         }
         else
         {
             e.Appearance.BackColor = Color.White;
         }
     }
 }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                GridViewAktifServisler.Visible = false;
                GridViewAktifKalemler.Visible  = false;
                GridViewServisler.Visible      = false;
                GridViewServisKalemler.Visible = false;

                Label2.Visible = false;
                Label3.Visible = false;
                try
                {
                    if (Convert.ToInt32(Session["role"]) == 2)
                    {
                        GridViewServisler.Visible      = true;
                        GridViewServisKalemler.Visible = true;
                        ///Label2.Visible = true;

                        string tc = Session["tckn"].ToString();
                        //tc = "85998623066";
                        otoservisdbEntities db = new otoservisdbEntities();

                        var query = db.musteris.ToList()
                                    .Where(x => x.tckn == tc)
                                    .Select(x => x.musteriID).Single();

                        var query2 = db.musteris.ToList()
                                     .Where(x => x.tckn == tc)
                                     .Select(x => x.adSoyad).Single();

                        Label1.Text = query2 + " kişisine ait servis kayıtları:";


                        GridViewServisler.DataSource = servisislem.getSpesificServisKayit(query);
                        GridViewServisler.DataBind();


                        if (servisid != 0)
                        {
                            GridViewServisKalemler.DataSource = servisislem.getServisKalem(Convert.ToInt32(servisid));
                            GridViewServisKalemler.DataBind();
                        }
                    }

                    else if (Convert.ToInt32(Session["role"]) == 1 ||
                             Convert.ToInt32(Session["role"]) == 3 ||
                             Convert.ToInt32(Session["role"]) == 4)
                    {
                        GridViewAktifServisler.Visible = true;
                        GridViewAktifKalemler.Visible  = true;
                        //Label3.Visible = true;

                        GridViewAktifServisler.DataSource = servisislem.getAktifServisKayit();
                        GridViewAktifServisler.DataBind();

                        Label1.Text = "aktif durumdaki servis kayıtları:";
                    }
                }
                catch (Exception ex)
                {
                    //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Bu kişi adına bir servis kaydı bulunmuyor')", true);
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "CallMyFunction", "showContentError('Bu kişi adına bir servis kaydı bulunmuyor', 'HATA');", true);
                }
            }
        }