Example #1
0
        protected void grdAllergy_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
        {
            try
            {
                if (e.Row.Items.FindItemByKey("ReactionNotes") != null && !String.IsNullOrEmpty(e.Row.Items.FindItemByKey("ReactionNotes").Text))
                {
                    e.Row.Items.FindItemByKey("ReactionsIcon").CssClass = "CmtNotes";
                }
                if (e.Row.Items.FindItemByKey("Notes") != null && !String.IsNullOrEmpty(e.Row.Items.FindItemByKey("Notes").Text))
                {
                    e.Row.Items.FindItemByKey("NotesIcon").CssClass = "CmtNotes";
                }

                if (e.Row.Items.FindItemByKey("Isactive") != null && !String.IsNullOrEmpty(e.Row.Items.FindItemByKey("Isactive").Text) && e.Row.Items.FindItemByKey("Isactive").Text == "1")
                {
                    e.Row.CssClass = "grdAllergy_row_color";
                }


                e.Row.Items.FindItemByKey("AllergyReactionNotes").Text = string.Empty;
                e.Row.Items.FindItemByKey("AllergyNotes").Text         = string.Empty;
            }
            catch (Exception)
            {
                KPITrace.Debug(TraceWeight.Five, "Calling medical Allergy screen grid initialize row");
                WrtActivityLog(long.MinValue, " Calling medical Allergy screen grid initialize row.");
            }
        }
        void gridWebGrid_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
        {
            int columnCount = gridWebGrid.Columns.Count;

            //清除原来的格式,字体变为黑色
            for (int i = 0; i < columnCount; i++)
            {
                string strScript = string.Format(@"
                         $('#gridWebGrid').children('table').children('tbody').children('tr').children('td').children('table').children('tbody:eq(1)').children('tr').children('td').children('div').children('table').children('tbody').children('tr:eq({0})').children('td:eq({1})').css('color','black');
                               ",
                                                 e.Row.Index, i);

                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), Guid.NewGuid().ToString(), strScript, true);
            }
            //定义格式,有错误的行字体变为红色
            if (!string.IsNullOrEmpty(e.Row.Items.FindItemByKey("CheckResult").Text))
            {
                for (int i = 0; i < columnCount; i++)
                {
                    string strScript = string.Format(@"
                         $('#gridWebGrid').children('table').children('tbody').children('tr').children('td').children('table').children('tbody:eq(1)').children('tr').children('td').children('div').children('table').children('tbody').children('tr:eq({0})').children('td:eq({1})').css('color','red');
                               ",
                                                     e.Row.Index, i);

                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), Guid.NewGuid().ToString(), strScript, true);
                }
            }
        }
        void gridWebGrid_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
        {
            string strScript = string.Format(@"
                         $('#gridWebGrid').children('table').children('tbody').children('tr').children('td').children('table').children('tbody:eq(1)').children('tr').children('td').children('div').children('table').children('tbody').children('tr:eq({0})').children('td:eq({1})').css('background-color','#fffcf0');
                               ",
                                             e.Row.Index, e.Row.Items.FindItemByKey("DisplayDesc").Column.Index);

            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), Guid.NewGuid().ToString(), strScript, true);
        }
Example #4
0
        void gridWebGrid_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
        {
            e.Row.Items.FindItemByKey("MaintenanceMemo").CssClass = "CellBackColor";
            string strScript = string.Format(@"
                         $('#gridWebGrid').children('table').children('tbody').children('tr').children('td').children('table').children('tbody:eq(1)').children('tr').children('td').children('div').children('table').children('tbody').children('tr:eq({0})').children('td:eq(11)').css('background-color','#fffdf1');
                               ", e.Row.Index);

            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), Guid.NewGuid().ToString(), strScript, true);
        }
 void gridWebGrid_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
 {
     if (qty.ActualQty < qty.CurrentQty && qty.MaintainDate == 0)
     {
         DateTime dtEnd = Convert.ToDateTime(FormatHelper.ToDateString(qty.Day) + " " + FormatHelper.ToTimeString(qty.TPEndTime));
         if (dtEnd < DateTime.Now)
         {
             e.Row.CssClass = "ForeColorRed";
         }
     }
 }
Example #6
0
 protected void grdDiabetic_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
 {
     try
     {
         if (e.Row.Items.FindItemByKey("ActionNotes") != null && !String.IsNullOrEmpty(e.Row.Items.FindItemByKey("ActionNotes").Text))
         {
             e.Row.Items.FindItemByKey("C").CssClass = "CmtNotes";
         }
         e.Row.Items.FindItemByKey("DiabeticNotes").Text = string.Empty;
     }
     catch (Exception)
     {
         KPITrace.Debug(TraceWeight.Five, "Calling medical Diabetic screen grid initialize row");
         WrtActivityLog(long.MinValue, " Calling medical Diabetic screen grid initialize row.");
     }
 }
Example #7
0
 void gridWebGrid_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
 {
     e.Row.Items.FindItemByKey("DOCNAME").CssClass = "LinkFontBlue";
 }
Example #8
0
 void gridWebGrid_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
 {
     e.Row.Items.FindItemByKey("Memo").CssClass = "ForeColorRed CellBackColor";
 }
Example #9
0
        protected void grdMedicalHist_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
        {
            try
            {
                Infragistics.Web.UI.GridControls.ContainerGridRecord row       = (Infragistics.Web.UI.GridControls.ContainerGridRecord)e.Row;
                Infragistics.Web.UI.GridControls.ContainerGrid       ownerGrid = row.Owner.ControlMain;
                Infragistics.Web.UI.GridControls.IBand band = ownerGrid.Band;
                if (((ContainerGridRecord)e.Row).Level == 0)
                {
                    if (State.gMultiJuris && KPIHlp.CVI32(hdnJurisId.Value) != Int32.MinValue && KPIHlp.CVI32(hdnJurisId.Value) != State.sJurisID)
                    {
                        e.Row.Items.FindItemByKey("KPIJurisAlias").Column.Hidden = false;
                        e.Row.Items.FindItemByKey("KPIJurisAlias").Column.Width  = Unit.Percentage(5);
                        e.Row.Items.FindItemByKey("FullName").Column.Width       = Unit.Percentage(35);
                    }
                    else
                    {
                        e.Row.Items.FindItemByKey("FullName").Column.Width       = Unit.Percentage(40);
                        e.Row.Items.FindItemByKey("KPIJurisAlias").Column.Hidden = true;
                    }


                    if (!String.IsNullOrEmpty(hdnSubAgencyParam.Value) && hdnSubAgencyParam.Value == "1")
                    {
                        e.Row.Items.FindItemByKey("SubAgencyCode").Column.Width = Unit.Percentage(5);
                        e.Row.Items.FindItemByKey("SubAgencyCode").Tooltip      = e.Row.Items.FindItemByKey("SubAgencyName").Text;
                        e.Row.Items.FindItemByKey("DentistDoctor").Column.Width = Unit.Percentage(20);
                    }
                    else
                    {
                        e.Row.Items.FindItemByKey("DentistDoctor").Column.Width  = Unit.Percentage(25);
                        e.Row.Items.FindItemByKey("SubAgencyCode").Column.Hidden = true;
                    }
                }

                else if (((ContainerGridRecord)e.Row).Level == 2)
                {
                    switch (e.Row.Items.FindItemByKey("MasterColumn").Text)
                    {
                    case "Medical Alerts":
                        e.Row.Items.FindItemByKey("Description").Column.Header.Text = "Flag";
                        e.Row.Items.FindItemByKey("MedicalVisitNo").Column.Hidden   = true;
                        break;

                    case "TB Result":
                        e.Row.Items.FindItemByKey("Description").Column.Header.Text = "TB Result";
                        break;

                    case "Diagnosed Conditions":
                        e.Row.Items.FindItemByKey("Description").Column.Header.Text = "Diagnosed Condition";
                        break;

                    case "Drugs":
                        e.Row.Items.FindItemByKey("VisitDttm").Column.Header.Text      = "Date Prescribed";
                        e.Row.Items.FindItemByKey("Description").Column.Header.Text    = "Drug Name";
                        e.Row.Items.FindItemByKey("MedicalVisitNo").Column.Header.Text = "Balance";

                        if (e.Row.Items.FindItemByKey("IsActive").Text == "1")
                        {
                            e.Row.CssClass = "grdAllergy_row_color";
                        }
                        else
                        {
                            if (!String.IsNullOrWhiteSpace(e.Row.Items.FindItemByKey("MedicalVisitNo").Text) && KPIHlp.CVI32(e.Row.Items.FindItemByKey("MedicalVisitNo").Text) <= 5)
                            {
                                e.Row.CssClass = "grdDrugs_row_color";
                            }
                        }
                        break;

                    case "Hospital Facility":
                        e.Row.Items.FindItemByKey("Description").Column.Header.Text = "Admitted to Medical Facility";
                        break;

                    case "Dental Procedure":
                        e.Row.Items.FindItemByKey("Description").Column.Header.Text = "Procedure";
                        break;

                    case "Special Meal Required":
                        e.Row.Items.FindItemByKey("Description").Column.Header.Text = "Special Meal Required";
                        break;

                    case "Allergy":
                        e.Row.Items.FindItemByKey("Description").Column.Header.Text = "Allergy";
                        e.Row.Items.FindItemByKey("MedicalVisitNo").Column.Hidden   = true;
                        if (e.Row.Items.FindItemByKey("IsActive").Text == "1")
                        {
                            e.Row.CssClass = "grdAllergy_row_color";
                        }
                        break;
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }