Exemplo n.º 1
0
 private void jsgConditions_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record)
     {
         GridEXFormatCondition formatCondition = (GridEXFormatCondition)e.Row.DataRow;
         e.Row.RowStyle = new GridEXFormatStyle(formatCondition.FormatStyle);
     }
 }
Exemplo n.º 2
0
 private void gridDienThoai_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         HienThiAnhTrangThai_MauChu(e.Row);
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 3
0
 private void dgvData_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record)
     {
         //e.Row.BeginEdit();
         e.Row.Cells["Description"].Value = CalculateDetailValue(e.Row);
         //e.Row.Cells["DAG_ID"]._Value = txtCode.Text;
         //e.Row.EndEdit();
     }
 }
Exemplo n.º 4
0
        private void gridEX1_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            CSKHChiTiet objCSKH = (CSKHChiTiet)e.Row.DataRow;

            if (objCSKH.LAN1_Gio == DateTime.MinValue)
            {
                e.Row.Cells["LAN1_Gio"].Text = "";
            }
            if (objCSKH.LAN2_Gio == DateTime.MinValue)
            {
                e.Row.Cells["LAN2_Gio"].Text = "";
            }
            if (objCSKH.LAN3_Gio == DateTime.MinValue)
            {
                e.Row.Cells["LAN3_Gio"].Text = "";
            }
            else
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.BackColor = Color.Yellow;
                e.Row.RowStyle     = RowStyle;
            }
            if (objCSKH.LAN4_Gio == DateTime.MinValue)
            {
                e.Row.Cells["LAN4_Gio"].Text = "";
            }
            else
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.BackColor = Color.Red;
                e.Row.RowStyle     = RowStyle;
            }

            if (objCSKH.CSKH_Lan1_Gio == DateTime.MinValue)
            {
                e.Row.Cells["CSKH_Lan1_Gio"].Text = "";
            }
            if (objCSKH.CSKH_Lan2_Gio == DateTime.MinValue)
            {
                e.Row.Cells["CSKH_Lan2_Gio"].Text = "";
            }
            if (objCSKH.CSKH_Lan3_Gio == DateTime.MinValue)
            {
                e.Row.Cells["CSKH_Lan3_Gio"].Text = "";
            }
            if (objCSKH.CSKH_Lan4_Gio == DateTime.MinValue)
            {
                e.Row.Cells["CSKH_Lan4_Gio"].Text = "";
            }

            if (objCSKH.GioDonKhach == DateTime.MinValue)
            {
                e.Row.Cells["GioDon"].Text = "";
            }
        }
Exemplo n.º 5
0
 private void gridCustomerTransaction_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     if (e.Row.RowType == RowType.Record & e.Row.Cells.Count > 0)
     {
         DateTime dt          = (DateTime)e.Row.Cells["TransactionDate"].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["TransactionDate"].Text = persianDate;
     }
 }
Exemplo n.º 6
0
 private void gridEX1_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     foreach (int index in this.checkboxes.ToArray())
     {
         int val = Int32.Parse(e.Row.Cells[index].Value.ToString());
         if (val == 0)
         {
             e.Row.Cells[index].Text = "بله";
         }
         else
         {
             e.Row.Cells[index].Text = "خیر";
         }
     }
 }
        private void gridBaoCaoBieuMau1_FormattingRow_1(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            try
            {
                if (e.Row.RowType == RowType.Record)
                {
                    GridEXRow row = e.Row;

                    if (row.Cells["HDTruoc"] != null && row.Cells["HDTruoc"].Value.ToString() == "1")
                    {
                        row.Cells["HDTruoc"].Text = "x";
                    }
                    else
                    {
                        row.Cells["HDTruoc"].Text = "";
                    }
                    if (row.Cells["KhongHDTruoc"] != null && row.Cells["KhongHDTruoc"].Value.ToString() == "1")
                    {
                        row.Cells["KhongHDTruoc"].Text = "x";
                    }
                    else
                    {
                        row.Cells["KhongHDTruoc"].Text = "";
                    }

                    if (row.Cells["HDSau"] != null && row.Cells["HDSau"].Value.ToString() == "1")
                    {
                        row.Cells["HDSau"].Text = "x";
                    }
                    else
                    {
                        row.Cells["HDSau"].Text = "";
                    }

                    if (row.Cells["KhongHDSau"] != null && row.Cells["KhongHDSau"].Value.ToString() == "1")
                    {
                        row.Cells["KhongHDSau"].Text = "x";
                    }
                    else
                    {
                        row.Cells["KhongHDSau"].Text = "";
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 8
0
        private void gridDSXe_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            KiemSoatXeLienLac objKSLL = (KiemSoatXeLienLac)e.Row.DataRow;

            if (objKSLL.ThoiDiemBao == DateTime.MinValue)
            {
                e.Row.Cells["ThoiDiemBao"].Text = "";
            }
            if (objKSLL.TrangThaiTong == 1) // ve mat lien lac Ăn ca
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.ForeColor = Color.Red;
                e.Row.RowStyle     = RowStyle;
            }
            else if (objKSLL.TrangThaiTong == 2) // xe hoat dong
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.ForeColor = Color.Blue;
                e.Row.RowStyle     = RowStyle;
            }
            else if (objKSLL.TrangThaiTong == 3) //  xe vê
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.ForeColor = Color.DeepPink;
                e.Row.Cells["SoHieuXe"].FormatStyle = RowStyle;
            }
            else if (objKSLL.TrangThaiTong == 4) //  xe nghi
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.ForeColor = Color.Gold;
                e.Row.Cells["SoHieuXe"].FormatStyle = RowStyle;
            }
            else if (objKSLL.TrangThaiTong == 5) //  xe
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.ForeColor = Color.Green;
                e.Row.Cells["SoHieuXe"].FormatStyle = RowStyle;
            }

            else
            {
                GridEXFormatStyle RowStyle = new GridEXFormatStyle();
                RowStyle.ForeColor = Color.Black;
                e.Row.Cells["SoHieuXe"].FormatStyle = RowStyle;
            }
        }
Exemplo n.º 9
0
        private void grexTribunalMemberWorkload_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            try
            {
                if (e.Row.DataRow != null)
                {
                    e.Row.Cells["uiVacationUpcoming"].Text = Properties.Resources.UINo; // set default

                    if (e.Row.Cells["VacationUpcoming"].Value != null)
                    {
                        int upcomingVacation;

                        try
                        {
                            if (((System.Data.DataRowView)e.Row.DataRow).Row.IsNull("VacationUpcoming"))
                            {
                                upcomingVacation = 0;
                            }
                            else
                            {
                                upcomingVacation = (int)e.Row.Cells["VacationUpcoming"].Value;
                            }
                        }
                        catch (Exception x)
                        {
                            upcomingVacation = 0;
                        }

                        if (upcomingVacation > 0)
                        {
                            e.Row.Cells["uiVacationUpcoming"].Text = Properties.Resources.UIYes;
                        }
                    }
                }

                UIHelper.FormatDateGridEXColumn("TermExpiryDate", e);
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Exemplo n.º 10
0
 private void grdDieuHanhTheoNgay_FormattingRow(object sender, Janus.Windows.GridEX.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 (Exception ex)
         {
         }
     }
 }
Exemplo n.º 11
0
        private void grexAppealsReadyForAssignment_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            try
            {
                //int last = grexAppealsReadyForAssignment.LastVisibleRow(false);
                //if (e.Row.Position < grexAppealsReadyForAssignment.FirstRow || e.Row.Position > last + 1)
                //    return;

//                CalcSC(e);
                //e.Row.Cells["uiIsCharter"].Text = Properties.Resources.UINA;
                //if ((bool)e.Row.Cells["IsCharter"].Value)
                //{
                //    e.Row.Cells["uiIsCharter"].Text = Properties.Resources.UIYes;
                //}
                UIHelper.FormatDateGridEXColumn("OpenedDate", e);
                UIHelper.FormatDateGridEXColumn("RecDate", e);
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Exemplo n.º 12
0
        private void GridEX1_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            if (e.Row.RowType == RowType.Record)
            {
                decimal result = 0;

                //You can get the values directly from the GridEXRow object
                short   quantity  = (short)e.Row.Cells["Quantity"].Value;
                decimal unitPrice = (decimal)e.Row.Cells["UnitPrice"].Value;
                float   discount  = (float)e.Row.Cells["Discount"].Value;
                result = Convert.ToDecimal(quantity) * unitPrice * Convert.ToDecimal(1 - discount);

                /*
                 * //or you can get the values from the Order_DetailsRow this GridEXRow represents.
                 * System.Data.DataRowView rowView = (System.Data.DataRowView)e.Row.DataRow;
                 * NorthWind.Order_DetailsRow detail = (NorthWind.Order_DetailsRow)rowView.Row;
                 *
                 * result = Convert.ToDecimal(detail.Quantity) * detail.UnitPrice * Convert.ToDecimal(((float)1-detail.Discount));
                 */
                e.Row.Cells["Total"].Value = result;
            }
        }
Exemplo n.º 13
0
		private void grdGroupList_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
		{
			if (e.Row.Cells.Count > 0)
			{
				if (e.Row.Cells["HeaderCaption"].Text.Length == 0)
				{
					e.Row.Cells["HeaderCaption"].Text = "New group";
				}
				GridEXGroup group = (GridEXGroup)e.Row.DataRow;
				if (group.CustomGroup != null)
				{
					if (group.CustomGroup.CustomGroupType == CustomGroupType.CompositeColumns)
					{
						e.Row.Cells["HeaderCaption"].ImageIndex = 7;
					}
					else
					{
						e.Row.Cells["HeaderCaption"].ImageIndex = 1;

					}
				}
				else
				{
					if (group.Column != null)
					{
						e.Row.Cells["HeaderCaption"].ImageIndex = 3;
					}
					else
					{
						e.Row.Cells["HeaderCaption"].ImageIndex = 4;
					}

				}

			}

		}
Exemplo n.º 14
0
 private void gridEX1_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
 }
 private void grdMoiGioiCuocGoiThap_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     HienThiTrangThaiChu(e.Row);
 }
Exemplo n.º 16
0
 private void gridBaoCaoBieuMau1_FormattingRow_1(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     DinhDangCells(e.Row);
 }
 private void grdBaoCaoGiaiQuyet_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     HienThiTrangThaiChu(e.Row);
 }