Exemple #1
0
        void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            try
            {
                if (gridView1.IsGroupRow(e.RowHandle))
                {
                    return;
                }

                DataRow r = gridView1.GetDataRow(e.RowHandle);
                if (r != null)
                {
                    int userno = Static.ToInt(r["USERNO"]);
                    if (userno > 0)
                    {
                        Control ctl = (Control)_users[userno];
                        if (ctl != null)
                        {
                            e.Appearance.BackColor    = ctl.BackColor;
                            e.Appearance.BackColor2   = Color.White;
                            e.Appearance.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
                        }
                    }
                }
            }
            catch
            { }
        }
Exemple #2
0
 private void gridViewMovi_Inv_Egre_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     try
     {
         var data = gridViewMovi_Inv_Egre.GetRow(e.RowHandle) as in_Ing_Egr_Inven_Info;
         if (data == null)
         {
             return;
         }
         if (data.Estado == "I")
         {
             e.Appearance.ForeColor = Color.Red;
         }
         else
         if (data.IdEstadoAproba == "APRO")
         {
             e.Appearance.ForeColor = Color.Blue;
         }
     }
     catch (Exception ex)
     {
         Log_Error_bus = new tb_sis_Log_Error_Vzen_Bus();
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void gridViewPosDetail_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            Color color1 = defaultStyle;
            Color color2 = defaultStyle;

            if (e.RowHandle >= 0)
            {
                var row_data = gridViewPosDetail.GetDataRow(e.RowHandle);
                if (row_data != null)
                {
                    var returnCount = (int)row_data["ReturnCount"];
                    if (returnCount > 0)
                    {
                        e.Appearance.BackColor  = Color.FromArgb(242, 222, 222);
                        e.Appearance.BackColor2 = Color.FromArgb(242, 222, 222);
                        e.Appearance.ForeColor  = Color.FromArgb(169, 68, 66);

                        if (gridViewPosDetail.Appearance.FocusedRow.BackColor != Color.Transparent)
                        {
                            color1 = gridViewPosDetail.Appearance.FocusedRow.BackColor;
                            color2 = gridViewPosDetail.Appearance.FocusedRow.BackColor2;
                        }
                        gridViewPosDetail.Appearance.FocusedRow.BackColor  = Color.Transparent;
                        gridViewPosDetail.Appearance.FocusedRow.BackColor2 = Color.Transparent;
                    }
                    else
                    {
                        gridViewPosDetail.Appearance.FocusedRow.BackColor  = color1;
                        gridViewPosDetail.Appearance.FocusedRow.BackColor2 = color2;
                    }
                }
            }
        }
        private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            //GridView View = sender as GridView;
            //if (e.RowHandle >= 0)
            //{
            //    string iade = View.GetRowCellDisplayText(e.RowHandle, View.Columns["iade"]);
            //    string Fiyat = View.GetRowCellDisplayText(e.RowHandle, View.Columns["SatisFiyati"]);
            //    if (AcikSatisindex == 1)
            //        e.Appearance.BackColor = Satis1Toplam.BackColor;
            //    if (AcikSatisindex == 2)
            //        e.Appearance.BackColor = Satis2Toplam.BackColor;
            //    if (AcikSatisindex == 3)
            //        e.Appearance.BackColor = Satis3Toplam.BackColor;
            //    if (AcikSatisindex == 4)
            //        e.Appearance.BackColor = Satis4Toplam.BackColor;
            //    //if (iade.Trim() != "Seçim Yok")
            //    // {
            //    //   e.Appearance.BackColor = Color.DeepPink;
            //    //}
            //    if (Fiyat.Trim() == "0")
            //    {
            //        e.Appearance.BackColor = Color.Red;
            //    }

            //}
        }
Exemple #5
0
 //瓶贴列表表格绑定事件
 private void gdvLabelCollect_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (e.RowHandle >= 0)
     {
         string stutas = this.gdvLabelCollect.GetDataRow(e.RowHandle)["STATUS"].ToString();
         if (this.cbScanning.SelectedItem.ToString() == "入仓扫描")
         {
             if (stutas == "1000501")
             {
                 e.Appearance.BackColor = Color.Red;
             }
             else if (stutas == "1000601")
             {
                 e.Appearance.BackColor = Color.Green;
             }
             else if (stutas == "1000602")
             {
                 e.Appearance.BackColor = Color.Green;
             }
         }
         else
         {
             if (stutas == "1000601")
             {
                 e.Appearance.BackColor = Color.Red;
             }
             else if (stutas == "1000602")
             {
                 e.Appearance.BackColor = Color.Green;
             }
         }
     }
 }
Exemple #6
0
        private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            if (e.RowHandle >= 0)
            {
                if (e.RowHandle % 2 == 0)
                {
                    e.Appearance.BackColor = Color.AntiqueWhite;
                }
            }
            //string ngay=grid.GetRowCellDisplayText(e.RowHandle,grid)

            string category = gridView1.GetRowCellDisplayText(e.RowHandle, gridView1.Columns["Ngày Đi"]);

            //DateTime clcl=DateTime.Parse(gridView1.GetRowCellDisplayText(e.RowHandle, gridView1.Columns["Ngày Đi"]));
            cccc = category.Trim();
            try
            {
                string[] nga = cccc.Split('/');

                //string ngay1 = string.Join(nga[1],"/" ,nga[0],"/", nga[2]);
                CultureInfo ctr = new CultureInfo("en-US");

                string ngay1 = nga[1].ToString() + "/" + nga[0].ToString() + "/" + nga[2].ToString();

                DateTime abcc = Convert.ToDateTime(cccc);
                int      re   = DateTime.Compare(abcc, DateTime.Now);
                if (re < 0)
                {
                    e.Appearance.BackColor = Color.Pink;
                }
            }
            catch { }
        }
        private void gridViewDelivery_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            if (gridViewDelivery.RowCount <= 0 || e.RowHandle < 0)
            {
                return;
            }

            if (gridViewDelivery.GetRowCellValue(e.RowHandle, "delv_yn").ToString() == "N" &&
                gridViewDelivery.GetRowCellValue(e.RowHandle, "stop_yn").ToString() == "N" && e.Appearance.BackColor != Color.LightCoral)
            {
                e.Appearance.BackColor = Color.LightCoral;
            }

            else if (gridViewDelivery.GetRowCellValue(e.RowHandle, "delv_yn").ToString() == "Y" &&
                     gridViewDelivery.GetRowCellValue(e.RowHandle, "stop_yn").ToString() == "N" && e.Appearance.BackColor != Color.Gray)
            {
                e.Appearance.BackColor = Color.Gray;
            }

            if (gridViewDelivery.GetRowCellValue(e.RowHandle, "stop_yn").ToString() == "Y" && e.Appearance.BackColor != Color.White)
            {
                e.Appearance.BackColor = Color.White;
                e.Appearance.ForeColor = Color.Red;
            }

            e.HighPriority = true;
        }
 private void grv_quatrinhgiaiquyet_tocao_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (e.RowHandle >= 0)
     {
         string priority = grv_quatrinhgiaiquyet_tocao.GetRowCellDisplayText(e.RowHandle, grv_quatrinhgiaiquyet_tocao.Columns["statuss"]);
         if (priority == "Kết thúc")
         {
             e.Appearance.BackColor = Color.Green;
             //e.Appearance.BackColor2 = Color.White;
         }
         if (priority == "Quá hạn")
         {
             e.Appearance.BackColor = Color.Red;
             //e.Appearance.BackColor2 = Color.White;
         }
         if (priority == "Đang xử lý")
         {
             e.Appearance.BackColor = Color.Yellow;
             //e.Appearance.BackColor2 = Color.White;
         }
         if (priority == "Chưa xử lý")
         {
             e.Appearance.BackColor = Color.White;
             //e.Appearance.BackColor2 = Color.White;
         }
     }
 }
Exemple #9
0
 private void gvAdvice_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (gvAdvice.RowCount > 0)
     {
         for (int i = 0; i < gvAdvice.RowCount; i++)
         {
             string isInPivas = "1";
             isInPivas = this.gvAdvice.GetRowCellDisplayText(e.RowHandle, this.colIsInPivas);
             if (isInPivas == "0")
             {
                 e.Appearance.BackColor = System.Drawing.Color.White;
                 e.Appearance.ForeColor = System.Drawing.Color.Red;
             }
         }
     }
     //如果医嘱为配伍禁忌  则背景色变红
     if (e.RowHandle >= 0)
     {
         string isPWJJ = this.gvAdvice.GetDataRow(e.RowHandle)["IS_PWJJ"].ToString();
         if (isPWJJ == "0")
         {
             e.Appearance.BackColor = Color.Red;
         }
     }
     // 药品状态
     if (e.RowHandle >= 0)
     {
         string phamrStatus = this.gvAdvice.GetDataRow(e.RowHandle)["PHARM_STATUS"].ToString();
         if (phamrStatus == "0")
         {
             e.Appearance.BackColor = Color.Red;
         }
     }
 }
        private void viewFiniquito_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            try
            {
                var data = viewFiniquito.GetRow(e.RowHandle) as ro_Acta_Finiquito_Info;
                if (data == null)
                {
                    return;
                }

                if (data.EstadoContrato == "I")
                {
                    e.Appearance.ForeColor = Color.Blue;
                }

                if (data.Estado == "I")
                {
                    e.Appearance.ForeColor = Color.Red;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                Log_Error_bus.Log_Error(ex.ToString());
            }
        }
Exemple #11
0
        private void Grdview_list_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) // kalan saate göre grid satırını renklendirir.
        {
            simdi = AnaForm.tarihsaatgetir();
            simdi = new DateTime(simdi.Year, simdi.Month, simdi.Day, simdi.Hour, simdi.Minute, 0);

            if (e.RowHandle >= 0)
            {
                DateTime satirtarih = Convert.ToDateTime(grdview_list.GetRowCellValue(e.RowHandle, "RAN_BASLAMATARIH"));

                if (satirtarih < AnaForm.tarihsaatgetir())
                {
                    var geciken = renkler.Where(p => p.BR_SURE1 == new TimeSpan(0, 0, 0) && p.BR_SURE2 == new TimeSpan(0, 0, 0)).ToList();
                    if (geciken.Count() > 0)
                    {
                        e.Appearance.BackColor = Color.FromArgb(Convert.ToInt32(geciken[0].BR_RENKKODU));
                    }
                }
                else
                {
                    TimeSpan kalansaat = satirtarih.Subtract(simdi);
                    var      renk      = renkler.Where(p => p.BR_SURE1 <= kalansaat && p.BR_SURE2 >= kalansaat).ToList();
                    if (renk.Count() > 0)
                    {
                        e.Appearance.BackColor = Color.FromArgb(Convert.ToInt32(renk[0].BR_RENKKODU));
                    }
                }
            }
        }
Exemple #12
0
        private void gv_KC_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            try
            {
                string str_Value1 = gv_KC.GetRowCellValue(e.RowHandle, "NC与CAP支数账差").ToString();
                string str_Value2 = gv_KC.GetRowCellValue(e.RowHandle, "NC与CAP重量账差").ToString();

                if (string.IsNullOrEmpty(str_Value1))
                {
                    str_Value1 = "0";
                }

                if (string.IsNullOrEmpty(str_Value2))
                {
                    str_Value2 = "0";
                }

                if (Convert.ToDouble(str_Value1) != 0 || Convert.ToDouble(str_Value2) != 0)
                {
                    DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, appNotPass1);
                }
            }
            catch
            {
            }
        }
Exemple #13
0
        private void gridView_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;
            DataRow row = view.GetDataRow(e.RowHandle);


            if (row != null)
            {
                object asidurumu;
                try
                {
                    asidurumu = row["Aşı Yapıldı"];
                }
                catch (Exception)
                {
                    asidurumu = null;
                }

                if (asidurumu != null && asidurumu != System.DBNull.Value)
                {
                    mymodel.myenum.TakvimSatirDurumu durum = (mymodel.myenum.TakvimSatirDurumu)Enum.Parse(typeof(mymodel.myenum.TakvimSatirDurumu), asidurumu.ToString());

                    switch (durum)
                    {
                    case mymodel.myenum.TakvimSatirDurumu.Yapıldı:
                        e.Appearance.BackColor = System.Drawing.Color.LawnGreen;
                        break;

                    default:
                        break;
                    }
                }
            }
        }
Exemple #14
0
        private void gvDetalle_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            try
            {
                cp_XML_Documento_Info row = (cp_XML_Documento_Info)gvDetalle.GetRow(e.RowHandle);
                if (row == null)
                {
                    return;
                }

                if (!string.IsNullOrEmpty(row.ret_NumeroDocumento))
                {
                    e.Appearance.ForeColor = Color.Blue;
                }

                if (!row.Estado)
                {
                    e.Appearance.ForeColor = Color.Red;
                }

                if (!string.IsNullOrEmpty(row.ret_NumeroAutorizacion))
                {
                    e.Appearance.ForeColor = Color.Green;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
        private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            int hand = e.RowHandle;

            if (hand < 0)
            {
                return;
            }
            DataRow dr = this.gridView1.GetDataRow(hand);

            if (dr == null)
            {
                return;
            }
            if (dr["IsPower"].ToString() == DoorPowerType.权限.ToString())
            {
                e.Appearance.ForeColor  = Color.Blue; // 改变行字体颜色
                e.Appearance.BackColor  = Color.Blue; // 改变行背景颜色
                e.Appearance.BackColor2 = Color.Blue; // 添加渐变颜色
            }
            else
            {
                e.Appearance.ForeColor  = Color.Red;  // 改变行字体颜色
                e.Appearance.BackColor  = Color.Red;  // 改变行背景颜色
                e.Appearance.BackColor2 = Color.Blue; // 添加渐变颜色
            }
        }
Exemple #16
0
 private void gv_PDJG_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     try
     {
         if (gv_PDJG.GetRow(e.RowHandle) == null)
         {
             return;
         }
         else
         {
             var dr = gv_PDJG.GetDataRow(e.RowHandle);
             if (dr != null)
             {
                 string remark = dr["C_REMARK"] == null ? "" : dr["C_REMARK"].ToString();
                 if (!string.IsNullOrWhiteSpace(remark))
                 {
                     e.Appearance.ForeColor = Color.Red;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void gridViewArchivos_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     try
     {
         ba_Archivo_Transferencia_Info row_style = (ba_Archivo_Transferencia_Info)gridViewArchivos.GetRow(e.RowHandle);
         if (row_style == null)
         {
             return;
         }
         if (row_style.Contabilizado == true)
         {
             e.Appearance.ForeColor = Color.Blue;
         }
         if (row_style.Estado == false)
         {
             e.Appearance.ForeColor = Color.Red;
         }
     }
     catch (Exception ex)
     {
         string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
         MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
         Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
     }
 }
        private void gvListSanPham_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            try
            {
                if (e.RowHandle < 0)
                {
                    return;
                }
                BangGiaBanChiTietBCInfor ct = (BangGiaBanChiTietBCInfor)gvListSanPham.GetRow(e.RowHandle);

                if (ct != null)// && now.CompareTo(ct.NgayCapNhatCuoi) > 60*60*24*1000)
                {
                    TimeSpan tmp = lastSync - ct.NgayCapNhatCuoi;
                    if (tmp.TotalDays > 1)
                    {
                        return;
                    }
                    if (ct.DonGiaCoVAT > ct.DonGiaCoVATOld)//tang gia
                    {
                        e.Appearance.BackColor = tsslTangGia.BackColor;
                        e.Appearance.ForeColor = tsslTangGia.ForeColor;
                        e.Appearance.Font      = new Font("Arial", 9, FontStyle.Bold);
                    }
                    else//giam gia
                    {
                        e.Appearance.BackColor = tsslGiamGia.BackColor;
                        e.Appearance.ForeColor = tsslGiamGia.ForeColor;
                        e.Appearance.Font      = new Font("Arial", 9, FontStyle.Bold);
                    }
                }
            }
            catch
            {
            }
        }
Exemple #19
0
 private void gv_Consulta_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     try
     {
         com_OrdenPedido_Info row = (com_OrdenPedido_Info)gv_Consulta.GetRow(e.RowHandle);
         if (row != null)
         {
             if (row.IdCatalogoEstado == "EST_OP_CER")
             {
                 e.Appearance.ForeColor = Color.Green;
             }
             else
             if (row.IdCatalogoEstado == "EST_OP_PRO")
             {
                 e.Appearance.ForeColor = Color.Navy;
             }
             if (!row.Estado || row.IdCatalogoEstado == "EST_OP_REC")
             {
                 e.Appearance.ForeColor = Color.Red;
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #20
0
 private void grv_quatrinhgiaiquyet_tocao_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (e.RowHandle >= 0)
     {
         string priority = grv_quatrinhgiaiquyet_tocao.GetRowCellDisplayText(e.RowHandle, grv_quatrinhgiaiquyet_tocao.Columns["statuss"]);
         if (priority == "Finish")
         {
             e.Appearance.BackColor = Color.Green;
             //e.Appearance.BackColor2 = Color.White;
         }
         if (priority == "Out of date")
         {
             e.Appearance.BackColor = Color.Red;
             //e.Appearance.BackColor2 = Color.White;
         }
         if (priority == "Processing")
         {
             e.Appearance.BackColor = Color.Yellow;
             //e.Appearance.BackColor2 = Color.White;
         }
         if (priority == "No process")
         {
             e.Appearance.BackColor = Color.White;
             //e.Appearance.BackColor2 = Color.White;
         }
     }
 }
Exemple #21
0
        private void fireSetRowStyle(SpeicalShow.e_表格行样式 style, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            switch (style)
            {
            case SpeicalShow.e_表格行样式.待完成:
                DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, app_黄);
                break;

            case SpeicalShow.e_表格行样式.已完成:
                DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, app_绿);
                break;

            case SpeicalShow.e_表格行样式.作废:
                DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, app_红);
                break;

            case SpeicalShow.e_表格行样式.禁用:
                DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, app_黄);
                break;

            case SpeicalShow.e_表格行样式.启用:
                DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, app_绿);
                break;

            case SpeicalShow.e_表格行样式.趋势曲线:
                DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, app_绿);
                break;

            case SpeicalShow.e_表格行样式.实时波形:
                DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, app_黄);
                break;
            }
        }
Exemple #22
0
 private void GridView_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (e.RowHandle == DevExpress.XtraGrid.GridControl.AutoFilterRowHandle)
     {
         e.Appearance.BackColor = System.Drawing.Color.Ivory;
     }
 }
Exemple #23
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("display_index"))
            {
                try
                {
                    // 색상 적용
                    int display_index = KnUtil.parseInt32(dr["display_index"].ToString());
                    if (0 == (display_index % 2))
                    {
                        e.Appearance.BackColor = Color.FromArgb(253, 253, 253);
                    }
                }
                catch (Exception ex)
                {
                    TsLog.writeLog(ex.Message);
                }
            }
        }
Exemple #24
0
 private void advBandedGridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (e.RowHandle > advBandedGridView1.RowCount - 4)
     {
         e.Appearance.Font = new Font(e.Appearance.Font.Name, 8.5F, FontStyle.Bold);
     }
 }
Exemple #25
0
        private void gridViewDashboard_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            if (gridViewDashboard.RowCount <= 0 || e.RowHandle < 0 || strStatus != C_NEW)
            {
                return;
            }

            string time_level = gridViewDashboard.GetRowCellValue(e.RowHandle, "ord_level").ToString();
            int    new_level  = 0;

            if (!int.TryParse(time_level, out new_level))
            {
                return;
            }
            new_level = int.Parse(time_level);

            if (strStatus == C_NEW && new_level == 1 && e.Appearance.BackColor != Color.Green)
            {
                e.Appearance.BackColor = Color.Green;
            }
            else if (strStatus == C_NEW && new_level == 2 && e.Appearance.BackColor != Color.Yellow)
            {
                e.Appearance.BackColor = Color.Yellow;
            }
            else if (strStatus == C_NEW && new_level == 3 && e.Appearance.BackColor != Color.Red)
            {
                e.Appearance.BackColor = Color.Red;
            }

            e.HighPriority = true;
        }
        private void gvRawData_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            var row = gvRawData.GetDataRow(e.RowHandle);

            if (row == null)
            {
                return;
            }

            var tableBarcode = Utility.GetObjects(string.Format("SELECT \"U_Barcode\" AS \"Barcode\" FROM \"@ITEMDETAIL\" WHERE \"U_IsDeleted\" = 0 AND \"U_Status\" LIKE '0' AND \"U_Barcode\" LIKE '{0}'", row["RawData"]));

            if (tableBarcode.Rows.Count < 1)
            {
                e.Appearance.BackColor = Color.LightPink;
                tableBarcode           = Utility.GetObjects(string.Format("SELECT \"U_Status\" AS \"Status\" FROM \"@ITEMDETAIL\" WHERE \"U_IsDeleted\" = 0 AND \"U_Barcode\" LIKE '{0}'", row["RawData"]));
                if (tableBarcode.Rows.Count > 0)
                {
                    var row1 = tableBarcode.Rows[0];
                    if (row1["Status"].ToString() == "1")
                    {
                        e.Appearance.BackColor = Color.LightBlue;
                    }
                }
            }
        }
Exemple #27
0
        private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            int hand = e.RowHandle;

            if (hand < 0)
            {
                return;
            }
            DataRow dr = this.gridView1.GetDataRow(hand);

            if (dr == null)
            {
                return;
            }
            string str = dr["IsReturn"].ToString();

            if (str == "未归还")                           // // ReturnTime  IsReturn
            {
                e.Appearance.ForeColor  = Color.Orange; // 改变行字体颜色
                e.Appearance.BackColor  = Color.Orange; // 改变行背景颜色
                e.Appearance.BackColor2 = Color.Blue;   // 添加渐变颜色
            }

            //str = dr["BorrowDuration"].ToString();
            //str

            //if (dr["PeopleBR"].ToString() == "")
            //{
            //    e.Appearance.ForeColor = Color.Red;// 改变行字体颜色
            //    e.Appearance.BackColor = Color.Red;// 改变行背景颜色
            //    e.Appearance.BackColor2 = Color.Blue;// 添加渐变颜色
            //}
        }
Exemple #28
0
 private void gridView2_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (e.RowHandle > 0 && (gridView2.GetRow(e.RowHandle) as DUONGDAI_KHACHHEN_XEDK).IsXeDangKy == 0)
     {
         e.Appearance.BackColor = Color.Plum;
     }
 }
Exemple #29
0
        private void gridViewPlancta_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            try
            {
                ct_Plancta_Info row = (ct_Plancta_Info)gridViewPlancta.GetRow(e.RowHandle);
                if (row == null)
                {
                    return;
                }

                if (row.pc_Estado == "I")
                {
                    e.Appearance.ForeColor = Color.Red;
                }

                if (row.pc_Estado == "A")
                {
                    e.Appearance.ForeColor = Color.Black;
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #30
0
 private void grvLeft_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
 {
     if (e.RowHandle < LimitCoungt)
     {
         e.Appearance.BackColor = Color.DarkOrange;
         e.Appearance.ForeColor = Color.Azure;
     }
 }