コード例 #1
0
 private void DropDownList_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record)
     {
         e.Row.Cells["Image"].ImageIndex = ((PlayerOrTribeRow)e.Row.DataRow).ImageIndex;
     }
 }
コード例 #2
0
        private void gridBaoCaoBieuMau1_FormattingRow(object sender, RowLoadEventArgs e)
        {
            if (e.Row.RowType == RowType.Record)
            {
                //SanBayMotChieu
                if (e.Row.Cells["SanBayMotChieu"].Value.ToString() == "0")
                {
                    e.Row.Cells["SanBayMotChieu"].Text = "";
                }
                else
                {
                    e.Row.Cells["SanBayMotChieu"].Text = "x";
                }

                if (e.Row.Cells["SanBayMotChieuVeCoKhach"].Value.ToString() == "0")
                {
                    e.Row.Cells["SanBayMotChieuVeCoKhach"].Text = "";
                }
                else
                {
                    e.Row.Cells["SanBayMotChieuVeCoKhach"].Text = "x";
                }

                if (e.Row.Cells["SanBayHaiChieu"].Value.ToString() == "0")
                {
                    e.Row.Cells["SanBayHaiChieu"].Text = "";
                }
                else
                {
                    e.Row.Cells["SanBayHaiChieu"].Text = "x";
                }

                if (e.Row.Cells["DuongDaiMotChieu"].Value.ToString() == "0")
                {
                    e.Row.Cells["DuongDaiMotChieu"].Text = "";
                }
                else
                {
                    e.Row.Cells["DuongDaiMotChieu"].Text = "x";
                }

                if (e.Row.Cells["DuongDaiHaiChieu"].Value.ToString() == "0")
                {
                    e.Row.Cells["DuongDaiHaiChieu"].Text = "";
                }
                else
                {
                    e.Row.Cells["DuongDaiHaiChieu"].Text = "x";
                }

                if (e.Row.Cells["ThueBao"].Value.ToString() == "0")
                {
                    e.Row.Cells["ThueBao"].Text = "";
                }
                else
                {
                    e.Row.Cells["ThueBao"].Text = "x";
                }
            }
        }
コード例 #3
0
        private void grdVeHuy_FormattingRow(object sender, RowLoadEventArgs e)
        {
            if ((((int)e.Row.Cells["SeriDau"].Value) == 0) && (((int)e.Row.Cells["SeriCuoi"].Value) == 0))
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.BackColor = Color.Cyan;
                e.Row.Cells["SoHopDong"].FormatStyle = RowStyle;
            }

            bool IsTamNhap = false;

            try
            {
                IsTamNhap = Convert.ToBoolean(e.Row.Cells["IsTamNhap"].Value.ToString());
            }
            catch (Exception ex)
            {
                IsTamNhap = false;
            }

            if (IsTamNhap)
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.BackColor = Color.Red;
                e.Row.Cells["SoHopDong"].FormatStyle = RowStyle;
            }
        }
コード例 #4
0
 private void gridBaoCaoBieuMau1_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.Cells["ThuocViTriGoi"].Value.ToString() == "0")
     {
         e.Row.Cells["ThuocViTriGoi"].Text = "Điện thoại";
     }
     else if (e.Row.Cells["ThuocViTriGoi"].Value.ToString() == "1")
     {
         e.Row.Cells["ThuocViTriGoi"].Text = "Tổng đài";
     }
     else if (e.Row.Cells["ThuocViTriGoi"].Value.ToString() == "2")
     {
         e.Row.Cells["ThuocViTriGoi"].Text = "Mời khách";
     }
     else if (e.Row.Cells["ThuocViTriGoi"].Value.ToString() == "3")
     {
         e.Row.Cells["ThuocViTriGoi"].Text = "Tin giá";
     }
     else if (e.Row.Cells["ThuocViTriGoi"].Value.ToString() == "4")
     {
         e.Row.Cells["ThuocViTriGoi"].Text = "Khách hàng";
     }
     else if (e.Row.Cells["ThuocViTriGoi"].Value.ToString() == "5")
     {
         e.Row.Cells["ThuocViTriGoi"].Text = "Trưởng ca";
     }
     else if (e.Row.Cells["ThuocViTriGoi"].Value.ToString() == "9")
     {
         e.Row.Cells["ThuocViTriGoi"].Text = "Khác";
     }
 }
コード例 #5
0
 ///0 : Điện thoại
 //1 : Tổng đài
 //2 : Mời khách
 //3 : Tin Giá
 //4 : Khách hàng
 //5 : Trưởng ca
 //9 : Khác
 private void gridMayGoiRa_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.Cells["IsMayTinh"].Value.ToString() == "0")
     {
         e.Row.Cells["LoaiMay"].Text = "Điện thoại";
     }
     else if (e.Row.Cells["IsMayTinh"].Value.ToString() == "1")
     {
         e.Row.Cells["LoaiMay"].Text = "Tổng đài";
     }
     else if (e.Row.Cells["IsMayTinh"].Value.ToString() == "2")
     {
         e.Row.Cells["LoaiMay"].Text = "Mời khách";
     }
     else if (e.Row.Cells["IsMayTinh"].Value.ToString() == "3")
     {
         e.Row.Cells["LoaiMay"].Text = "Tin giá";
     }
     else if (e.Row.Cells["IsMayTinh"].Value.ToString() == "4")
     {
         e.Row.Cells["LoaiMay"].Text = "Khách hàng";
     }
     else if (e.Row.Cells["IsMayTinh"].Value.ToString() == "5")
     {
         e.Row.Cells["LoaiMay"].Text = "Trưởng ca";
     }
     else if (e.Row.Cells["IsMayTinh"].Value.ToString() == "9")
     {
         e.Row.Cells["LoaiMay"].Text = "Khác";
     }
 }
コード例 #6
0
ファイル: TestForm.cs プロジェクト: kindam/TWTactics
 private void DropDownList_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record)
     {
         e.Row.Cells["Image"].ImageIndex = ((PlayerOrTribeRow)e.Row.DataRow).ImageIndex;
     }
 }
コード例 #7
0
ファイル: EventLogViewer.cs プロジェクト: carlhuth/GenXSource
        void dgEvents_FormattingRow(object sender, RowLoadEventArgs e)
        {
            GridEXRow row     = e.Row;
            object    objType = row.Cells["EntryType"].Value;

            if (objType != null)
            {
                string strType = objType.ToString();

                if (strType == "Information")
                {
                    row.Cells["TypeImage"].ImageIndex = 0;
                }
                else if (strType == "Warning")
                {
                    row.Cells["TypeImage"].ImageIndex = 1;
                }
                else if (strType == "Error")
                {
                    row.Cells["TypeImage"].ImageIndex = 2;
                }
                else if (strType == "FailureAudit")
                {
                    row.Cells["TypeImage"].ImageIndex = 3;
                }
                else if (strType == "SuccessAudit")
                {
                    row.Cells["TypeImage"].ImageIndex = 4;
                }
            }
        }
コード例 #8
0
 /// <summary>
 /// hàm thực hiện viecj nhận formating trên lưới
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdDetail_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.TotalRow)
     {
         e.Row.Cells[DmucDichvuclsChitiet.Columns.TenChitietdichvu].Value = "Tổng cộng :";
     }
 }
コード例 #9
0
 private void grdGiaiQuyetPA_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if ((DateTime)e.Row.Cells["NgayGiaiQuyet"].Value == DateTime.MinValue)
     {
         e.Row.Cells["NgayGiaiQuyet"].Value = new DateTime(1900, 01, 01, 0, 0, 0);
         //e.Row.Cells["NgayGiaiQuyet"].Text = "";
     }
 }
コード例 #10
0
 private void grdResult_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.TotalRow)
     {
         e.Row.Cells["dia_chi"].Value      = "Tổng Số Xét Nghiệm:";
         e.Row.Cells["ten_benhnhan"].Value = "Tổng Sô BN:  " + dtResult.Rows.Count.ToString();
     }
 }
コード例 #11
0
 private void grdAllPatientInfoAndResult_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.TotalRow)
     {
         e.Row.Cells["Address"].Value      = "Tổng Số Xét Nghiệm:";
         e.Row.Cells["Patient_Name"].Value = "Tổng Sô BN:  " + dtResult.Rows.Count.ToString();
     }
 }
コード例 #12
0
 private void grdXe_FormattingRow(object sender, RowLoadEventArgs e)
 {
     //Xe  objXe= (Xe )e.Row.DataRow ;
     //if ((objXe.ThoiDiemGiaoCa == DateTime.MinValue) || (objXe.ThoiDiemGiaoCa== new DateTime (1900,01,01,01,01,01)))
     //{
     //     GridEXFormatStyle RowStyle = new GridEXFormatStyle();
     //     RowStyle.ForeColor = Color.White;
     //     e.Row.Cells["ThoiDiemGiaoCa"].FormatStyle = RowStyle;
     //}
 }
コード例 #13
0
 private void gridBaoCaoBieuMau1_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.Cells["SanBay"].Value.ToString() == "0")
     {
         e.Row.Cells["SanBay"].Text = "";
     }
     if (e.Row.Cells["DuongDai"].Value.ToString() == "0")
     {
         e.Row.Cells["DuongDai"].Text = "";
     }
 }
コード例 #14
0
        private void grdTestResult_FormattingRow(object sender, RowLoadEventArgs e)
        {
            if (e == null)
            {
                return;
            }
            var        gf         = new GridEXFormatStyle();
            GridEXCell gridExCell = e.Row.Cells[TResultDetail.Columns.TestResult];

            gf.TextAlignment       = Utility.IsNumeric(gridExCell.Value) ? TextAlignment.Far : TextAlignment.Center;
            gridExCell.FormatStyle = gf;
        }
コード例 #15
0
        private void gridCauHinhBatThoatCuoc_FormattingRow(object sender, RowLoadEventArgs e)
        {
            GridEXRow row = e.Row;

            if (row.Cells["ThoiDiemKetThuc999"].Value != null && row.Cells["ThoiDiemKetThuc999"].Value.ToString().Length <= 0 &&
                row.Cells["ThoiDiemBatDau999"].Value != null && row.Cells["ThoiDiemBatDau999"].Value.ToString().Length > 0)      // chua co gio ket thuc
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.BackColor            = Color.Lime;
                row.Cells["Vung"].FormatStyle = RowStyle;
            }
        }
コード例 #16
0
 private void gridEX1_LoadingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record)
     {
         if (e.Row.Table.Key == "OrderDetails")
         {
             //Calculate Total value in order details row
             e.Row.Cells["Total"].Value = GetDecimalValueSafe(e.Row.Cells["Quantity"]) * GetDecimalValueSafe(e.Row.Cells["UnitPrice"]) *
                                          (1 - GetDecimalValueSafe(e.Row.Cells["Discount"]));
         }
     }
 }
コード例 #17
0
 private void gridEX1_LoadingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record)
     {
         if (e.Row.Table.Key == "OrderDetails")
         {
             //Calculate Total value in order details row
             e.Row.Cells["Total"].Value = GetDecimalValueSafe(e.Row.Cells["Quantity"]) * GetDecimalValueSafe(e.Row.Cells["UnitPrice"])*
                     (1-GetDecimalValueSafe(e.Row.Cells["Discount"]));
         }
     }
 }
コード例 #18
0
        /// <summary>
        /// Special formatting, image display, tooltips
        /// </summary>
        private void GridExVillage_FormattingRow(object sender, RowLoadEventArgs e)
        {
            // GroupHeaders
            UpdateGroupRecordText(e.Row);

            // Normal Rows
            if (e.Row.RowType == RowType.Record)
            {
                var record = e.Row.GetDataRow <PolygonDataSet.VILLAGERow>();

                // SetVillageVisibility()
                if (record.ISVISIBLE)
                {
                    e.Row.Cells["ISVISIBLE"].Image       = Properties.Resources.Visible;
                    e.Row.Cells["ISVISIBLE"].ToolTipText = VillageGridExRes.VisibleTooltip;
                }

                // SetVillageType()
                if (record.Village.Type != VillageType.None)
                {
                    e.Row.Cells["TYPE"].Image = record.Village.Type.GetImage(true);
                    if (record.Village.HasComments)
                    {
                        e.Row.Cells["TYPE"].ToolTipText = record.Village.Comments;
                    }
                    else
                    {
                        e.Row.Cells["TYPE"].ToolTipText = record.Village.Type.GetDescription();
                    }
                }

                // Display You and your tribe in special color
                if (record.Village.HasPlayer)
                {
                    var you = World.Default.You;
                    if (record.Village.Player == you)
                    {
                        var style = new GridEXFormatStyle();
                        style.ForeColor = Color.Red;
                        style.FontBold  = TriState.True;
                        e.Row.Cells["PLAYER"].FormatStyle = style;
                    }
                    else if (you != null && record.Village.Player.Tribe == you.Tribe)
                    {
                        var style = new GridEXFormatStyle();
                        style.ForeColor = Color.Blue;
                        style.FontBold  = TriState.True;
                        e.Row.Cells["PLAYER"].FormatStyle = style;
                    }
                }
            }
        }
コード例 #19
0
        private void GridExVillage_FormattingRow(object sender, RowLoadEventArgs e)
        {
            if (e.Row.RowType == RowType.Record)
            {
                var record = GetVillageRow(e.Row);

                // SetVillageVisibility()
                if (record.Visible)
                {
                    e.Row.Cells["Visible"].Image       = Properties.Resources.Visible;
                    e.Row.Cells["Visible"].ToolTipText = VillageGridExRes.VisibleCellTooltip;
                }

                // SetVillageType()
                if (record.Village.Type != VillageType.None)
                {
                    e.Row.Cells["Type"].Image = record.Village.Type.GetImage(true);
                    if (record.Village.HasComments)
                    {
                        e.Row.Cells["Type"].ToolTipText = record.Village.Comments;
                    }
                    else
                    {
                        e.Row.Cells["Type"].ToolTipText = record.Village.Type.GetDescription();
                    }
                }

                // Display You and your tribe in special color
                if (ShowPlayer)
                {
                    if (record.Village.HasPlayer)
                    {
                        var you = World.Default.You;
                        if (record.Village.Player == you)
                        {
                            var style = new GridEXFormatStyle();
                            style.ForeColor = Color.Red;
                            style.FontBold  = TriState.True;
                            e.Row.Cells["Player"].FormatStyle = style;
                        }
                        else if (you != null && record.Village.Player.Tribe == you.Tribe)
                        {
                            var style = new GridEXFormatStyle();
                            style.ForeColor = Color.Blue;
                            style.FontBold  = TriState.True;
                            e.Row.Cells["Player"].FormatStyle = style;
                        }
                    }
                }
            }
        }
コード例 #20
0
 private void GridEX1_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record)
     {
         if ((bool)e.Row.Cells["Discontinued"].Value)
         {
             e.Row.Cells["StatusIcon"].ImageKey = "discontinued";
         }
         else if ((bool)e.Row.Cells["OnSale"].Value)
         {
             e.Row.Cells["StatusIcon"].ImageKey = "onsale";
         }
     }
 }
コード例 #21
0
ファイル: MarkersControl.cs プロジェクト: windygu/TWTactics
 private void MarkersGrid_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record || e.Row.RowType == RowType.NewRecord)
     {
         var marker = e.Row.DataRow as MarkerGridRow;
         if (marker != null)
         {
             e.Row.Cells["Type"].Image       = marker.GetTypeImage();
             e.Row.Cells["Type"].ToolTipText = marker.GetTooltip();
             e.Row.Cells["Name"].ToolTipText = marker.GetTooltip();
             e.Row.Cells["Name"].Text        = marker.Name;
         }
     }
 }
コード例 #22
0
 private void gridKQDHNV_TongDai_FormattingRow(object sender, RowLoadEventArgs e)
 {
     try
     {
         if (int.Parse(e.Row.Cells["SoCuocTaxi"].Value.ToString()) != 0)
         {
             e.Row.Cells["PhanTramDonDuoc"].Text = string.Format("{0: ##.##}", ((double.Parse(e.Row.Cells["SoCuocDonDuoc"].Value.ToString()) / double.Parse(e.Row.Cells["SoCuocTaxi"].Value.ToString()) * 100)));
         }
     }
     catch (Exception ex)
     {
         ////  LogError.WriteLog("Lỗi xử lý hiển thị màu của lưới", ex);
     }
 }
コード例 #23
0
ファイル: frmCustomerList.cs プロジェクト: shahabshafiee/K1
 private void gridEX1_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record & e.Row.Cells.Count > 0 & e.Row.Cells["LastPaymentDate"].Value.ToString() != "")
     {
         DateTime dt          = (DateTime)e.Row.Cells["LastPaymentDate"].Value;
         string   persianDate =
             "0".Substring(0, 2 - persianCalendar.GetHour(dt).ToString().Length) + persianCalendar.GetHour(dt).ToString() + ":" +
             "0".Substring(0, 2 - persianCalendar.GetMinute(dt).ToString().Length) + persianCalendar.GetMinute(dt).ToString() + " " +
             persianCalendar.GetYear(dt).ToString() + "/" +
             "0".Substring(0, 2 - persianCalendar.GetMonth(dt).ToString().Length) + persianCalendar.GetMonth(dt).ToString() + "/" +
             "0".Substring(0, 2 - persianCalendar.GetDayOfMonth(dt).ToString().Length) + persianCalendar.GetDayOfMonth(dt).ToString();
         e.Row.Cells["LastPaymentDate"].Text = persianDate;
     }
 }
コード例 #24
0
 private void GridEX1_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record)
     {
         if ((bool)e.Row.Cells["Discontinued"].Value)
         {
             e.Row.Cells["StatusIcon"].ImageKey = "discontinued";
         }
         else if ((bool)e.Row.Cells["OnSale"].Value)
         {
             e.Row.Cells["StatusIcon"].ImageKey = "onsale";
         }
     }
 }
コード例 #25
0
 protected override void OnFormattingRow(RowLoadEventArgs e)
 {
     base.OnFormattingRow(e);
     if (!base.DesignMode)
     {
         EventLogEntry entry = (EventLogEntry)e.Row.DataRow;
         Image image = EventLog.GetImageByEventType(entry.Type);
         GridEXCell typeCell = e.Row.Cells["Type"];
         GridEXCell messageCell = e.Row.Cells["Message"];
         GridEXCell dateTimeCell = e.Row.Cells["DateTime"];
         typeCell.Image = image;
         typeCell.ToolTipText = messageCell.ToolTipText = dateTimeCell.ToolTipText = entry.ToMessageString();
     }
 }
コード例 #26
0
        private void gridKQDHNV_DienThoai_FormattingRow(object sender, RowLoadEventArgs e)
        {
            // tinh %

            //try
            //{
            //    if (int.Parse(e.Row.Cells["CuocGoiTaxi"].Value.ToString()) != 0)
            //        e.Row.Cells["PhanTramChuyenCham"].Text = string.Format("{0: ##.##}",  ((double.Parse(e.Row.Cells["SoCuocBiCham"].Value.ToString()) / double.Parse(e.Row.Cells["SoCuocTaxi"].Value.ToString()) * 100)));
            //}
            //catch (Exception ex)
            //{
            //    ////  LogError.WriteLog("Lỗi xử lý hiển thị màu của lưới", ex);
            //}
        }
コード例 #27
0
        private void DropDownList_FormattingRow(object sender, RowLoadEventArgs e)
        {
            if (e.Row.RowType == RowType.Record)
            {
                var data = (PlayerOrTribeRow)e.Row.DataRow;

                if (data.Visible)
                {
                    e.Row.Cells["Visible"].Image = Properties.Resources.Visible;
                }

                e.Row.Cells["Image"].ImageIndex  = data.ImageIndex;
                e.Row.Cells["Value"].ToolTipText = data.Tooltip;
            }
        }
コード例 #28
0
        private void grdDaGiaiQuyetPA_FormattingRow(object sender, RowLoadEventArgs e)
        {
            ThongTinPhanAnh objPhanAnh = (ThongTinPhanAnh)e.Row.DataRow;

            if (objPhanAnh.KieuKhachHangGoiDen == EFiling.Utils.KieuKhachHangGoiDen.KhachHangVIP)
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.BackColor = Color.Blue;
                e.Row.Cells["TenKhachHang"].FormatStyle = RowStyle;
            }
            else if (objPhanAnh.KieuKhachHangGoiDen == EFiling.Utils.KieuKhachHangGoiDen.KhachHangVang ||
                     objPhanAnh.KieuKhachHangGoiDen == EFiling.Utils.KieuKhachHangGoiDen.KhachHangBac)
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.BackColor = Color.ForestGreen;
                e.Row.Cells["TenKhachHang"].FormatStyle = RowStyle;
            }
        }
コード例 #29
0
 private void griTongCuocGoiDen_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.GroupFooter)
     {
         try
         {
             double donDuoc  = Convert.ToDouble(e.Row.Cells["TongDonDuoc"].Value.ToString());
             double cuocTaxi = Convert.ToDouble(e.Row.Cells["TongTaxi"].Value.ToString());
             if (cuocTaxi > 0)
             {
                 e.Row.Cells["PhanTramDonDuoc"].Text = string.Format("{0:#.#}", Convert.ToDouble(donDuoc / cuocTaxi * 100));
             }
         }
         catch (Exception ex)
         {
         }
     }
 }
コード例 #30
0
 private void grdDieuHanhTheoGio_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.GroupFooter)
     {
         try
         {
             double donDuoc  = Convert.ToDouble(e.Row.Cells["TongDonDuoc"].Value.ToString());
             double cuocTaxi = Convert.ToDouble(e.Row.Cells["TongGoiTaxi"].Value.ToString());
             double goiLai   = Convert.ToDouble(e.Row.Cells["TongGoiLai"].Value.ToString());
             if (cuocTaxi > 0)
             {
                 e.Row.Cells["PhanTramDonDuoc"].Text = string.Format("{0:#.#}", Convert.ToDouble(donDuoc / cuocTaxi * 100));
                 e.Row.Cells["PhanTramGoiLai"].Text  = string.Format("{0:#.#}", Convert.ToDouble(goiLai / cuocTaxi * 100));
             }
         }
         catch
         {
         }
     }
 }
コード例 #31
0
        /// <summary>
        /// hiển thị thay đổi màu đồi với những những dòng chưa có Kmtrả
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void grdNhanVien_FormattingRow(object sender, RowLoadEventArgs e)
        {
            //objThueBao.ThoiGianTra = new DateTime(1900, 01, 01);
            //objThueBao.KmTra = -1;
            //objThueBao.TienThucThu = -1;
            //objThueBao.KmThucDi = -1;
            //objThueBao.DongHoTien = -1;
            //objThueBao.GhiChu = "";
            //objThueBao.PhuTroi = "";
            GridEXRow row = e.Row;

            if (row.Cells["KmTra"].Text == "-1")
            {
                row.Cells["ThoiGianTra"].Text = "";
                row.Cells["KmTra"].Text       = "";
                row.Cells["KmThucDi"].Text    = "";
                row.Cells["DongHoTien"].Text  = "";
                row.Cells["TienThucThu"].Text = "";
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.BackColor = Color.Yellow;
                row.Cells["SoHieuXe"].FormatStyle = RowStyle;
            }
        }
コード例 #32
0
ファイル: PathsGrid.cs プロジェクト: tgmayfield/svn-monitor
 protected override void OnFormattingRow(RowLoadEventArgs e)
 {
     base.OnFormattingRow(e);
     if (e.Row.DataRow is SVNPath)
     {
         SVNPath path = (SVNPath)e.Row.DataRow;
         string text = path.ActionString;
         GridEXCell possibleConflictedCell = e.Row.Cells["PossibleConflicted"];
         string suffix = string.Empty;
         if (path.Modified)
         {
             suffix = string.Format(", {0}", Strings.PathModified);
             possibleConflictedCell.Image = Images.arrow_up_blue;
             possibleConflictedCell.ToolTipText = Strings.PathModified;
         }
         if (path.Unread)
         {
             suffix = string.Format(", {0}", Strings.PathUnread);
             possibleConflictedCell.Image = Images.arrow_down_green;
             possibleConflictedCell.ToolTipText = Strings.PathUnread;
         }
         if (path.PossibleConflicted)
         {
             suffix = string.Format(", {0}", Strings.PathPossibleConflict);
             possibleConflictedCell.Image = Images.warning;
             possibleConflictedCell.ToolTipText = Strings.PathPossibleConflict;
         }
         text = text + suffix;
         if (!path.ExistsLocally)
         {
             text = text + string.Format(" ({0})", Strings.PathDoesNotExist);
         }
         GridEXCell filePathCell = e.Row.Cells["DisplayName"];
         filePathCell.ToolTipText = text;
     }
 }
コード例 #33
0
 private void grdCuocSanBayDuongDai_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.Cells["ThoiDiemVe"].Value.ToString() == "01/01/1900 00:00:00")
     {
         e.Row.Cells["ThoiDiemVe"].Text = string.Empty;
     }
     if ((DateTime)e.Row.Cells["ThoiDiemDuyet"].Value == Convert.ToDateTime("1/1/0001 12:00:00 AM"))
     {
         e.Row.Cells["TrangThaiDuyet"].Text = "Chờ xử lý";
         e.Row.Cells["NguoiDuyet"].Text     = "";
         e.Row.Cells["ThoiDiemDuyet"].Text  = "";
     }
     else
     {
         if ((bool)e.Row.Cells["TrangThaiDuyet"].Value == false)
         {
             e.Row.Cells["TrangThaiDuyet"].Text = "Không duyệt";
         }
         else
         {
             e.Row.Cells["TrangThaiDuyet"].Text = "Đã duyệt";
         }
     }
 }
コード例 #34
0
 private void gridEX1_FormattingRow(object sender, RowLoadEventArgs e)
 {
 }
コード例 #35
0
        private void grdAllPatientInfoAndResult_FormattingRow(object sender, RowLoadEventArgs e)
        {
            if(e.Row.RowType==RowType.TotalRow)
            {

                e.Row.Cells["Address"].Value = "Tổng Số Xét Nghiệm:";
                e.Row.Cells["Patient_Name"].Value = "Tổng Sô BN:  " + dtResult.Rows.Count.ToString();
            }
        }
コード例 #36
0
 private void grdAllPatientInfoAndResult_LoadingRow(object sender, RowLoadEventArgs e)
 {
 }
コード例 #37
0
ファイル: PolygonControl.cs プロジェクト: kindam/TWTactics
        /// <summary>
        /// Special formatting, image display, tooltips
        /// </summary>
        private void GridExVillage_FormattingRow(object sender, RowLoadEventArgs e)
        {
            // GroupHeaders
            UpdateGroupRecordText(e.Row);

            // Normal Rows
            if (e.Row.RowType == RowType.Record)
            {
                var record = e.Row.GetDataRow<PolygonDataSet.VILLAGERow>();

                // SetVillageVisibility()
                if (record.ISVISIBLE)
                {
                    e.Row.Cells["ISVISIBLE"].Image = Properties.Resources.Visible;
                    e.Row.Cells["ISVISIBLE"].ToolTipText = "Currently visible on the map";
                }

                // SetVillageType()
                if (record.Village.Type != VillageType.None)
                {
                    e.Row.Cells["TYPE"].Image = record.Village.Type.GetImage(true);
                    if (record.Village.HasComments)
                    {
                        e.Row.Cells["TYPE"].ToolTipText = record.Village.Comments;
                    }
                    else
                    {
                        e.Row.Cells["TYPE"].ToolTipText = record.Village.Type.GetDescription();
                    }
                }

                // Display You and your tribe in special color
                if (record.Village.HasPlayer)
                {
                    var you = World.Default.You;
                    if (record.Village.Player == you)
                    {
                        var style = new GridEXFormatStyle();
                        style.ForeColor = Color.Red;
                        style.FontBold = TriState.True;
                        e.Row.Cells["PLAYER"].FormatStyle = style;
                    }
                    else if (you != null && record.Village.Player.Tribe == you.Tribe)
                    {
                        var style = new GridEXFormatStyle();
                        style.ForeColor = Color.Blue;
                        style.FontBold = TriState.True;
                        e.Row.Cells["PLAYER"].FormatStyle = style;
                    }
                }
            }
        }
コード例 #38
0
ファイル: MarkersControl.cs プロジェクト: kindam/TWTactics
 private void MarkersGrid_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record || e.Row.RowType == RowType.NewRecord)
     {
         var marker = e.Row.DataRow as MarkerGridRow;
         if (marker != null)
         {
             e.Row.Cells["Type"].Image = marker.GetTypeImage();
             e.Row.Cells["Type"].ToolTipText = marker.GetTooltip();
             e.Row.Cells["Name"].ToolTipText = marker.GetTooltip();
             e.Row.Cells["Name"].Text = marker.Name;
         }
     }
 }
コード例 #39
0
        void dgEvents_FormattingRow(object sender, RowLoadEventArgs e)
        {
            GridEXRow row = e.Row;
            object objType = row.Cells["EntryType"].Value;

            if (objType != null)
            {
                string strType = objType.ToString();

                if (strType == "Information")
                {
                    row.Cells["TypeImage"].ImageIndex = 0;
                }
                else if (strType == "Warning")
                {
                    row.Cells["TypeImage"].ImageIndex = 1;
                }
                else if (strType == "Error")
                {
                    row.Cells["TypeImage"].ImageIndex = 2;
                }
                else if (strType == "FailureAudit")
                {
                    row.Cells["TypeImage"].ImageIndex = 3;
                }
                else if (strType == "SuccessAudit")
                {
                    row.Cells["TypeImage"].ImageIndex = 4;
                }
            }
        }
コード例 #40
0
        private void DropDownList_FormattingRow(object sender, RowLoadEventArgs e)
        {
            if (e.Row.RowType == RowType.Record)
            {
                var data = (PlayerOrTribeRow) e.Row.DataRow;

                if (data.Visible)
                {
                    e.Row.Cells["Visible"].Image = Properties.Resources.Visible;
                }

                e.Row.Cells["Image"].ImageIndex = data.ImageIndex;
                e.Row.Cells["Value"].ToolTipText = data.Tooltip;
            }
        }
コード例 #41
0
 private void grdList_FormattingRow(object sender, RowLoadEventArgs e)
 {
 }
コード例 #42
0
 private void GridExVillage_LoadingRow(object sender, RowLoadEventArgs e)
 {
 }
コード例 #43
0
 private void grdTestResult_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e == null) return;
     var gf = new GridEXFormatStyle();
     GridEXCell gridExCell = e.Row.Cells[TResultDetail.Columns.TestResult];
     gf.TextAlignment = Utility.IsNumeric(gridExCell.Value) ? TextAlignment.Far : TextAlignment.Center;
     gridExCell.FormatStyle = gf;
 }
コード例 #44
0
 /// <summary>
 /// HÀM THỰC HIỆN VIỆC SỐ LƯỢNG TỒN THÔNG TIN 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdPresDetail_FormattingRow(object sender, RowLoadEventArgs e)
 {
 }
コード例 #45
0
        /// <summary>
        /// HÀM THỰC HIỆN VIỆC SỐ LƯỢNG TỒN THÔNG TIN 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void grdPresDetail_FormattingRow(object sender, RowLoadEventArgs e)
        {
            try
            {
                Janus.Windows.GridEX.GridEXColumn gridExColumnSL = grdPresDetail.RootTable.Columns["Quantity"];
                Janus.Windows.GridEX.GridEXColumn gridExColumnSLTon = grdPresDetail.RootTable.Columns["SL_Ton"];
                if(e.Row.RowType==RowType.Record)
                {

                    if (Utility.Int32Dbnull(e.Row.Cells[gridExColumnSL].Value) > Utility.Int32Dbnull(e.Row.Cells[gridExColumnSLTon].Value))
                    {
                        e.Row.RowStyle.BackColor = Color.Red;
                        e.Row.RowStyle.FontBold = TriState.True;
                    }
                    else
                    {
                        e.Row.RowStyle.BackColor = Color.White;
                        e.Row.RowStyle.FontBold = TriState.False;
                    }
                }
            }
            catch (Exception)
            {

            }
        }
コード例 #46
0
        private void GridExVillage_FormattingRow(object sender, RowLoadEventArgs e)
        {
            if (e.Row.RowType == RowType.Record)
            {
                var record = GetVillageRow(e.Row);

                // SetVillageVisibility()
                if (record.Visible)
                {
                    e.Row.Cells["Visible"].Image = Properties.Resources.Visible;
                    e.Row.Cells["Visible"].ToolTipText = "Currently visible on the map";
                }

                // SetVillageType()
                if (record.Village.Type != VillageType.None)
                {
                    e.Row.Cells["Type"].Image = record.Village.Type.GetImage(true);
                    if (record.Village.HasComments)
                    {
                        e.Row.Cells["Type"].ToolTipText = record.Village.Comments;
                    }
                    else
                    {
                        e.Row.Cells["Type"].ToolTipText = record.Village.Type.GetDescription();
                    }
                }

                // Display You and your tribe in special color
                if (ShowPlayer)
                {
                    if (record.Village.HasPlayer)
                    {
                        var you = World.Default.You;
                        if (record.Village.Player == you)
                        {
                            var style = new GridEXFormatStyle();
                            style.ForeColor = Color.Red;
                            style.FontBold = TriState.True;
                            e.Row.Cells["Player"].FormatStyle = style;
                        }
                        else if (you != null && record.Village.Player.Tribe == you.Tribe)
                        {
                            var style = new GridEXFormatStyle();
                            style.ForeColor = Color.Blue;
                            style.FontBold = TriState.True;
                            e.Row.Cells["Player"].FormatStyle = style;
                        }
                    }
                }
            }
        }
コード例 #47
0
 private void gridBaoCaoBieuMau1_FormattingRow(object sender, RowLoadEventArgs e)
 {
 }
コード例 #48
0
 /// <summary>
 /// hàm thực hiện viecj nhận formating trên lưới
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grdAssignDetail_FormattingRow(object sender, RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.TotalRow)
     {
         e.Row.Cells[DmucDichvuclsChitiet.Columns.TenChitietdichvu].Value = "Tổng cộng :";
     }
 }
コード例 #49
0
 private void gridEX1_FormattingRow(object sender, RowLoadEventArgs e)
 {
     GridEXCell imageCell = e.Row.Cells["Image"];
     KeyboardEditorRow row = (KeyboardEditorRow)e.Row.DataRow;
     imageCell.Image = row.Image;
 }