Esempio n. 1
0
 void gridFileList_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     //if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record)
     //{
     //    e.Row.Cells["Created"].Value = "Created";
     //}
 }
Esempio n. 2
0
        /// <summary>
        /// Điều chỉnh dữ liệu khi được load vào grid
        /// </summary>
        /// <Modified>
        ///     Author      Date        Comments
        ///     Cuongdb    19/2/2008    Tạo mới
        /// </Modified>
        private void grdKetQuaTimKiem_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            int Position = e.Row.Position + 1;

            Janus.Windows.GridEX.GridEXCell cell = (Janus.Windows.GridEX.GridEXCell)e.Row.Cells[0];
            cell.Text = Position.ToString();
        }
Esempio n. 3
0
 private void sRPGridEX_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record)
         {
             DataRowView dv   = (DataRowView)e.Row.DataRow;
             string      fees = dv["FeesClaimed"].ToString();
             if (fees != null & fees != "")
             {
                 e.Row.Cells["TotalTime"].Text = Convert.ToDecimal(fees).ToString();// UIHelper.FormatMinutes(Convert.ToInt32(Convert.ToDecimal(fees)));
             }
             else
             {
                 e.Row.Cells["TotalTime"].Text = "0";// UIHelper.FormatMinutes(0);
             }
         }
         //if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record && (decimal)e.Row.Cells["FeesClaimed"].Text.Length > 0)
         //    e.Row.Cells["TotalTime"].Text = UIHelper.FormatMinutes(decimal.ToInt32((decimal)e.Row.Cells["FeesClaimed"].Value));
         else
         {
             e.Row.Cells["TotalTime"].Text = UIHelper.FormatMinutes(0);
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Esempio n. 4
0
        private void gridTheoGio_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            if (e.Row.RowType == Janus.Windows.GridEX.RowType.TotalRow)
            {
                //TongTaxi,  TongDonDuoc, TongTruotHoan, TongKhongXe,TongKhongXacDinh, PhanTramDonDuoc,PhanTramTruotHoan,PhanTramKhongXe, ,PhanTramKhongXacDinh
                double TongTaxi         = (double)e.Row.Cells["TongTaxi"].Value;
                double TongDonDuoc      = (double)e.Row.Cells["TongDonDuoc"].Value;
                double TongTruotHoan    = ( double)e.Row.Cells["TongTruotHoan"].Value;
                double TongKhongXe      = (double)e.Row.Cells["TongKhongXe"].Value;
                double TongKhongXacDinh = (double)e.Row.Cells["TongKhongXacDinh"].Value;

                if (TongTaxi != 0)
                {
                    double PhanTramDonDuoc      = TongDonDuoc / TongTaxi * 100;
                    double PhanTramTruotHoan    = TongTruotHoan / TongTaxi * 100;
                    double PhanTramKhongXe      = TongKhongXe / TongTaxi * 100;
                    double PhanTramKhongXacDinh = TongKhongXacDinh / TongTaxi * 100;

                    //e.Row.Cells["PhanTramDonDuoc"].Value = PhanTramDonDuoc;
                    e.Row.Cells["PhanTramDonDuoc"].Text = string.Format("{0:#.##}", PhanTramDonDuoc);

                    // e.Row.Cells["PhanTramTruotHoan"].Value = PhanTramTruotHoan;
                    e.Row.Cells["PhanTramTruotHoan"].Text = string.Format("{0:#.##}", PhanTramTruotHoan);

                    //e.Row.Cells["PhanTramKhongXe"].Value = PhanTramKhongXe;
                    e.Row.Cells["PhanTramKhongXe"].Text = string.Format("{0:#.##}", PhanTramKhongXe);

                    // e.Row.Cells["PhanTramKhongXacDinh"].Value = PhanTramKhongXacDinh;
                    e.Row.Cells["PhanTramKhongXacDinh"].Text = string.Format("{0:#.##}", PhanTramKhongXacDinh);
                }
            }
        }
Esempio n. 5
0
 private void attendeeGridEX_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (e.Row.Cells["Accepted"].Value != null && (bool)e.Row.Cells["Accepted"].Value == true)
         {
             e.Row.Cells["AttendeeStatus"].Value = Properties.Resources.apptAccepted;
         }
         if (e.Row.Cells["Tentative"].Value != null && (bool)e.Row.Cells["Tentative"].Value == true)
         {
             e.Row.Cells["AttendeeStatus"].Value = Properties.Resources.apptTentative;
         }
         if (e.Row.Cells["Declined"].Value != null && (bool)e.Row.Cells["Declined"].Value == true)
         {
             e.Row.Cells["AttendeeStatus"].Value = Properties.Resources.apptDeclined;
         }
         if (e.Row.Cells["ContactId"].Value != null)
         {
             int contactID = 0;
             if (int.TryParse(e.Row.Cells["ContactId"].Value.ToString(), out contactID))
             {
                 LoadAttendeeContacts(contactID);
             }
         }
     }
     catch (Exception x)
     {
         //  UIHelper.HandleUIException(x);
     }
 }
 private void gridDienThoai_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 7
0
 private void activityBFGridEX_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         lmWinHelper.FormatGridRowBFIsUnread(FM, e.Row);
         lmWinHelper.FormatGridRowBFDate(FM, e.Row);
     }
     catch (Exception x)
     {
         System.Diagnostics.Trace.WriteLine(x.Message);
     }
 }
Esempio n. 8
0
 private void radGridView1_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     //e.Row
     if (e.Row != null && e.Row.DataRow != null)
     {
         DataRow row = ((DataRowView)e.Row.DataRow).Row;
         if ((bool)row["tmp_Validated"] == false)
         {
             e.Row.RowStyle           = new Janus.Windows.GridEX.GridEXFormatStyle();
             e.Row.RowStyle.ForeColor = Color.Red;
         }
     }
 }
Esempio n. 9
0
 private void secFeatureGridEX_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (e.Row.IsChecked)
         {
             e.Row.Cells["Message"].Text = "Feature will be added to the rule";
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Esempio n. 10
0
        private void documentGridEX_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            try
            {
                if (e.Row.DataRow == null)
                {
                    return;
                }
                docDB.DocumentRow dr = (docDB.DocumentRow)((DataRowView)e.Row.DataRow).Row;
                if (dr == null)
                {
                    return;
                }

                if (!dr.IsSizeNull())
                {
                    e.Row.Cells["Size"].Text = String.Format("{0} kb", dr.Size / 1024);
                }

                if (!dr.IsSentToShareFolderNull())
                {
                    if (dr.SentToShareFolder == 2)
                    {
                        e.Row.Cells["SentToShareFolder"].Image = Properties.Resources.SentToShareSuccess;
                    }
                    else if (dr.SentToShareFolder == 3)
                    {
                        e.Row.Cells["SentToShareFolder"].Image = Properties.Resources.SentToShareFail;
                    }
                }

                if (myDM == null || myDM.FM.IsVirtualFM || dr.IsNull("FileId"))
                {
                    return;
                }

                //JLL: When Selecting Add Doc/Record/Send from ucRecords action, dr.fileid is null, making below statement fail
                if (dr.FileId != myDM.FM.CurrentFile.FileId)
                {
                    Janus.Windows.GridEX.GridEXFormatStyle fmt = new Janus.Windows.GridEX.GridEXFormatStyle();
                    fmt.BackColor  = Color.LightYellow;
                    e.Row.RowStyle = fmt;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
        private void gridResultado_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            //gridResultado.GroupsChanged +=new Janus.Windows.GridEX.GroupsChangedEventHandler(gridResultado_GroupsChanged);
            //gridResultado.GroupsChanging += new Janus.Windows.GridEX.GroupsChangingEventHandler(gridResultado_GroupsChanging);
            if (e.Row.RowType.Equals(Janus.Windows.GridEX.RowType.GroupHeader))
            {
                Janus.Windows.GridEX.GridEXFormatStyle style = new Janus.Windows.GridEX.GridEXFormatStyle();
                //style.BackColor = (Color)_mapGroupfis[e.Row.Group.Index];
                if (_mapGroupForegroundColors.ContainsKey(e.Row.Group.Index))
                {
                    style.ForeColor = (Color)_mapGroupForegroundColors[e.Row.Group.Index];
                }
                else
                {
                    style.ForeColor = Color.DimGray;
                }
                style.FontBold = Janus.Windows.GridEX.TriState.True;
                e.Row.RowStyle = style;
            }
            if (e.Row.RowType.Equals(Janus.Windows.GridEX.RowType.GroupFooter))
            {
                Janus.Windows.GridEX.GridEXFormatStyle style = new Janus.Windows.GridEX.GridEXFormatStyle();
                if (_mapGroupForegroundColors.ContainsKey(e.Row.Group.Index))
                {
                    style.ForeColor = (Color)_mapGroupForegroundColors[e.Row.Group.Index];
                }
                else
                {
                    style.ForeColor = Color.DimGray;
                }
                style.FontBold = Janus.Windows.GridEX.TriState.True;
                e.Row.RowStyle = style;
            }
            if (e.Row.RowType.Equals(Janus.Windows.GridEX.RowType.Record))
            {
                Janus.Windows.GridEX.GridEXFormatStyle style = new Janus.Windows.GridEX.GridEXFormatStyle();
                //style.ForeColor = Color.Transparent;
                e.Row.RowStyle = style;
            }

            /*
             * if(e.Row.RowType.Equals(Janus.Windows.GridEX.RowType.TotalRow))
             * {
             *      Janus.Windows.GridEX.GridEXFormatStyle style = new Janus.Windows.GridEX.GridEXFormatStyle();
             *      style.BackColor = Color.Pink;
             *      e.Row.RowStyle = style;
             * }
             */
        }
Esempio n. 12
0
 private void gridExRoleLegend_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         string sColor = e.Row.Cells["Color"].Text.ToString();
         Color  cColor = Color.FromArgb(Convert.ToInt32(sColor));
         Janus.Windows.GridEX.GridEXFormatStyle gfs = new Janus.Windows.GridEX.GridEXFormatStyle();
         gfs.BackColor  = cColor;
         e.Row.RowStyle = gfs;
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Esempio n. 13
0
        private void activityBFGridEX_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            try
            {
                lmWinHelper.FormatGridRowBFOfficer(e.Row);
                lmWinHelper.FormatGridRowBFDateLoading(e.Row);

                atriumDB.ActivityBFRow abfr = (atriumDB.ActivityBFRow)((DataRowView)e.Row.DataRow).Row;
                e.Row.Cells["StepCode"].Value = abfr.ActivityRow.StepCode;
            }
            catch (Exception x)
            {
                System.Diagnostics.Trace.WriteLine(x.Message);
            }
        }
Esempio n. 14
0
 private void gridDienThoai_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         DieuHanhTaxi objDieuHanhTaxi = (DieuHanhTaxi)e.Row.DataRow;
         //  if (e.Row.Cells["XeDon"].Value.ToString().Length > 0)
         //    ((CheckBox) e.Row.Cells["DonDuoc"].Value) .Checked =true;
         if (objDieuHanhTaxi.XeDon.Length > 0)
         {
             e.Row.Cells ["DonDuoc"].Text = true.ToString();
         }
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 15
0
 private void secRuleGridEX_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record && e.Row.Table.Key.ToUpper() == "SECRULE")
         {
             SecurityDB.secRuleRow         srr  = (SecurityDB.secRuleRow)((DataRowView)e.Row.DataRow).Row;
             SecurityDB.secPermissionRow[] sprs = (SecurityDB.secPermissionRow[])mySecMan.DB.secPermission.Select("RuleId=" + srr.RuleId);
             e.Row.Cells["FeaturesCount"].Text = sprs.Length.ToString();
         }
     }
     catch (Exception x)
     {
         throw x;
     }
 }
Esempio n. 16
0
        private void fileContactGridEX_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            try
            {
                // gridex isParty value list:
                // 1 - appellant
                // 2 - respondent
                // 3 - added party
                // 4 - none of the above

               int fcId = (int)e.Row.Cells["FileContactid"].Value;
               if (FM.GetSSTMng() != null)
               {
                   foreach (SST.FilePartyRow fpr in FM.GetSSTMng().DB.FileParty)
                   {
                       if (fpr.RowState != DataRowState.Deleted && !fpr.IsFileContactIdNull() && fpr.FileContactId == fcId)
                       {
                           if (fpr.IsPending)
                               e.Row.Cells["IsPending"].Value = true;

                           if (fpr.IsAppellant)
                               e.Row.Cells["IsParty"].Value = 1;
                           else if (fpr.IsRespondent)
                               e.Row.Cells["IsParty"].Value = 2;
                           else
                               e.Row.Cells["IsParty"].Value = 3;
                           return;
                       }
                       else
                           e.Row.Cells["IsParty"].Value = 4;
                   }
               }
               else
               {
                   atriumDB.FileContactRow fcr = FM.DB.FileContact.FindByFileContactid(fcId);
                   if(fcr.ContactClass=="O")
                       e.Row.Cells["IsOfficer"].Value = true;
                   else
                       e.Row.Cells["IsOfficer"].Value = false;
               }

            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Esempio n. 17
0
        private void timeSlipGridEX_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            try
            {
                if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record || e.Row.RowType == Janus.Windows.GridEX.RowType.GroupHeader || e.Row.RowType == Janus.Windows.GridEX.RowType.TotalRow)
                {
                    //  if (e.Row.Cells["Hours"].Value != null && e.Row.Cells["Hours"].Text != "")
                    //      e.Row.Cells["Hours"].Text = UIHelper.FormatMinutes(decimal.ToInt32((decimal)e.Row.Cells["Hours"].Value));

                    e.Row.Cells["Filename"].ToolTipText = e.Row.Cells["FullPath"].Text;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Esempio n. 18
0
 private void addressGridEX_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (!CurrentRow().IsAddressCurrentIDNull())
         {
             if (e.Row.Cells["AddressId"].Value.ToString() == CurrentRow().AddressCurrentID.ToString())
             {
                 e.Row.Cells["isCurrentAddress"].Value = true;
             }
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Esempio n. 19
0
 private void sRPClientGridEX_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record && (decimal)e.Row.Cells["Minutes"].Text.Length > 0)
         {
             e.Row.Cells["TotalTime"].Text = Convert.ToDecimal(e.Row.Cells["Minutes"].Value).ToString("#.0#"); // UIHelper.FormatMinutes(decimal.ToInt32((decimal)e.Row.Cells["Minutes"].Value));
         }
         else
         {
             e.Row.Cells["TotalTime"].Text = "0";// UIHelper.FormatMinutes(0);
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Esempio n. 20
0
 private void filePartyGridEX_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (e.Row.Cells["IsPending"].Value != null && e.Row.Cells["IsPending"].Value.ToString() != "" && (bool)e.Row.Cells["IsPending"].Value == true)
         {
             e.Row.Cells["Icon"].Value = "PP";
         }
         if (e.Row.Cells["IsAppellant"].Value != null && e.Row.Cells["IsAppellant"].Value.ToString() != "" && (bool)e.Row.Cells["IsAppellant"].Value == true)
         {
             e.Row.Cells["Icon"].Value = "APP";
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Esempio n. 21
0
 private void AccountIncludedGridEx_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         int            faId = (int)e.Row.Cells["FileAccountId"].Value;
         CLAS.DebtRow[] dr   = (CLAS.DebtRow[])FM.GetCLASMng().DB.Debt.Select("FileAccountId=" + faId, "");
         if (dr.Length == 1)
         {
             //JLL: can't translate AccountTypeDescEng to Fre as AccountTypeDescFre not in dataset
             //it will be for another day
             e.Row.Cells["DARSAccountType"].Value = dr[0].AccountTypeCode + " - " + dr[0].DARSAccountType + " - " + dr[0].AccountTypeDescEng;
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
 private void grdDieuHanhTheoDonVi_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     if (e.Row.RowType == Janus.Windows.GridEX.RowType.GroupFooter)
     {
         try
         {
             double donDuoc  = Convert.ToDouble(e.Row.Cells["TongDonDuoc"].Value.ToString());
             double cuocTaxi = Convert.ToDouble(e.Row.Cells["TongCuocTaxi"].Value.ToString());
             if (cuocTaxi > 0)
             {
                 e.Row.Cells["PhanTramDonDuoc"].Text = string.Format("{0:#.#}", Convert.ToDouble(donDuoc / cuocTaxi * 100));
             }
         }
         catch
         {
         }
     }
 }
Esempio n. 23
0
 private void fileContactGridEX_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (fileContactGridEX.CurrentRow != null && e.Row.RowType == Janus.Windows.GridEX.RowType.Record && e.Row.Cells["IsLoaded"].Value == null && e.Row.Cells["ContactId"].Value != null && e.Row.Cells["ContactId"].Value.ToString().Length > 0)
         {
             e.Row.BeginEdit();
             if (e.Row.Cells["OfficerCode"].Value.ToString().Length > 0)
             {
                 officeDB.OfficerRow offrow = myfmAB.LeadOfficeMng.GetOfficer().LoadByOfficerCode(e.Row.Cells["OfficerCode"].Value.ToString());
                 if (!offrow.IsActiveNull() && offrow.Active)
                 {
                     e.Row.Cells["icon"].Value = 2; //active user
                 }
                 else
                 {
                     e.Row.Cells["icon"].Value = 1; //officer - non-user
                 }
             }
             else
             {
                 if (myfmAB.GetFileContact().IsADebtor((int)e.Row.Cells["ContactId"].Value))                 // is a debtor
                 {
                     e.Row.Cells["icon"].Value = 3;                                                          //debtor
                 }
                 else if (myfmAB.GetFileContact().FileContactCount((int)e.Row.Cells["ContactId"].Value) > 1) // is a shared plain contact
                 {
                     e.Row.Cells["icon"].Value = 4;                                                          //person, shared
                 }
                 else
                 {
                     e.Row.Cells["icon"].Value = 0; //contact, standalone - not shared
                 }
             }
             e.Row.Cells["IsLoaded"].Value = true;
             e.Row.EndEdit();
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Esempio n. 24
0
 private void gridResultado_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record)
     {
         foreach (Janus.Windows.GridEX.GridEXFormatCondition cnd in gridResultado.RootTable.FormatConditions)
         {
             if (cnd.Value1.GetType().Name.Equals("GridEXColumn"))
             {
                 Janus.Windows.GridEX.GridEXColumn col = (Janus.Windows.GridEX.GridEXColumn)cnd.Value1;
                 decimal valor1 = (decimal)e.Row.Cells[cnd.Column.Key].Value;
                 decimal valor2 = (decimal)e.Row.Cells[col.Key].Value;
                 if (valor1 > valor2)
                 {
                     e.Row.RowStyle = cnd.FormatStyle;
                 }
             }
         }
     }
 }
Esempio n. 25
0
 private void iRPGridEX_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (e.Row != null && e.Row.DataRow != null && e.Row.RowType == Janus.Windows.GridEX.RowType.Record)
         {
             if (e.Row.Cells["OfficerCode"].Text != "")
             {
                 e.Row.Cells["OfficerNameCode"].Text = e.Row.Cells["OfficerID"].Text + " (" + e.Row.Cells["OfficerCode"].Text + ")";
             }
             else
             {
                 e.Row.Cells["OfficerNameCode"].Text = "";
             }
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Esempio n. 26
0
        private void documentGridEX_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            try
            {
                if (e.Row.DataRow == null)
                {
                    return;
                }
                docDB.DocumentRow dr = (docDB.DocumentRow)((DataRowView)e.Row.DataRow).Row;
                if (dr == null)
                {
                    return;
                }

                e.Row.Cells["CheckedOut"].Value = !dr.IsCheckedOutByNull();
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Esempio n. 27
0
        private void secRuleGridEX_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            if (e.Row.RowType == Janus.Windows.GridEX.RowType.Record)
            {
                if (e.Row.Table.Key == "FK_secPermission_secRule")
                {
                    SecurityDB.secPermissionRow spr = (SecurityDB.secPermissionRow)((DataRowView)e.Row.DataRow).Row;
                    if (spr.RowState == DataRowState.Added)
                    {
                        e.Row.Cells["State"].Value = 1;
                    }
                    else if (spr.RowState == DataRowState.Modified)
                    {
                        e.Row.Cells["State"].Value = 2;
                    }
                    else
                    {
                        e.Row.Cells["State"].Value = 0;
                    }
                }

                if (e.Row.Table.Key.ToUpper() == "SECRULE")
                {
                    SecurityDB.secRuleRow spr = (SecurityDB.secRuleRow)((DataRowView)e.Row.DataRow).Row;
                    if (spr.RowState == DataRowState.Added)
                    {
                        e.Row.Cells["State"].Value = 1;
                    }
                    else if (spr.RowState == DataRowState.Modified)
                    {
                        e.Row.Cells["State"].Value = 2;
                    }
                    else
                    {
                        e.Row.Cells["State"].Value = 0;
                    }
                }
            }
        }
Esempio n. 28
0
        private void HearingGridEX_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
        {
            try
            {
                string timeZone = UIHelper.GetAcronymTimeZoneLabel();

                SST.HearingRow hearingRow = (SST.HearingRow)((DataRowView)e.Row.DataRow).Row;
                if (!hearingRow.IsNull("ApptId"))
                {
                    var fcx = from fc in FM.DB.Appointment
                              where fc.ApptId == hearingRow.ApptId
                              select fc;

                    atriumDB.AppointmentRow apptRow;

                    if (fcx.Count() == 1)
                    {
                        apptRow = fcx.Single();
                    }
                    else
                    {
                        apptRow = FM.GetAppointment().Load(hearingRow.ApptId);
                    }

                    if (FM.AppMan.Language.ToUpper() == "ENG")
                    {
                        e.Row.Cells["StartDate"].Value = apptRow.StartDateLocal.ToString("MMMM dd, yyyy @ hh:mm tt", System.Globalization.CultureInfo.CreateSpecificCulture("en-CA")) + " " + timeZone;
                    }
                    else
                    {
                        e.Row.Cells["StartDate"].Value = apptRow.StartDateLocal.ToString("dd MMMM yyyy à HH:mm", System.Globalization.CultureInfo.CreateSpecificCulture("fr-CA")) + " " + timeZone;
                    }
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Esempio n. 29
0
 private void templateGridEX_LoadingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (e.Row.Cells["LetterName"].Value != null)
         {
             string tCode   = e.Row.Cells["LetterName"].Value.ToString();
             int    posDash = tCode.IndexOf("-");
             if (posDash != -1)
             {
                 e.Row.Cells["TemplatePrefix"].Value = tCode.Substring(0, posDash);
             }
             else // no dash
             {
                 e.Row.Cells["TemplatePrefix"].Value = e.Row.Cells["LetterName"].Value.ToString();
             }
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Esempio n. 30
0
 private void ddFieldGridEX_FormattingRow(object sender, Janus.Windows.GridEX.RowLoadEventArgs e)
 {
     try
     {
         if (e.Row.Cells["FieldId"].Value != null)
         {
             int       fieldid      = (int)e.Row.Cells["FieldId"].Value;
             DataRow[] arrRelFields = dtReferencedInSteps.Select("FieldId=" + fieldid);
             if (arrRelFields.Length > 0)
             {
                 e.Row.Cells["ReferenceCount"].Text = arrRelFields.Length.ToString();
             }
             else
             {
                 e.Row.Cells["ReferenceCount"].Text = "";
             }
         }
     }
     catch (Exception x)
     {
         //  UIHelper.HandleUIException(x);
     }
 }