private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (!ValuesAreEqual(e.RowHandle))
     {
         e.Appearance.BackColor = Color.Red;
     }
 }
Exemplo n.º 2
0
        private void dgv_Main_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View = sender as GridView;

            if (View.RowCount > 0)
            {
                if (e.RowHandle >= 0)
                {
                    string category = View.GetRowCellDisplayText(e.RowHandle, View.Columns["RowStyle"]);
                    switch (category)
                    {
                    //0 đã thanh toán - green / 1 : chưa đến hạn -yellow / 2 đã trễ hạn red
                    case "0":
                        e.Appearance.BackColor = Color.LightGreen;
                        // e.Appearance.BackColor2 = Color.White;
                        break;

                    case "1":
                        e.Appearance.BackColor = Color.Gold;
                        // e.Appearance.BackColor2 = Color.White;
                        break;

                    default:
                        e.Appearance.BackColor = Color.OrangeRed;
                        //  e.Appearance.BackColor2 = Color.White;
                        break;
                    }
                }
            }
        }
Exemplo n.º 3
0
        void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View = sender as GridView;

            if (e.RowHandle >= 0)
            {
                int deliver = Static.ToInt(View.GetRowCellDisplayText(e.RowHandle, View.Columns["DELIVERUSERSTATE"]));
                int receive = Static.ToInt(View.GetRowCellDisplayText(e.RowHandle, View.Columns["RECEIVEUSERSTATE"]));
                switch (deliver)
                {
                case 1: e.Appearance.BackColor = Color.DeepSkyBlue; break;

                case 2: e.Appearance.BackColor = Color.DarkOrange; break;

                case 3: e.Appearance.BackColor = Color.LimeGreen; break;

                case 4: e.Appearance.BackColor = Color.HotPink; break;
                }
                switch (receive)
                {
                case 1: e.Appearance.BackColor2 = Color.DeepSkyBlue; break;

                case 2: e.Appearance.BackColor2 = Color.DarkOrange; break;

                case 3: e.Appearance.BackColor2 = Color.LimeGreen; break;

                case 4: e.Appearance.BackColor2 = Color.HotPink; break;
                }
            }
        }
        private void grd_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView view = sender as GridView;

            if (e.RowHandle >= 0)
            {
                int state = view.GetRowCellValue(e.RowHandle, colStateDelivery).ToInt();
                switch (state)
                {
                case 0:
                    //e.Appearance.BackColor = Color.GreenYellow;

                    break;

                case 1:
                    e.Appearance.BackColor = Color.Cyan;
                    e.Appearance.ForeColor = Color.Black;
                    e.HighPriority         = true;
                    break;

                case 2:
                    e.Appearance.BackColor = Color.DeepPink;
                    e.Appearance.ForeColor = Color.Black;
                    e.HighPriority         = true;
                    break;
                }
            }
        }
 private void GVCapMa_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     //GridView view = sender as GridView;
     //var rowHandle = e.RowHandle;
     //if (rowHandle >= 0)
     //{
     //    try
     //    {
     //        var maDonvi = view.GetRowCellValue(rowHandle, this.col_MaDonVi);
     //        int sLuong = view.GetRowCellValue(rowHandle, this.col_SoLuong) == null ? 1 : int.Parse(view.GetRowCellValue(rowHandle, this.col_SoLuong).ToString());
     //        var GtriBatDau = view.GetRowCellValue(rowHandle, this.col_MaBatDau) == null ? string.Empty : view.GetRowCellValue(rowHandle, this.col_MaBatDau).ToString();
     //        var GtriKetThuc = view.GetRowCellValue(rowHandle, this.col_MaKetThuc) == null ? string.Empty : view.GetRowCellValue(rowHandle, this.col_MaKetThuc).ToString();
     //        if (string.IsNullOrEmpty(GtriKetThuc))
     //        {
     //            if (rowHandle == 0)
     //            {
     //                int GtriKT = int.Parse(GtriBatDau) + sLuong - 1;
     //                view.SetRowCellValue(rowHandle, this.col_MaKetThuc, GtriKT);
     //            }
     //            else
     //            {
     //                int GTKTTruoc = view.GetRowCellValue(rowHandle - 1, this.col_MaKetThuc) == null ? 1 : int.Parse(view.GetRowCellValue(rowHandle - 1, this.col_MaKetThuc).ToString());
     //               // view.SetRowCellValue(rowHandle, this.col_MaBatDau, GTKTTruoc + 1);
     //            }
     //        }
     //    }
     //    catch { }
     //}
 }
Exemplo n.º 6
0
 private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     try
     {
         GridView View = sender as GridView;
         if (e.RowHandle >= 0)
         {
             if ((View.GetRowCellValue(e.RowHandle, View.Columns["status_delo"])) != DBNull.Value)
             {
                 if ((int)(View.GetRowCellValue(e.RowHandle, View.Columns["status_delo"])) == 1)
                 {
                     e.Appearance.BackColor = Color.FromArgb(0xFF, 0x99, 0xCC);
                     e.Appearance.ForeColor = Color.Black;
                 }
                 if ((int)(View.GetRowCellValue(e.RowHandle, View.Columns["status_delo"])) == 2)
                 {
                     e.Appearance.BackColor = Color.FromArgb(0x66, 0xCC, 0x99);
                     e.Appearance.ForeColor = Color.Black;
                 }
                 if ((int)(View.GetRowCellValue(e.RowHandle, View.Columns["status_delo"])) == 3)
                 {
                     e.Appearance.BackColor = Color.FromArgb(0xFF, 0x33, 0x00);
                     e.Appearance.ForeColor = Color.Black;
                 }
             }
         }
     }
     catch { }
 }
Exemplo n.º 7
0
        private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            try
            {
                GridView View = sender as GridView;

                if (e.RowHandle >= 0)
                {
                    //object asd = View.GetRowCellValue(e.RowHandle, View.Columns["IsCorrect"]);
                    string category = View.GetRowCellDisplayText(e.RowHandle, View.Columns["IsCorrect"]);
                    if (category == "Отмечено")
                    {
                        e.Appearance.BackColor = Color.LightPink;
                        //e.HighPriority = true;
                    }
                }

                if (View.IsRowSelected(e.RowHandle))
                {
                    e.Appearance.ForeColor = Color.DarkBlue;
                    e.Appearance.BackColor = Color.LightBlue;
                    //e.HighPriority = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 8
0
        private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            try
            {
                if (txt_CODE_DC.Text == "")
                {
                    GridView View = sender as GridView;
                    if (e.RowHandle >= 0)
                    {
                        decimal pAchat = Convert.ToDecimal(View.GetRowCellValue(e.RowHandle, View.Columns["PRIX_HT_ACHAT"])) * (1 + Convert.ToDecimal(View.GetRowCellValue(e.RowHandle, View.Columns["TVA_ACHAT"])) / 100);
                        decimal pVente = Convert.ToDecimal(View.GetRowCellValue(e.RowHandle, View.Columns["PRIX_U_HT"])) * (1 - Convert.ToDecimal(View.GetRowCellValue(e.RowHandle, View.Columns["REMISE"])) / 100) * (1 + Convert.ToDecimal(View.GetRowCellValue(e.RowHandle, View.Columns["TVA"])) / 100);


                        if (pVente < pAchat)
                        {
                            e.Appearance.ForeColor = Color.Red;
                        }
                    }
                }
            }
            catch (Exception er)
            {
                MessageBox.Show(er.Message, this.Text);
            }
        }
Exemplo n.º 9
0
        void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View = sender as GridView;

            if (e.RowHandle >= 0)
            {
                string Status = View.GetRowCellDisplayText(e.RowHandle, View.Columns[35]);
                if (Status == "0")
                {
                    ucCustomerList.gridView1.Appearance.OddRow.BackColor   = Color.NavajoWhite;
                    ucCustomerList.gridView1.Appearance.OddRow.BackColor2  = Color.NavajoWhite;
                    ucCustomerList.gridView1.Appearance.EvenRow.BackColor  = Color.NavajoWhite;
                    ucCustomerList.gridView1.Appearance.EvenRow.BackColor2 = Color.NavajoWhite;
                    e.Appearance.BackColor  = Color.NavajoWhite;
                    e.Appearance.BackColor2 = Color.NavajoWhite;
                }
                if (Status == "1")
                {
                    ucCustomerList.gridView1.Appearance.OddRow.BackColor   = Color.SkyBlue;
                    ucCustomerList.gridView1.Appearance.OddRow.BackColor2  = Color.SkyBlue;
                    ucCustomerList.gridView1.Appearance.EvenRow.BackColor  = Color.SkyBlue;
                    ucCustomerList.gridView1.Appearance.EvenRow.BackColor2 = Color.SkyBlue;
                    e.Appearance.BackColor  = Color.SkyBlue;
                    e.Appearance.BackColor2 = Color.SkyBlue;
                }
            }
        }
Exemplo n.º 10
0
        private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            if (e.RowHandle > -1)
            {
                string sTag = gridView1.GetRowCellValue(e.RowHandle, TempColumnNames.Tag.ToString()).ToString();
                switch (sTag)
                {
                case "ESTP":
                case "VVK":
                case "SK 1":
                case "SK 2":
                    e.Appearance.BackColor = Color.Gainsboro;
                    break;

                case "VK(bar)":
                    e.Appearance.BackColor = Color.Lavender;
                    break;

                case "VK(ziel)":
                    e.Appearance.BackColor = Color.PaleTurquoise;
                    break;

                case "VK(liste)":
                    e.Appearance.BackColor = Color.MediumAquamarine;
                    break;

                case "VK(brutto)":
                    e.Appearance.BackColor = Color.SandyBrown;
                    break;
                }
            }
        }
Exemplo n.º 11
0
        private void gridView2_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            try
            {
                GridView View = sender as GridView;
                if (e.RowHandle >= 0)
                {
                    int    Data_ID = Convert.ToInt32(View.GetRowCellDisplayText(e.RowHandle, View.Columns[0]));
                    string value   = View.GetRowCellDisplayText(e.RowHandle, View.Columns[6]);
                    if (value != "")
                    {
                        e.Appearance.BackColor  = Color.MediumSeaGreen;
                        e.Appearance.BackColor2 = Color.MediumSeaGreen;
                        e.Appearance.ForeColor  = Color.White;
                    }

                    for (int i = 0; i < ListOfEditDataIDs.Count; i++)
                    {
                        if (Data_ID == ListOfEditDataIDs[i])
                        {
                            e.Appearance.BackColor  = Color.LightBlue;
                            e.Appearance.BackColor2 = Color.LightBlue;
                            e.Appearance.ForeColor  = Color.Black;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 12
0
 private void grdAll_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     try
     {
         GridView View = sender as GridView;
         if (e.RowHandle >= 0)
         {
             DateTime bugun     = DateTime.Parse(DateTime.Now.ToShortDateString().ToString());
             DateTime baslangic = DateTime.Parse(View.GetRowCellDisplayText(e.RowHandle, "Başlangıç Tarihi").ToString());
             DateTime bitis     = DateTime.Parse(grdAll.GetRowCellValue(e.RowHandle, "Bitiş Tarihi").ToString());
             if (bugun > baslangic)
             {
                 e.Appearance.BackColor = Color.DarkRed;
                 e.Appearance.ForeColor = Color.White;
             }
             else if (bugun < baslangic)
             {
                 e.Appearance.BackColor = Color.DarkGreen;
                 e.Appearance.ForeColor = Color.White;
             }
             if (bugun >= baslangic && bugun <= bitis)
             {
                 e.Appearance.BackColor = Color.Orange;
                 e.Appearance.ForeColor = Color.Black;
             }
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
 private void gridViewInventarioDetalle_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (e.RowHandle % 2 == 0)
     {
         e.Appearance.BackColor = Color.LightSkyBlue;
     }
 }
Exemplo n.º 14
0
        private void gridView_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            if (0 > e.RowHandle && sender.GetType() != typeof(GridView))
            {
                return;
            }

            DataRow dr = gridView.GetDataRow(e.RowHandle);

            if (null != dr && dr.Table.Columns.Contains("state_cd"))
            {
                try
                {
                    int   state_cd  = KnUtil.parseInt32(dr["state_cd"].ToString());
                    Color row_color = ObjOrder.getStateColor(state_cd);

                    // 색상 적용
                    if (row_color != Color.Empty)
                    {
                        e.Appearance.BackColor = row_color;
                    }
                }
                catch (Exception ex)
                {
                    TsLog.writeLog(ex.Message);
                }
            }
        }
Exemplo n.º 15
0
        private void gridViewProspectos_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View       = sender as GridView;
            int      Diferencia = 0;
            string   Prioridad  = "0";

            if (e.RowHandle >= 0)
            {
                DateTime FechaActualizacion = (DateTime)View.GetRowCellValue(e.RowHandle, gridColFechaActualizacion);
                DateTime FechaHoy           = (DateTime)View.GetRowCellValue(e.RowHandle, gridColFechaHoy);
                Diferencia = DateTime.Compare(FechaHoy.Date, FechaActualizacion.Date);
                ////Actualizado en la semana
                //if (Diferencia >= 0 && Diferencia <= 7)
                //{
                //    e.Appearance.BackColor = Color.GreenYellow;
                //    e.Appearance.BackColor2 = Color.SeaShell;
                //}
                ////Actualizado hace dos Semana
                //if (Diferencia > 7 && Diferencia <= 14)
                //{
                //    e.Appearance.BackColor = Color.Yellow;
                //    e.Appearance.BackColor2 = Color.SeaShell;
                //}
                ////Actualizado hace mas de dos semanas
                //if (Diferencia > 14)
                //{
                //    e.Appearance.BackColor = Color.Salmon;
                //    e.Appearance.BackColor2 = Color.SeaShell;
                //}
            }
        }
        private void gridView4_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View = sender as GridView;

            if (e.RowHandle >= 0)
            {
                string anulado = View.GetRowCellDisplayText(e.RowHandle, View.Columns["anulado"]);
                string firmado = View.GetRowCellDisplayText(e.RowHandle, View.Columns["firmado"]);

                if (firmado == "Si")
                {
                    e.Appearance.BackColor  = Color.DeepSkyBlue;
                    e.Appearance.BackColor2 = Color.Azure;
                    //e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold);
                    e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold);
                }

                if (anulado == "Si")
                {
                    e.Appearance.BackColor  = Color.Salmon;
                    e.Appearance.BackColor2 = Color.SeaShell;
                    //e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold);
                    e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Italic);
                }
            }
        }
Exemplo n.º 17
0
        private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View = sender as GridView;

            if (e.RowHandle >= 0)
            {
                string  Tran_StatusClear = View.GetRowCellDisplayText(e.RowHandle, View.Columns["Tran_StatusClear"]);
                string  Status           = View.GetRowCellDisplayText(e.RowHandle, View.Columns["Status"]);
                decimal QtyRemain        = Convert.ToDecimal(View.GetRowCellDisplayText(e.RowHandle, View.Columns["QtyRemain"]));

                //0 : โอนสำเร็จ  1 : ค้างโอน  2 : ยกเลิก
                if (Status == "1")// 1 : ค้างโอน
                {
                    e.Appearance.BackColor  = Color.FromArgb(192, 255, 192);
                    e.Appearance.BackColor2 = Color.FromArgb(192, 255, 192);
                }
                else if (Status == "2")// 2 : ยกเลิก
                {
                    e.Appearance.BackColor  = Color.FromArgb(255, 192, 192);
                    e.Appearance.BackColor2 = Color.FromArgb(255, 192, 192); //Color.SeaShell;
                }

                //if (QtyRemain > 0)//คงค้าง
                //{
                //    e.Appearance.BackColor = Color.FromArgb(192, 255, 192);
                //    e.Appearance.BackColor2 = Color.FromArgb(192, 255, 192);
                //}
                //if (Tran_StatusClear == "1")//ยกเลิก
                //{
                //    e.Appearance.BackColor = Color.FromArgb(255, 192, 192);
                //    e.Appearance.BackColor2 = Color.FromArgb(255, 192, 192); //Color.SeaShell;
                //}
            }
        }
Exemplo n.º 18
0
        private void gvFatura_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View = sender as GridView;

            if (e.RowHandle >= 0)
            {
                string category = View.GetRowCellDisplayText(e.RowHandle, View.Columns["Fatura Durumu"]);
                if (category == "Indeterminate")
                {
                    e.Appearance.BackColor  = Color.Yellow;
                    e.Appearance.BackColor2 = Color.SeaShell;
                }
                else if (category == "Checked")
                {
                    e.Appearance.BackColor  = Color.SeaShell;
                    e.Appearance.BackColor2 = Color.Aqua;
                }
                else
                {
                    e.Appearance.BackColor  = Color.Salmon;
                    e.Appearance.BackColor2 = Color.SeaShell;
                }
            }

            gvFatura.ClearSelection();
        }
Exemplo n.º 19
0
        private void gridViewEtude_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View = sender as GridView;

            if (e.RowHandle >= 0)
            {
                string validate = View.GetRowCellDisplayText(e.RowHandle, View.Columns["validate"]);
                if (validate == "0")
                {
                    e.Appearance.BackColor  = Color.Cyan;
                    e.Appearance.BackColor2 = Color.SeaShell;
                    e.HighPriority          = true;
                }
                if (validate == "1")
                {
                    e.Appearance.BackColor  = Color.GreenYellow;
                    e.Appearance.BackColor2 = Color.SeaShell;
                    e.HighPriority          = true;
                }
                if (validate == "-1")
                {
                    e.Appearance.BackColor  = Color.Gray;
                    e.Appearance.BackColor2 = Color.SeaShell;
                    e.HighPriority          = true;
                }
            }
        }
Exemplo n.º 20
0
        private void gridView2_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            if (e.RowHandle > -1)
            {
                string sTag = gridView2.GetRowCellValue(e.RowHandle, TempColumnNames.Tag.ToString()).ToString();

                //switch (sTag)
                //{
                //    case "BEK": //Bareinkaufspreis
                //    case "ESTP": //Einstandspreis
                //    case "VVK": //Verwaltungs- und Vertriebskosten
                //    case "SK 1": //Summe fix/variabel
                //    case "GA": //Gewinnaufschlag
                //    case "VK": //Deckungsbeitrag
                //    case "VK(bar)": //Barverkaufspreis
                //    case "VK(brutto)": //Bruttoverkaufspreis
                //        break;
                //}

                switch (sTag)
                {
                case "BEK":
                case "ESTP":
                case "VVK":
                case "SK 1":
                case "GA":         //Gewinnaufschlag
                case "VK":         //Deckungsbeitrag
                case "VK(bar)":    //Barverkaufspreis
                case "VK(brutto)": //Bruttoverkaufspreis
                    e.Appearance.BackColor = Color.Gainsboro;
                    break;
                }
            }
        }
Exemplo n.º 21
0
        private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View = sender as GridView;

            if (e.RowHandle >= 0)
            {
                string okunma = View.GetRowCellDisplayText(e.RowHandle, View.Columns["EvrakTuru"]);
                if (okunma.Trim() == "1-Müşteri Çeki")
                {
                    e.Appearance.BackColor = Color.GreenYellow;
                    //e.Appearance.BackColor2 = Color.Blue;
                }
                //else if (okunma.Trim() == "1")
                //{
                //    e.Appearance.BackColor = Color.Blue;
                //    // e.Appearance.BackColor2 = Color.Red;
                //}
                //else if (okunma.Trim() == "2")
                //{
                //    e.Appearance.BackColor = Color.Aqua;
                //    // e.Appearance.BackColor2 = Color.Red;
                //}
                //else if (okunma.Trim() == "3")
                //{
                //    e.Appearance.BackColor = Color.Red;
                //    // e.Appearance.BackColor2 = Color.Red;
                //}
                else
                {
                    e.Appearance.BackColor = Color.Aqua;
                }
            }
        }
Exemplo n.º 22
0
        private void GridView_SalaryProcess_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View = sender as GridView;

            if (e.RowHandle >= 0)
            {
            }
        }
 private void gvData_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (this.gridView1.FocusedRowHandle != e.RowHandle)
     {
         return;
     }
     e.Appearance.BackColor = Color.FromArgb(0x10, this.gridView1.PaintAppearance.FocusedRow.BackColor);
     e.HighPriority         = true;
 }
Exemplo n.º 24
0
 private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     //GridView view = (GridView)sender;
     //QC_Sample_Mix rowOb = view.GetRow(e.RowHandle) as QC_Sample_Mix;
     //if (rowOb != null && rowOb.WCDY)
     //{
     //    e.Appearance.BackColor = Color.Red;
     //}
 }
Exemplo n.º 25
0
        private void gdMAIN_VIEW_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView view = sender as GridView;

            if (view.FocusedRowHandle == e.RowHandle)
            {
                e.Appearance.BackColor = Color.Orange;
                e.Appearance.Font      = new Font("굴림", 12, FontStyle.Bold);
            }
        }
Exemplo n.º 26
0
 private void grvData_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     //if (e.RowHandle < 0) return;
     //GridView View = sender as GridView;
     //string code = View.GetRowCellValue(e.RowHandle, colCode).ToString();
     //if (ModulesBO.Instance.CheckExist("Code", code))
     //{
     //    e.Appearance.BackColor = Color.Yellow;
     //}
 }
Exemplo n.º 27
0
        private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView View = sender as GridView;

            if (View.FocusedRowHandle == e.RowHandle)
            {
                e.Appearance.ForeColor = Color.DarkBlue;
                e.Appearance.BackColor = Color.LightBlue;
            }
        }
Exemplo n.º 28
0
        private void gridViewAppointments_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView currentView = sender as GridView;

            if (!currentView.IsGroupRow(e.RowHandle))
            {
                ListViewAppointment currentAppointment = (sender as GridView).GetRow(e.RowHandle) as ListViewAppointment;
                e.Appearance.BackColor = currentAppointment.ListViewLabel;
            }
        }
Exemplo n.º 29
0
        private void advBandedGridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            //GridView View = sender as GridView;
            if (e.RowHandle >= 0)
            {
                int    f;
                bool?  ll1;
                string otvet;
                // var ll = advBandedGridView1.GetRowCellDisplayText(e.RowHandle, "status");
                if (advBandedGridView1.GetRowCellValue(e.RowHandle, "status") is DBNull)
                {
                    ll1 = false;
                }
                else
                {
                    ll1 = Convert.ToBoolean(advBandedGridView1.GetRowCellValue(e.RowHandle, "status"));
                }
                if (advBandedGridView1.GetRowCellValue(e.RowHandle, "stat_otveta") is DBNull)
                {
                    f = 0;
                }
                else
                {
                    f = Convert.ToInt32(advBandedGridView1.GetRowCellValue(e.RowHandle, "stat_otveta"));
                }
                if (advBandedGridView1.GetRowCellValue(e.RowHandle, "otvet") is DBNull || advBandedGridView1.GetRowCellValue(e.RowHandle, "otvet") == "")
                {
                    otvet = "";
                }
                else
                {
                    otvet = Convert.ToString(advBandedGridView1.GetRowCellValue(e.RowHandle, "otvet"));
                }

                if (f == 1 || otvet != "")
                {
                    e.Appearance.BackColor = Color.DarkTurquoise;
                    e.Appearance.ForeColor = Color.Black;
                }
                else
                {
                    if (ll1 == true)
                    {
                        e.Appearance.BackColor = Color.YellowGreen;
                        e.Appearance.ForeColor = Color.Black;
                    }
                    else

                    {
                        e.Appearance.BackColor = Color.Pink;
                        e.Appearance.ForeColor = Color.Black;
                    }
                }
            }
        }
        private void gdMAIN_VIEW_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            GridView view = sender as GridView;

            //if (((e.State & DevExpress.XtraGrid.Views.Base.GridRowCellState.Focused) != 0) && ((e.State & DevExpress.XtraGrid.Views.Base.GridRowCellState.GridFocused) != 0))
            //    e.Appearance.Assign(view.PaintAppearance.FocusedRow);
            if (view.FocusedRowHandle == e.RowHandle)
            {
                e.Appearance.BackColor = Color.Orange;
            }
        }