Example #1
0
    protected void ugrdDeptKpi_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        CheckBox        chkCheck;
        TemplatedColumn Col_Check = (TemplatedColumn)e.Row.Band.Columns.FromKey("selchk");

        chkCheck = (CheckBox)((CellItem)Col_Check.CellItems[e.Row.BandIndex]).FindControl("cBox");

        //e.Row.Cells.FromKey("APP_STATUS_NAME").Value = "Y";

        //if (e.Row.Cells.FromKey("APP_STATUS").Value != null)
        //{
        //    if (e.Row.Cells.FromKey("APP_STATUS").Value.ToString() != Biz_Type.app_status_complete)
        //    {
        //        chkCheck.Enabled = false;
        //        e.Row.Cells.FromKey("APP_STATUS_NAME").Value = "N";
        //    }
        //}

        //DataRowView drv = (DataRowView)e.Data;
        //if (drv["COM_DEPT_REF_ID"].ToString() != this.IDEPT_ID.ToString())
        //    chkCheck.Enabled = false;



        string kpi_code = DataTypeUtility.GetValue(e.Row.Cells.FromKey("KPI_POOL_REF_ID").Value);
        string kpi_name = DataTypeUtility.GetValue(e.Row.Cells.FromKey("KPI_NAME").Value);

        string onclick = "<a href='#null' onclick=\"doLinking_Pool('{0}')\">{1}</a>";
        string link    = string.Format(onclick, kpi_code, kpi_name);

        e.Row.Cells.FromKey("KPI_NAME").Value = link;
    }
Example #2
0
    protected void ugrdDraft_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView drw = (DataRowView)e.Data;

        if (drw["CHECK_YN"].ToString() == "N")
        {
            e.Row.Cells.FromKey("CHECK_YN").Text = string.Format("<div class='stext'><img src='../images/icon_x.gif'></div>");
        }
        else
        {
            e.Row.Cells.FromKey("CHECK_YN").Text = string.Format("<div class='stext'><img src='../images/icon_o.gif'></div>");
        }

        if (drw["CHECKSTATUS"].ToString() == "N")
        {
            e.Row.Cells.FromKey("CHECKSTATUS").Text = string.Format("<div class='stext'><img src='../images/icon_x.gif'></div>");
        }
        else
        {
            e.Row.Cells.FromKey("CHECKSTATUS").Text = string.Format("<div class='stext'><img src='../images/icon_o.gif'></div>");
        }

        TemplatedColumn cCol = (TemplatedColumn)e.Row.Band.Columns.FromKey("APP_STATUS");

        System.Web.UI.WebControls.Image objImg = (System.Web.UI.WebControls.Image)((CellItem)cCol.CellItems[e.Row.BandIndex]).FindControl("imgApp");
        string strImg = DataTypeUtility.GetValue(e.Row.Cells.FromKey("APP_STATUS").Value);

        objImg.ImageUrl      = Biz_Com_Approval_Info.GetAppImageUrl(strImg);
        objImg.AlternateText = Biz_Com_Approval_Info.GetAppImageText(strImg);
    }
Example #3
0
 protected void ugrdKpiList_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     //TemplatedColumn cCol = (TemplatedColumn)e.Row.Band.Columns.FromKey("USE_YN");
     //System.Web.UI.WebControls.Image objImg = (System.Web.UI.WebControls.Image)((CellItem)cCol.CellItems[e.Row.BandIndex]).FindControl("imgUseYn");
     //objImg.ImageUrl = (e.Row.Cells.FromKey("USE_YN").Value.ToString() == "Y") ?
     //                  "../images/icon_o.gif" : "../images/icon_x.gif";
 }
Example #4
0
    protected void ugrdMBO_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView drw = (DataRowView)e.Data;

        e.Row.Cells.FromKey("EST_STATUS").Value = string.Format("<img src='{0}' alt='{1}' />", drw["STATUS_IMG_PATH"].ToString(), drw["STATUS_NAME"].ToString());

        //if (IUSERTYPE == 1)
        //{
        //    e.Row.Cells.FromKey("SELECT").Text = string.Format(@"<a href='EST110104_01.aspx?USERTYPE={0}&COMP_ID={1}&ESTTERM_REF_ID={2}&ESTTERM_SUB_ID={3}&ESTTERM_STEP_ID={4}&EST_EMP_ID={5}&EST_DEPT_ID={6}&TGT_EMP_ID={7}&TGT_DEPT_ID={8}'><div class='stext' style='cursor: pointer;'><img src='../images/btn/b_143.gif'></div></a>"
        //                                                        , IUSERTYPE
        //                                                        , ICOMP_ID
        //                                                        , IESTTERM_REF_ID
        //                                                        , IESTTERM_SUB_ID
        //                                                        , e.Row.Cells.FromKey("ESTTERM_STEP_ID").Value.ToString()
        //                                                        , e.Row.Cells.FromKey("EST_EMP_ID").Value.ToString()
        //                                                        , e.Row.Cells.FromKey("EST_DEPT_ID").Value.ToString()
        //                                                        , e.Row.Cells.FromKey("TGT_EMP_ID").Value.ToString()
        //                                                        , e.Row.Cells.FromKey("TGT_DEPT_ID").Value.ToString());
        //}
        //else
        //{
        //    e.Row.Cells.FromKey("SELECT").Text = string.Format(@"<a href='EST110104_01.aspx?USERTYPE={0}&COMP_ID={1}&ESTTERM_REF_ID={2}&ESTTERM_SUB_ID={3}&ESTTERM_STEP_ID={4}&EST_EMP_ID={5}&EST_DEPT_ID={6}&TGT_EMP_ID={7}&TGT_DEPT_ID={8}'><div class='stext' style='cursor: pointer;'><img src='../images/btn/b_143.gif'></div></a>"
        //                                                        , IUSERTYPE
        //                                                        , ICOMP_ID
        //                                                        , IESTTERM_REF_ID
        //                                                        , IESTTERM_SUB_ID
        //                                                        , e.Row.Cells.FromKey("ESTTERM_STEP_ID").Value.ToString()
        //                                                        , e.Row.Cells.FromKey("EST_EMP_ID").Value.ToString()
        //                                                        , e.Row.Cells.FromKey("EST_DEPT_ID").Value.ToString()
        //                                                        , e.Row.Cells.FromKey("TGT_EMP_ID").Value.ToString()
        //                                                        , e.Row.Cells.FromKey("TGT_DEPT_ID").Value.ToString());
        //}
    }
Example #5
0
    protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        string sYYYYMMs, sYYYYMMe;

        string[] saMonthTerm = GetMonthTerm(out sYYYYMMs, out sYYYYMMe);       // 현재
        //double[] dSumPlan = null;
        //double[] dSumResult = null;
        //double dSumPlan2=0
        UltraWebGrid1.Bands[0].Columns[0].MergeCells = true;
        UltraWebGrid1.Bands[0].Columns[1].MergeCells = true;
        UltraWebGrid1.Bands[0].Columns[2].MergeCells = true;

        if (
            Convert.ToString(e.Row.Cells.FromKey("구분").Value) == "집행율"
            )
        {
            for (int i = 0; i < saMonthTerm.Length; i++)
            {
                e.Row.Cells.FromKey(Convert.ToInt32(saMonthTerm[i].Substring(4, 2)) + "월").Value += "%";
            }
            e.Row.Cells.FromKey("합계").Value += "%";
        }

        if (Convert.ToString(e.Row.Cells.FromKey("계정1").Value) == "합계")
        {
            e.Row.Style.BackColor = GetGridColor(gEN_GRID_COLOR.SUBTOTAL_DATA1);
        }
    }
Example #6
0
    protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView dr = (DataRowView)e.Data;

        DataSet      ds          = questionEstMaps.GetQuestionEstMap("", dr["Q_OBJ_ID"].ToString());
        string       returnEstID = "";
        string       est_names   = "";
        Biz_EstInfos estInfo     = null;

        foreach (DataRow row in ds.Tables[0].Rows)
        {
            estInfo = new Biz_EstInfos(COMP_ID, row["EST_ID"].ToString());

            returnEstID += row["EST_ID"].ToString() + ",";
            est_names   += estInfo.Est_Name + ",";
        }

        returnEstID = returnEstID.Substring(0, returnEstID.LastIndexOf(","));
        est_names   = est_names.Substring(0, est_names.LastIndexOf(","));

        e.Row.Cells.FromKey("Q_OBJ_NAME").Value = string.Format("<a href=\"#null\" onclick=\"GetQuestionObjects('{0}','{1}','{2}','{3}','{4}','{5}');\">{3}</a>"
                                                                , returnEstID
                                                                , est_names
                                                                , dr["Q_OBJ_ID"]
                                                                , dr["Q_OBJ_NAME"]
                                                                , dr["Q_OBJ_TITLE"]
                                                                , dr["Q_OBJ_PREFACE"]
                                                                );
    }
Example #7
0
    protected void ugrdKpiResultList_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView drw = (DataRowView)e.Data;

        if (drw["CHECK_YN"].ToString() == "N")
        {
            e.Row.Cells.FromKey("CHECK_YN").Text = string.Format("<div class='stext'><img src='../images/icon_x.gif'></div>");
        }
        else
        {
            e.Row.Cells.FromKey("CHECK_YN").Text = string.Format("<div class='stext'><img src='../images/icon_o.gif'></div>");
        }

        if (drw["CHECKSTATUS"].ToString() == "N")
        {
            e.Row.Cells.FromKey("CHECKSTATUS").Text = string.Format("<div class='stext'><img src='../images/icon_x.gif'></div>");
        }
        else
        {
            e.Row.Cells.FromKey("CHECKSTATUS").Text = string.Format("<div class='stext'><img src='../images/icon_o.gif'></div>");
        }

        if (drw["CONFIRMSTATUS"].ToString() == "N")
        {
            e.Row.Cells.FromKey("CONFIRMSTATUS").Text = string.Format("<div class='stext'><img src='../images/icon_x.gif'></div>");
        }
        else
        {
            e.Row.Cells.FromKey("CONFIRMSTATUS").Text = string.Format("<div class='stext'><img src='../images/icon_o.gif'></div>");
        }
    }
        /// <summary>
        /// Initialize datagrid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
        {
            // Name of input form (name + long name)
            e.Row.Cells.FromKey("IFName").Text = e.Row.Cells.FromKey("IFName").Text + ": " + e.Row.Cells.FromKey("IFLongName").Text + " (#" + e.Row.Cells.FromKey("InputFormId").Text + ")";

            // Image "delete"
            TemplatedColumn col   = (TemplatedColumn)e.Row.Cells.FromKey("Action").Column;
            ImageButton     btImg = (ImageButton)((CellItem)col.CellItems[e.Row.Index]).FindControl("imgDel");

            btImg.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this relationship ?');");

            // Display by row (for level)
            for (int c = 1; c <= levelCount; c++)
            {
                string colName = "L" + c.ToString();

                // InputForm herited
                if (e.Row.Cells.FromKey("Herited").Text == "True")
                {
                    e.Row.Style.ForeColor = Color.Gray;
                    ((CellItem)col.CellItems[e.Row.Index]).Controls.Remove(btImg);
                }

                // Align X
                if (e.Row.Cells.FromKey(colName).Text != null)
                {
                    e.Row.Cells.FromKey(colName).Style.HorizontalAlign = HorizontalAlign.Center;
                }
            }
        }
Example #9
0
    private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        // Display hyperlink for each container
        string sIFCId = e.Row.Cells.FromKey("InputFormContainerId").Text;

        e.Row.Cells.FromKey("ContainerName").Text = "<a href='javascript:SC(" + sIFCId + ")'>[" + e.Row.Cells.FromKey("Tag").Text + "] - " + e.Row.Cells.FromKey("ContainerName").Text + "</a>";

        // Check if the container group has changed and if yes, add an extra row.
        string containerGroup = e.Row.Cells.FromKey("ContainerGroupPath").Value.ToString();

        if (currentGroup != containerGroup)
        {
            currentGroup = containerGroup;
            groupCount++;
        }
        // Display filter
        if (txtFilter.Text.Length > 0)
        {
            Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row;

            string filter        = txtFilter.Text.Trim().ToLower();
            string containerName = e.Row.Cells.FromKey("ContainerName").Text.ToLower();
            string comment       = e.Row.Cells.FromKey("Comment").Text.ToLower();

            if ((containerName.Length == 0 || containerName.IndexOf(filter) < 0) && (comment.Length == 0 || comment.IndexOf(filter) < 0))
            {
                r.Delete();
            }
            else
            {
                UITools.HiglightGridRowFilter2(ref r, txtFilter.Text, true, Convert.ToInt32(txtSortColPos.Value));
            }
        }
    }
Example #10
0
 /// <summary>
 /// Format words datagrid
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     #region Display format for SubmitDate
     Infragistics.WebUI.UltraWebGrid.UltraGridCell c;
     c = e.Row.Cells.FromKey("Submitted");
     if (c.Value != null && c.Value != DBNull.Value)
     {
         c.Value = HyperCatalog.Shared.SessionState.User.FormatUtcDate(Convert.ToDateTime(c.Value));
     }
     #endregion
     #region Display format for ApproveDate
     c = e.Row.Cells.FromKey("Approved");
     if (c.Value != null && c.Value != DBNull.Value)
     {
         c.Value = HyperCatalog.Shared.SessionState.User.FormatUtcDate(Convert.ToDateTime(c.Value));
     }
     #endregion
     #region Filter colorization
     string search = txtFilter.Text.Trim();
     if (search != string.Empty)
     {
         c      = e.Row.Cells.FromKey("Text");
         c.Text = Utils.CReplace(c.Text, search, "<font color=red><b>" + search + "</b></font>", 1);
     }
     #endregion
 }
Example #11
0
 protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     if (!e.Row.Cells.FromKey("FileName").ToString().ToLower().EndsWith(".xml"))
     {
         e.Row.Delete();
     }
 }
Example #12
0
    protected void ugrdMapKpi_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        e.Row.Height = Unit.Pixel(20);
        DataRowView drw = (DataRowView)e.Data;

        //if (drw["APPROVAL_STATUS"].ToString() == "0")
        //{
        //    e.Row.Cells.FromKey("CONFIRMSTATUS").Value = string.Format("<div class='stext'><img src='../images/icon_x.gif'></div>");
        //}
        //else
        //{
        //    e.Row.Cells.FromKey("CONFIRMSTATUS").Value = string.Format("<div class='stext'><img src='../images/icon_o.gif'></div>");
        //}

        TemplatedColumn cCol = (TemplatedColumn)e.Row.Band.Columns.FromKey("APP_STATUS");

        System.Web.UI.WebControls.Image objImg = (System.Web.UI.WebControls.Image)((CellItem)cCol.CellItems[e.Row.BandIndex]).FindControl("imgApp");
        string strImg = e.Row.Cells.FromKey("APP_STATUS").Value.ToString();

        objImg.ImageUrl      = Biz_Com_Approval_Info.GetAppImageUrl(strImg);
        objImg.AlternateText = Biz_Com_Approval_Info.GetAppImageText(strImg);


        string kpi_ref_id = DataTypeUtility.GetValue(e.Row.Cells.FromKey("KPI_REF_ID").Value);
        string kpi_name   = DataTypeUtility.GetValue(e.Row.Cells.FromKey("KPI_NAME").Value);

        string url  = "<a href='#null' onclick='doPoppingUp_KPI(\"{0}\",\"{1}\")' style=\"color:Navy;\">{2}</a>";
        string temp = string.Format(url, IEstTermRefID, kpi_ref_id, kpi_name);

        e.Row.Cells.FromKey("KPI_NAME").Value = temp;
    }
Example #13
0
 /// <summary>
 /// Display TM Expression translations/localizations datagrid
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     #region Display Edit Link in LanguageCode
     for (int i = 0; i < list.Count; i++)
     {
         if (list[i].Code == e.Row.Cells.FromKey("LanguageCode").Text)
         {
             //Display Edit Link in languageCode
             e.Row.Cells.FromKey("Language").Text = "[" + e.Row.Cells.FromKey("LanguageCode").Text + "] " + list[i].Name;
         }
     }
     #endregion
     #region Display Rtl style
     bool rtl = e.Row.Cells.FromKey("Rtl").Text.ToLower() == "true";
     if (rtl)
     {
         e.Row.Cells.FromKey("TMExpressionValue").Style.CssClass = "rtl";
     }
     #endregion
     #region Display Value in Textbox
     TemplatedColumn col = (TemplatedColumn)e.Row.Cells.FromKey("Value").Column;
     TextBox         tb  = (TextBox)((CellItem)col.CellItems[e.Row.Index]).FindControl("TXTChangedValue");
     tb.Text     = e.Row.Cells.FromKey("TMExpressionValue").Text;
     tb.CssClass = e.Row.Cells.FromKey("TMExpressionValue").Style.CssClass;
     #endregion
 }
    protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        cv.ApplyFilter("Id", Convert.ToInt32(e.Row.DataKey), HyperCatalog.Business.CollectionView.FilterOperand.Equals);

        TemplatedColumn col      = (TemplatedColumn)e.Row.Cells.FromKey("nDelay").Column;
        CellItem        cellItem = (CellItem)col.CellItems[e.Row.Index];
        DropDownList    ddDelay  = (DropDownList)cellItem.FindControl("ddDelay");

        for (int i = 0; i < delays.Length; i++)
        {
            ddDelay.Items.Add(new ListItem(delays[i], i.ToString()));
        }

        HyperCatalog.Business.UserNotification obj = cv.Count == 1 ? (HyperCatalog.Business.UserNotification)cv[0] : null;
        col      = (TemplatedColumn)e.Row.Cells.FromKey("Select").Column;
        cellItem = (CellItem)col.CellItems[e.Row.Index];
        CheckBox cb = (CheckBox)cellItem.FindControl("g_sd");

        cb.Checked = obj != null;
        bool allowInAdv = (bool)e.Row.Cells.FromKey("AllowNotificationInAdvance").Value;

        if (allowInAdv)
        {
            //the user has checked this notification
            ddDelay.SelectedIndex = obj != null?Convert.ToInt32(obj.Delay) : 0;
        }
        else
        {
            ddDelay.Items.Clear();
            ddDelay.Items.Add(new ListItem("Instant", "-1"));
        }
        //allow offset editing only if AllowNotificationInAdvance
        ddDelay.Enabled = allowInAdv;
        cv.RemoveFilter();
    }
Example #15
0
 protected void ugrdNotice_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     if (e.Row.Index > 3)
     {
         e.Row.Delete();
     }
 }
Example #16
0
    protected void ugrdKpiResultList_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView drw = (DataRowView)e.Data;

        string strTrend = e.Row.Cells.FromKey("TREND").Value.ToString();

        switch (strTrend)
        {
        case "UP":
            e.Row.Cells.FromKey("TREND").Value = "<img class='KPI' border='0' src='../images/arrow/arrow_e_up.gif'>";;
            break;

        case "DOWN":
            e.Row.Cells.FromKey("TREND").Value = "<img class='KPI' border='0' src='../images/arrow/arrow_b_down.gif'>";;
            break;

        case "FLAT":
            e.Row.Cells.FromKey("TREND").Value = "<img class='KPI' border='0' src='../images/arrow/arrow_m.gif'>";;
            break;

        default:
            break;
        }

        e.Row.Cells.FromKey("THRESHOLD_IMG").Value = "<div align=center><img src='../images/" + e.Row.Cells.FromKey("THRESHOLD_IMG").Value.ToString() + "'></div>";

        double dTemp  = 0;
        string sARate = DataTypeUtility.GetValue(e.Row.Cells.FromKey("ACHV_RATE").Value);

        e.Row.Cells.FromKey("ACHV_RATE").Value = (double.TryParse(sARate, out dTemp)) ? Convert.ToDouble(sARate.Replace('-', '0')).ToString("#,###,###,##0.00") : sARate;

        //_iTRow += 1;

        //lblCountRow.Text = "Total Rows : " + _iTRow.ToString();
    }
Example #17
0
    protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        e.Row.Cells.FromKey("ItemName").Text = "<a href='../../redirect.aspx?p=UI/Acquire/qde.aspx&i=" + e.Row.Cells.FromKey("ItemId").Text + "' target='_BLANK'\">" + e.Row.Cells.FromKey("ItemName").Text + "</a>";
        e.Row.Cells.FromKey("Status").Text   = Utils.ColorStatus(e.Row.Cells.FromKey("Status").Text);

        string filter = txtFilter.Text.Trim();

        e.Row.Cells.FromKey("ItemName").Style.Wrap   = true;
        e.Row.Cells.FromKey("ItemNumber").Style.Wrap = true;
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cName = e.Row.Cells.FromKey("ItemName");
        Infragistics.WebUI.UltraWebGrid.UltraGridCell cSku  = e.Row.Cells.FromKey("ItemNumber");
        if ((cName.Text.ToLower().IndexOf(filter.ToLower()) >= 0) || (cSku.Text.ToLower().IndexOf(filter.ToLower()) >= 0))
        {
            e.Row.Cells.FromKey("ItemName").Text   = Utils.CReplace(e.Row.Cells.FromKey("ItemName").Text, filter, "<font color=red><b>" + filter + "</b></font>", 1);
            e.Row.Cells.FromKey("ItemNumber").Text = Utils.CReplace(e.Row.Cells.FromKey("ItemNumber").Text, filter, "<font color=red><b>" + filter + "</b></font>", 1);
        }

        // Bundle group
        if (e.Row.Cells.FromKey("Anomaly").Text == "")
        {
            e.Row.Cells.FromKey("CountryFlag").Text  = "<img src='/hc_v4/img/flags/" + e.Row.Cells.FromKey("CountryCode").Text + ".gif'/>";
            e.Row.Cells.FromKey("CountryFlag").Title = "[" + e.Row.Cells.FromKey("CountryCode").Text + "] " + HyperCatalog.Business.Country.GetByKey(e.Row.Cells.FromKey("CountryCode").Text).Name;
            foreach (UltraGridCell cell in e.Row.Cells)
            {
                cell.Style.Font.Bold = true;
            }
        }

        if (e.Row.Cells.FromKey("Anomaly").Text == "None")
        {
            e.Row.Cells.FromKey("Anomaly").Text = string.Empty;
        }
    }
Example #18
0
    protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView dr = (DataRowView)e.Data;

        string strSum = e.Row.Cells[1].Value.ToString().Trim();


        int intSt = strSum.Length - 1;

        if (intSt > 0)
        {
            strSum = strSum.Substring(intSt, 1);

            //Response.Write(strSum);
            if (strSum == "계")
            {
                e.Row.Style.BackColor = GetGridColor(gEN_GRID_COLOR.SUBTOTAL_DATA1);
            }
        }
        string strBank = e.Row.Cells[0].Value.ToString().Trim();


        int intBk = strBank.Length - 1;

        if (intBk > 0)
        {
            strBank = strBank.Substring(intBk, 1);

            //Response.Write(strBank);
            if (strBank == "계")
            {
                e.Row.Style.BackColor = GetGridColor(gEN_GRID_COLOR.SUBTOTAL_DATA1);
            }
        }
    }
Example #19
0
        private void componentsGrid_DemandLoad(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
        {
            Business.ApplicationComponent comp = (Business.ApplicationComponent)appComponents[(int)e.Row.Cells.FromKey("Id").Value];
            if (comp != null)
            {
                e.Row.Expanded = true;
                UltraGridBand band = componentsGrid.Bands[e.Row.BandIndex + 1];

                if (comp.DatabaseComponentId >= 0)
                {
                    Business.ApplicationComponent dbComp = comp.DatabaseComponent;
                    UltraGridRow newRow = new UltraGridRow(new object[] { comp.DatabaseComponentId, dbComp.Name, dbComp.Type, dbComp.Description });
                    e.Row.Rows.Add(newRow);

                    newRow.ShowExpand = (dbComp.DatabaseComponentId >= 0 || dbComp.HardwareComponentId >= 0);
                }

                if (comp.HardwareComponentId >= 0)
                {
                    Business.ApplicationComponent hwComp = comp.HardwareComponent;
                    UltraGridRow newRow = new UltraGridRow(new object[] { comp.HardwareComponentId, hwComp.Name, hwComp.Type, hwComp.Description });
                    e.Row.Rows.Add(newRow);

                    newRow.ShowExpand = (hwComp.DatabaseComponentId >= 0 || hwComp.HardwareComponentId >= 0);
                }
            }

            if (componentsGrid.Bands[e.Row.BandIndex + 1] == null)
            {
                AddBand(componentsGrid);
            }
        }
Example #20
0
    protected void ultraLegend_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        intRowNum += 1;
        if (intRowNum == 1)
        {
            e.Row.Cells.FromKey("VIEW_NAME").Value = "조직점수";
            e.Row.Style.Font.Bold = true;

            e.Row.Cells.FromKey("VIEW_NAME").Style.ForeColor = System.Drawing.Color.Chocolate;
            e.Row.Cells.FromKey("SCORE").Style.ForeColor     = System.Drawing.Color.Chocolate;
            e.Row.Cells.FromKey("WEIGHT").Style.ForeColor    = System.Drawing.Color.Chocolate;

            e.Row.Cells.FromKey("VIEW_NAME").Style.Font.Size = FontUnit.Point(11);
            e.Row.Cells.FromKey("SCORE").Style.Font.Size     = FontUnit.Point(11);
            e.Row.Cells.FromKey("WEIGHT").Style.Font.Size    = FontUnit.Point(11);
            e.Row.Height = Unit.Pixel(20);
            //e.Row.Style.BackColor = Color.Aqua;
        }
        else
        {
            e.Row.Cells.FromKey("VIEW_NAME").Style.ForeColor = System.Drawing.Color.Navy;
            e.Row.Cells.FromKey("SCORE").Style.ForeColor     = System.Drawing.Color.Navy;
            e.Row.Cells.FromKey("WEIGHT").Style.ForeColor    = System.Drawing.Color.Navy;

            e.Row.Style.Font.Bold = false;
            e.Row.Cells.FromKey("VIEW_NAME").Value = "" + e.Row.Cells.FromKey("VIEW_NAME").Value;
        }

        e.Row.Cells.FromKey("DASH").Value = "/";
    }
Example #21
0
    protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView dr = (DataRowView)e.Data;

        if (dr["LAND_REGISTER_DATE"].ToString().Length == 8)
        {
            e.Row.Cells.FromKey("LAND_REGISTER_DATE").Value = dr["LAND_REGISTER_DATE"].ToString().Substring(0, 4) + "." + dr["LAND_REGISTER_DATE"].ToString().Substring(4, 2) + "." + dr["LAND_REGISTER_DATE"].ToString().Substring(6, 2);
        }
        if (dr["LAND_REGISTER_DATE"].ToString().Length == 8)
        {
            e.Row.Cells.FromKey("LAND_GET_DATE").Value = dr["LAND_GET_DATE"].ToString().Substring(0, 4) + "." + dr["LAND_GET_DATE"].ToString().Substring(4, 2) + "." + dr["LAND_GET_DATE"].ToString().Substring(6, 2);
        }
        if (dr["LAND_REGISTER_DATE"].ToString().Length == 8)
        {
            e.Row.Cells.FromKey("LAND_REGISTER_DATE").Value = dr["LAND_REGISTER_DATE"].ToString().Substring(0, 4) + "." + dr["LAND_REGISTER_DATE"].ToString().Substring(4, 2) + "." + dr["LAND_REGISTER_DATE"].ToString().Substring(6, 2);
        }

        if (dr["LAND_DATE_T"].ToString().Length == 6)
        {
            e.Row.Cells.FromKey("LAND_DATE_T").Value = dr["LAND_DATE_T"].ToString().Substring(0, 4) + "." + dr["LAND_DATE_T"].ToString().Substring(4, 2);
        }

        if (dr["LAND_OFFICE_T"].ToString().Equals("01"))
        {
            e.Row.Cells.FromKey("LAND_OFFICE_T").Value = "울산";
        }
        else if (dr["LAND_OFFICE_T"].ToString().Equals("02"))
        {
            e.Row.Cells.FromKey("LAND_OFFICE_T").Value = "양산";
        }

//        e.Row.Cells.FromKey("LAND_TOTAL_AREA").Value    = double.Parse(dr["LAND_TOTAL_AREA"].ToString()).ToString("N0");
//        e.Row.Cells.FromKey("LAND_PRICE").Value         = double.Parse(dr["LAND_PRICE"].ToString()).ToString("N0");
//        e.Row.Cells.FromKey("LAND_BOOK_AMOUNT").Value   = double.Parse(dr["LAND_BOOK_AMOUNT"].ToString()).ToString("N0");
    }
Example #22
0
    protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        if (e.Row.Cells.FromKey("IsExcluded") != null && Convert.ToBoolean(e.Row.Cells.FromKey("IsExcluded").Value))
        {
            e.Row.Delete();
        }
        else
        {
            // Retrieve country code
            if (e.Row.Cells.FromKey("CountryCode") != null && e.Row.Cells.FromKey("ImageCountry") != null)
            {
                string countryCode = string.Empty;
                if (e.Row.Cells.FromKey("CountryCode") != null && e.Row.Cells.FromKey("CountryCode").Value != null)
                {
                    countryCode = e.Row.Cells.FromKey("CountryCode").ToString();
                }

                // Update image for current country
                if (countryCode.Length > 0 && e.Row.Cells.FromKey("ImageCountry") != null)
                {
                    e.Row.Cells.FromKey("ImageCountry").Text = "<img title=\"" + countryCode + "\" src=\"/hc_v4/img/flags/" + countryCode.ToLower() + ".gif\">";
                }
            }

            if (e.Row.Cells.FromKey("LinkFrom") != null)
            {
                bool linkFrom = Convert.ToBoolean(e.Row.Cells.FromKey("LinkFrom").Value);
                if (!linkFrom) // Hardware list
                {
                    if (e.Row.Cells.FromKey("Name") != null && e.Row.Cells.FromKey("ItemName") != null && e.Row.Cells.FromKey("ItemName").Value != null)
                    {
                        e.Row.Cells.FromKey("Name").Text = e.Row.Cells.FromKey("ItemName").Value.ToString();
                    }
                    if (e.Row.Cells.FromKey("SKU") != null && e.Row.Cells.FromKey("ItemSKU") != null && e.Row.Cells.FromKey("ItemSKU").Value != null)
                    {
                        e.Row.Cells.FromKey("SKU").Text = e.Row.Cells.FromKey("ItemSKU").Value.ToString();
                    }
                    if (e.Row.Cells.FromKey("Class") != null && e.Row.Cells.FromKey("ClassName") != null && e.Row.Cells.FromKey("ClassName").Value != null)
                    {
                        e.Row.Cells.FromKey("Class").Text = e.Row.Cells.FromKey("ClassName").Value.ToString();
                    }
                }
                else // Companion list
                {
                    if (e.Row.Cells.FromKey("Name") != null && e.Row.Cells.FromKey("SubItemName") != null && e.Row.Cells.FromKey("SubItemName").Value != null)
                    {
                        e.Row.Cells.FromKey("Name").Text = e.Row.Cells.FromKey("SubItemName").Value.ToString();
                    }
                    if (e.Row.Cells.FromKey("SKU") != null && e.Row.Cells.FromKey("SubItemSKU") != null && e.Row.Cells.FromKey("SubItemSKU").Value != null)
                    {
                        e.Row.Cells.FromKey("SKU").Text = e.Row.Cells.FromKey("SubItemSKU").Value.ToString();
                    }
                    if (e.Row.Cells.FromKey("Class") != null && e.Row.Cells.FromKey("SubClassName") != null && e.Row.Cells.FromKey("SubClassName").Value != null)
                    {
                        e.Row.Cells.FromKey("Class").Text = e.Row.Cells.FromKey("SubClassName").Value.ToString();
                    }
                }
            }
        }
    }
Example #23
0
    protected void ugrdMBO_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        //CheckBox chkCheck;
        TemplatedColumn Col_Check = (TemplatedColumn)e.Row.Band.Columns.FromKey("selchk");

        CheckBox chkCheck = (CheckBox)((CellItem)Col_Check.CellItems[e.Row.BandIndex]).FindControl("cBox");

        //chkCheck.Enabled = (e.Row.Cells.FromKey("KPI_CLASS_REF_ID").Value.ToString() != "STG") ? false : true;

        //if (e.Row.Cells.FromKey("APPROVAL_STATUS").Value.ToString() == "Y")
        //    chkCheck.Enabled = false;

        //if (e.Row.Cells.FromKey("CHAMPION_EMP_ID").Value.ToString() != gUserInfo.Emp_Ref_ID.ToString())
        //    chkCheck.Enabled = false;

        if (((DataRowView)e.Data)["CHECK_YN"].ToString() == "N")
        {
            chkCheck.Enabled = false;
        }
        //if (drv["COM_DEPT_REF_ID"].ToString() != this.IDEPT_ID.ToString())
        //    chkCheck.Enabled = false;

        if (((DataRowView)e.Data)["APPROVAL_STATUS"].ToString() == "N")
        {
            chkCheck.Enabled = true;
        }

        //string estterm_ref_id = DataTypeUtility.GetValue(e.Row.Cells.FromKey("ESTTERM_REF_ID").Value);
        //string kpi_code = DataTypeUtility.GetValue(e.Row.Cells.FromKey("KPI_CODE").Value);
        //string kpi_name = DataTypeUtility.GetValue(e.Row.Cells.FromKey("KPI_NAME").Value);

        //string onclick = "<a href='#null' onclick=\"doLinking_MBO('{0}','{1}','{2}')\">{3}</a>";
        //string link = string.Format(onclick, estterm_ref_id, kpi_code, ICCB2, kpi_name);
        //e.Row.Cells.FromKey("KPI_NAME").Value = link;
    }
Example #24
0
    protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        try
        {
            string file_type = e.Row.Cells.FromKey("file_type").Value.ToString();

            if (file_type == "AE")
            {
                //e.Row.Cells.FromKey("house_num").TargetURL = "/ASP/air_export/new_edit_hawb.asp?Edit=yes&hawb=" + e.Row.Cells.FromKey("house_num");
                //e.Row.Cells.FromKey("master_num").TargetURL = "/ASP/air_export/new_edit_mawb.asp?Edit=yes&mawb=" + e.Row.Cells.FromKey("master_num");

                e.Row.Cells.FromKey("house_num").TargetURL  = "javascript:parent.window.location.href='" + "/AirExport/HAWB/" + Server.UrlEncode("Edit=yes&HAWB=" + e.Row.Cells.FromKey("house_num").Text) + "'";
                e.Row.Cells.FromKey("master_num").TargetURL = "javascript:parent.window.location.href='" + "/AirExport/MAWB/" + Server.UrlEncode("Edit=yes&MAWB=" + e.Row.Cells.FromKey("master_num").Text) + "'";

                e.Row.Cells.FromKey("file_type").Text = "Air Export";
            }

            if (file_type == "OE")
            {
                //e.Row.Cells.FromKey("house_num").TargetURL = "/ASP/ocean_export/new_edit_hbol.asp?Edit=yes&hbol=" + e.Row.Cells.FromKey("house_num");
                //e.Row.Cells.FromKey("master_num").TargetURL = "/ASP/ocean_export/new_edit_mbol.asp?Edit=yes&BookingNum=" + e.Row.Cells.FromKey("master_num");


                e.Row.Cells.FromKey("house_num").TargetURL  = "javascript:parent.window.location.href='" + "/OceanExport/HBOL/" + Server.UrlEncode("Edit=yes&HBOL=" + e.Row.Cells.FromKey("house_num").Text) + "'";
                e.Row.Cells.FromKey("master_num").TargetURL = "javascript:parent.window.location.href='" + "/OceanExport/MAWB/" + Server.UrlEncode("Edit=yes&BookingNum=" + e.Row.Cells.FromKey("master_num").Text) + "'";

                e.Row.Cells.FromKey("file_type").Text = "Ocean Export";
            }
        }
        catch { }
    }
Example #25
0
    protected void ugrdTeamMbo_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        CheckBox        chkCheck;
        TemplatedColumn Col_Check = (TemplatedColumn)e.Row.Band.Columns.FromKey("selchk");

        chkCheck = (CheckBox)((CellItem)Col_Check.CellItems[e.Row.BandIndex]).FindControl("cBox");

        //if (e.Row.Cells.FromKey("APP_STATUS").Value.ToString() != Biz_Type.app_status_complete)
        //    chkCheck.Enabled = false;
        DataRowView drv = (DataRowView)e.Data;

        if (drv["COM_DEPT_REF_ID"].ToString() != this.IDEPT_ID.ToString())
        {
            chkCheck.Enabled = false;
        }


        //string estterm_ref_id = DataTypeUtility.GetValue(e.Row.Cells.FromKey("ESTTERM_REF_ID").Value);
        //string kpi_code = DataTypeUtility.GetValue(e.Row.Cells.FromKey("KPI_CODE").Value);
        //string kpi_name = DataTypeUtility.GetValue(e.Row.Cells.FromKey("KPI_NAME").Value);

        //string onclick = "<a href='#null' onclick=\"doLinking_Team('{0}','{1}','{2}')\">{3}</a>";
        //string link = string.Format(onclick, estterm_ref_id, kpi_code, ICCB3, kpi_name);
        //e.Row.Cells.FromKey("KPI_NAME").Value = link;
    }
Example #26
0
    protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        try
        {
            if (e.Row.Cells.FromKey("mawb_num") != null)
            {
                e.Row.Cells.FromKey("mawb_num").TargetURL = "javascript:viewPop('/ASP/air_export/new_edit_mawb.asp?WindowName=popupNew&Edit=yes&MAWB=" + e.Row.Cells.FromKey("mawb_num").Text + "');";
            }

            try
            {
                if (e.Row.Cells.FromKey("hawb_num").Value == null)
                {
                    e.Row.Cells.FromKey("hawb_num").Text = "Direct Shipment";
                    e.Row.Cells.FromKey("Revenue").Text  = "";
                    e.Row.Cells.FromKey("Expense").Text  = "";
                    e.Row.Cells.FromKey("Profit").Text   = "";
                }
                else
                {
                    e.Row.Cells.FromKey("hawb_num").TargetURL = "javascript:viewPop('/ASP/air_export/new_edit_hawb.asp?WindowName=popupNew&Edit=yes&HAWB=" + e.Row.Cells.FromKey("hawb_num").Text + "');";
                }
            }
            catch { }
        }
        catch (Exception ex) {
            Response.Write(ex.Message);
        }
    }
Example #27
0
    protected void ugrdExtScore_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        //TemplatedColumn cCol = (TemplatedColumn)e.Row.Band.Columns.FromKey("USE_YN");
        //Image objImg = (Image)((CellItem)cCol.CellItems[e.Row.BandIndex]).FindControl("imgUseYn");
        //objImg.ImageUrl = (e.Row.Cells.FromKey("USE_YN").Value.ToString() == "Y") ?
        //                  "../images/icon_o.gif" : "../images/icon_x.gif";

        //cCol   = (TemplatedColumn)e.Row.Band.Columns.FromKey("APPROVAL_STATUS");
        //objImg = (Image)((CellItem)cCol.CellItems[e.Row.BandIndex]).FindControl("imgUseYn");
        //objImg.ImageUrl = (e.Row.Cells.FromKey("APPROVAL_STATUS").Value.ToString() == "Y") ?
        //                  "../images/icon_o.gif" : "../images/icon_x.gif";

        int intLevel = Convert.ToInt32(e.Row.Cells.FromKey("DEPT_LEVEL").Value.ToString()) - 1;

        intLevel = (intLevel < 1) ? 0 : intLevel;
        string strDept = Convert.ToString(e.Row.Cells.FromKey("DEPT_NAME").Value);

        strDept = strDept.PadLeft(strDept.Length + intLevel, '‥');

        e.Row.Cells.FromKey("DEPT_NAME").Value = strDept;

        if (intLevel < 3)
        {
            e.Row.Cells.FromKey("DEPT_NAME").Style.Font.Bold = true;
        }

        e.Row.Cells.FromKey("DEPT_NAME").AllowEditing = AllowEditing.No;
        e.Row.Cells.FromKey("TYPE_NAME").AllowEditing = AllowEditing.No;
        e.Row.Cells.FromKey("selchk").AllowEditing    = AllowEditing.No;

        e.Row.Cells.FromKey("DEPT_NAME").Style.BackColor = Color.WhiteSmoke;
        e.Row.Cells.FromKey("TYPE_NAME").Style.BackColor = Color.WhiteSmoke;
        e.Row.Cells.FromKey("selchk").Style.BackColor    = Color.WhiteSmoke;
    }
Example #28
0
    protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        object status_yn = e.Row.Cells.FromKey("STATUS_YN").Value;

        if (status_yn == null)
        {
            e.Row.Cells.FromKey("STATUS_IMG").Value = "<img src='../Images/status/N.gif'>";
        }
        else
        {
            if (status_yn.Equals("Y"))
            {
                e.Row.Cells.FromKey("STATUS_IMG").Value = "<img src='../Images/status/E.gif'>";
            }
            else
            {
                e.Row.Cells.FromKey("STATUS_IMG").Value = "<img src='../Images/status/N.gif'>";
            }
        }

        int           step_id = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("ESTTERM_STEP_ID").Value);
        Biz_TermSteps biz     = new Biz_TermSteps(COMP_ID, step_id);

        e.Row.Cells.FromKey("ESTTERM_STEP_NAME").Value = biz.EstTerm_Step_Name;
    }
Example #29
0
    protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView dr      = (DataRowView)e.Data;
        string      sCodeID = GetValue(dr["THRESHOLD_REF_ID"]);

        e.Row.Cells.FromKey("MODIFY").Value = string.Format(
            "<a href=\"#\" onclick=\"mfOpenWindow('UPD_C', '{0}');\"><img src='../images/drafts.gif' border='0'></a>", sCodeID);
    }
Example #30
0
    protected void ugrdAppLine_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView drv = (DataRowView)e.Data;

        //e.Row.Cells.FromKey("LINE_TYPE_ORG").Value = drv["LINE_TYPE"].ToString();
        e.Row.Cells.FromKey("LINE_STEP").Value = idxCol.ToString();
        idxCol += 1;
    }