private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            if (e.ListSourceRowIndex < 0)
            {
                return;
            }
            IList <Model.CustomerProducts> details = this.bindingSource1.DataSource as IList <Model.CustomerProducts>;

            if (details == null || details.Count < 1)
            {
                return;
            }
            Model.Product product = details[e.ListSourceRowIndex].Product;
            if (product == null)
            {
                return;
            }
            switch (e.Column.Name)
            {
            case "gridColumn2":
                e.DisplayText = product.Id;
                break;
            }
        }
Esempio n. 2
0
        private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            if (e.ListSourceRowIndex < 0)
            {
                return;
            }
            IList <Model.Technologydetails> details = this.bindingSource1.DataSource as IList <Model.Technologydetails>;

            if (details == null || details.Count < 1)
            {
                return;
            }
            Model.Technologydetails detail = details[e.ListSourceRowIndex];
            if (detail.Procedures == null)
            {
                return;
            }
            switch (e.Column.Name)
            {
            case "gridWorkhouse":
                e.DisplayText = detail.Procedures == null ? "" : detail.Procedures.WorkHouse.Workhousename;
                break;

            case "gridProcedures":
                e.DisplayText = detail.Procedures == null ? "" : detail.Procedures.Id;
                break;

            case "gridColumnStartDate":
                e.DisplayText = detail.Procedures.Startdate.HasValue ? detail.Procedures.Startdate.Value.ToShortDateString() : "";
                break;

            case "gridColumnEndDate":
                e.DisplayText = detail.Procedures.Enddate.HasValue ? detail.Procedures.Enddate.Value.ToShortDateString() : "";
                break;
            }
        }
Esempio n. 3
0
        private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            if (e.ListSourceRowIndex < 0)
            {
                return;
            }
            IList <Model.ProduceOtherExitDetail> details = this.bindingSourceDetails.DataSource as IList <Model.ProduceOtherExitDetail>;

            if (details == null || details.Count < 1)
            {
                return;
            }
            Model.Product detail = details[e.ListSourceRowIndex].Product;
            switch (e.Column.Name)
            {
            case "ColProductId":
                if (detail == null)
                {
                    return;
                }
                e.DisplayText = string.IsNullOrEmpty(detail.Id) ? "" : detail.Id;
                break;
            }
        }
Esempio n. 4
0
        private void avdHstGridView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            // RunningTotal  http://www.devexpress.com/Support/Center/Question/Details/Q366364
            GridView view = (GridView)sender;
            int      rh   = view.GetRowHandle(e.ListSourceRowIndex);

            if (e.Column == colREFID)
            {
                e.DisplayText = string.Format("{0:N0} {1}", e.Value, view.GetListSourceRowCellValue(e.ListSourceRowIndex, colREFTO));
            }

            if (e.Column.FieldName == "CumBkyTL")
            {
                int     firstRowHandle = view.GroupCount == 0 ? 0 : view.GetChildRowHandle(view.GetParentRowHandle(rh), 0);
                decimal qta            = 0;
                for (int i = firstRowHandle; i <= rh; i++)
                {
                    decimal tut = view.GetRowCellValue(i, colATUT) == DBNull.Value ? 0 : Convert.ToDecimal(view.GetRowCellValue(i, colATUT));
                    if (view.GetRowCellValue(i, colBA).ToString() == "B")
                    {
                        qta += tut;
                    }
                    else
                    {
                        qta -= tut;
                    }
                }
                if (qta < 0)
                {
                    e.DisplayText = (Math.Abs(qta)).ToString("N") + " A";
                }
                else if (qta > 0)
                {
                    e.DisplayText = qta.ToString("N") + " B";
                }
                else
                {
                    e.DisplayText = "";
                }
            }

            if (e.Column.FieldName == "CumBky")
            {
                int     firstRowHandle = view.GroupCount == 0 ? 0 : view.GetChildRowHandle(view.GetParentRowHandle(rh), 0);
                decimal qta            = 0;
                for (int i = firstRowHandle; i <= rh; i++)
                {
                    decimal tut = view.GetRowCellValue(i, colDTUT) == DBNull.Value ? 0 : Convert.ToDecimal(view.GetRowCellValue(i, colDTUT));
                    if (view.GetRowCellValue(i, colBA).ToString() == "B")
                    {
                        qta += tut;
                    }
                    else
                    {
                        qta -= tut;
                    }
                }
                if (qta < 0)
                {
                    e.DisplayText = (Math.Abs(qta)).ToString("N") + " A";
                }
                else if (qta > 0)
                {
                    e.DisplayText = qta.ToString("N") + " B";
                }
                else
                {
                    e.DisplayText = "";
                }
            }
        }
Esempio n. 5
0
 private void gvPrjAmountWbsBoiRpt_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
 }
Esempio n. 6
0
        private void gridView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            // row handle & sender check
            if (gridView.FocusedRowHandle < 0 && sender.GetType() != typeof(GridView))
            {
                return;
            }

            try
            {
                switch (e.Column.FieldName)
                {
                case "order_type":
                {
                    int order_type = ((null == e.Value || 0 == e.Value.ToString().Length) ? 0 : (int)e.Value);
                    e.DisplayText = ObjOrder.getOrderTypeString(order_type);
                }
                break;

                case "call_datetime":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("MM-dd HH:mm"));
                }
                break;

                case "date_1":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_2":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_3":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_4":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_5":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_6":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_7":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "customer_pay_type_cd":
                {
                    int customer_pay_type_cd = ((null == e.Value || 0 == e.Value.ToString().Length) ? 0 : (int)e.Value);
                    e.DisplayText = ObjOrder.getCustPayTypeString(customer_pay_type_cd);
                }
                break;

                case "shop_cost":
                {
                    e.DisplayText = ((null == e.Value || 0 == e.Value.ToString().Length) ? "" : KnUtil.formatMoney((int)e.Value));
                }
                break;

                case "customer_cost":
                {
                    e.DisplayText = ((null == e.Value || 0 == e.Value.ToString().Length) ? "" : KnUtil.formatMoney((int)e.Value));
                }
                break;
                }
            }
            catch (Exception ex)
            {
                String erro_msg = (null == ex.Message ? "error - OrderList_gridView_CustomColumnDisplayText" : ex.Message);
                TsLog.writeLog(erro_msg);
                Debug.Assert(false, erro_msg);
            }
        }
 private void GridView7_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     ACMS.XtraUtils.GridViewUtils.TblMemberPackage_CustomColumnDisplayText(e);
 }
Esempio n. 8
0
 private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     //MessageBox.Show(e.DisplayText);
 }
Esempio n. 9
0
        private void gridViewListaProductosEnBodega_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            for (int i = 0; i < dtProducts_en_Stock.Columns.Count; i++)
            {
                //dtProducts_en_Stock.Columns.Add(dtBodega.Rows[i]["nombre"].ToString());
                //GridColumn col = gridViewListaProductosEnBodega.Columns.AddVisible(dtProducts_en_Stock.Columns[index].ColumnName);


                if (e.Column.FieldName == dtProducts_en_Stock.Columns[i].ColumnName)
                {
                    if (Convert.ToString(e.Value) == "")
                    {
                        e.DisplayText = "0";
                    }
                }
            }
        }
Esempio n. 10
0
 /// <summary>
 /// Hiển thị dữ liệu trên cột, ngày tháng không có
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void advBandedadvBandedGridView111_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     if (e.Column.FieldName == "ConfDate" && e.DisplayText == "01/01/1900")
     {
         e.DisplayText = "";
     }
     if (e.Column.FieldName == "ITConfDate" && e.DisplayText == "01/01/1900")
     {
         e.DisplayText = "";
     }
 }
Esempio n. 11
0
        private void grvTask_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            try
            {
                if (e.Column.FieldName == "Status")
                {
                    if (e.Value != null)
                    {
                        switch (e.Value)
                        {
                        case 0:
                            e.DisplayText = TaskStatusValue.ToDo.ToString();
                            break;

                        case 1:
                            e.DisplayText = TaskStatusValue.InProgress.ToString();
                            break;

                        case 2:
                            e.DisplayText = TaskStatusValue.ReadyForQA.ToString();
                            break;

                        case 3:
                            e.DisplayText = TaskStatusValue.InQA.ToString();
                            break;

                        case 4:
                            e.DisplayText = TaskStatusValue.Done.ToString();
                            break;

                        case 5:
                            e.DisplayText = TaskStatusValue.Rejected.ToString();
                            break;

                        case 6:
                            e.DisplayText = TaskStatusValue.Blocked.ToString();
                            break;
                        }
                    }
                }

                if (e.Column.FieldName == "Priority")
                {
                    if (e.Value != null)
                    {
                        switch (e.Value)
                        {
                        case 0:
                            e.DisplayText = PriorityValue.High.ToString();
                            break;

                        case 1:
                            e.DisplayText = PriorityValue.Medium.ToString();
                            break;

                        case 2:
                            e.DisplayText = PriorityValue.Low.ToString();
                            break;
                        }
                    }
                }
                if (e.Column.FieldName == "TaskType")
                {
                    if (e.Value != null)
                    {
                        switch (e.Value)
                        {
                        case 0:
                            e.DisplayText = TaskTypeValue.UserStory.ToString();
                            break;

                        case 1:
                            e.DisplayText = TaskTypeValue.Bug.ToString();
                            break;
                        }
                    }
                }
            }
            catch (Exception exp)
            {
                CommonFunctions.ShowErrorDialog("SQL error:" + exp.ToString());
                //  LogService.LogError("Error", ex);
            }
        }
Esempio n. 12
0
        private void gridView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            //gridView.BeginUpdate();
            try
            {
                switch (e.Column.FieldName.ToString())
                {
                case "BalQty":
                    e.DisplayText = "";
                    if (int.Parse(e.Value.ToString()) > 0)
                    {
                        e.DisplayText = string.Format("{0:n0}", int.Parse(e.Value.ToString()));
                    }
                    break;

                case "Status":
                    e.DisplayText = "";
                    switch (e.Value.ToString())
                    {
                    case "0":
                        break;

                    case "1":
                        e.DisplayText = "JobList";
                        break;

                    case "2":
                        e.DisplayText = "Invoice";
                        break;

                    case "3":
                        e.DisplayText = "Shorted";
                        break;

                    case "4":
                        break;

                    case "5":
                        break;

                    case "6":
                        break;

                    case "7":
                        break;

                    case "8":
                        break;

                    case "9":
                        break;

                    default:
                        break;
                    }
                    break;

                case "ReasonCD":
                    e.DisplayText = "";
                    switch (e.Value.ToString())
                    {
                    case "P":
                        //e.Column.AppearanceCell.ForeColor = Color.DarkOrange;
                        e.DisplayText = "ADD/REM.";
                        break;

                    case "M":
                        //e.Column.AppearanceCell.ForeColor = Color.DarkBlue;
                        e.DisplayText = "SHIP.";
                        break;

                    case "D":
                        //e.Column.AppearanceCell.ForeColor = Color.DarkCyan;
                        e.DisplayText = "ETD.";
                        break;

                    case "Q":
                        //e.Column.AppearanceCell.ForeColor = Color.DarkRed;
                        e.DisplayText = "QTY.";
                        break;

                    case "L":
                        //e.Column.AppearanceCell.ForeColor = Color.DarkKhaki;
                        e.DisplayText = "LOCAT.";
                        break;

                    //AW
                    case "0":
                        e.DisplayText = "UPDATE";
                        break;

                    case "1":
                        e.DisplayText = "CANCEL";
                        break;

                    case "2":
                        e.DisplayText = "CHANGE";
                        break;

                    case "3":
                        e.DisplayText = "REP.";
                        break;

                    default:
                        break;
                    }
                    break;

                default:
                    break;
                }
            }
            catch (Exception)
            {
            }
            //gridView.EndUpdate();
        }
Esempio n. 13
0
        private void grdvWorkUnitProductionProgress_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            if (e.Column == grdclmnProductionProgress)
            {
                int colIndex = 0;
                int.TryParse(e.Value.ToString(), out colIndex);

                switch (colIndex)
                {
                case -1:
                    e.DisplayText = "空闲";
                    break;

                case 0:
                    e.DisplayText = "正常";
                    break;

                case 1:
                    e.DisplayText = "偏快";
                    break;

                case 2:
                    e.DisplayText = "过快";
                    break;

                case 3:
                    e.DisplayText = "偏长";
                    break;

                case 4:
                    e.DisplayText = "过长";
                    break;
                }
            }
            else if (e.Column == grdclmnMOLineNo)
            {
                if (Tools.ConvertToInt32(e.Value.ToString(), 0) == 0)
                {
                    e.DisplayText = "";
                }
                else
                {
                    e.DisplayText = e.Value.ToString();
                }
            }
            else if (e.Column == grdclmnQtyToMFG)
            {
                if (Tools.ConvertToInt32(e.Value.ToString(), 0) == 0)
                {
                    e.DisplayText = "";
                }
                else
                {
                    e.DisplayText = e.Value.ToString();
                }
            }
            else if (e.Column == grdclmnQtyCompleted)
            {
                if (Tools.ConvertToInt32(e.Value.ToString(), 0) == 0)
                {
                    e.DisplayText = "";
                }
                else
                {
                    e.DisplayText = e.Value.ToString();
                }
            }
            else if (e.Column == grdclmnStdCycleSeconds)
            {
                if ((double)e.Value == 0)
                {
                    e.DisplayText = "";
                }
                else
                {
                    e.DisplayText = ((double)e.Value).ToString("0.000 秒");
                }
            }
        }
Esempio n. 14
0
 private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     if (e.Column.FieldName == "")
         e.DisplayText = (e.ListSourceRowIndex + 1).ToString();
 }
Esempio n. 15
0
 private void gridLookUpEdit1View_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
 }
Esempio n. 16
0
 public CustomColumnDisplayTextEventArgs(DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs orig)
 {
     GridLike  = true;
     _gridArgs = orig;
     _ca       = new GridColumnAdapter(orig.Column);
 }
Esempio n. 17
0
 private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     if (e.Column.Name == "colProvincia")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             if (app.Provincia == null)
             {
                 e.DisplayText = "";
             }
             else
             {
                 e.DisplayText = app.Provincia.Descrizione;
             }
         }
     }
     else if (e.Column.Name == "colRegione")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             if (app.Regione == null)
             {
                 e.DisplayText = "";
             }
             else
             {
                 e.DisplayText = app.Regione.Descrizione;
             }
         }
     }
     else if (e.Column.Name == "colImpegnoTotale")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.ImpegnoTotale.ToString("n2");
         }
     }
     else if (e.Column.Name == "colgen")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.gen.ToString("n2");
         }
     }
     else if (e.Column.Name == "colfeb")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.feb.ToString("n2");
         }
     }
     else if (e.Column.Name == "colmar")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.mar.ToString("n2");
         }
     }
     else if (e.Column.Name == "colapr")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.apr.ToString("n2");
         }
     }
     else if (e.Column.Name == "colmag")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.mag.ToString("n2");
         }
     }
     else if (e.Column.Name == "colgiu")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.giu.ToString("n2");
         }
     }
     else if (e.Column.Name == "collug")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.lug.ToString("n2");
         }
     }
     else if (e.Column.Name == "colago")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.ago.ToString("n2");
         }
     }
     else if (e.Column.Name == "colset")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.set.ToString("n2");
         }
     }
     else if (e.Column.Name == "colott")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.ott.ToString("n2");
         }
     }
     else if (e.Column.Name == "colnov")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.nov.ToString("n2");
         }
     }
     else if (e.Column.Name == "coldic")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.dic.ToString("n2");
         }
     }
     else if (e.Column.Name == "colalt")
     {
         Impegno app = gridView1.GetRow(e.RowHandle) as Impegno;
         if (app != null)
         {
             e.DisplayText = app.altreDate.ToString("n2");
         }
     }
 }
Esempio n. 18
0
        private void grvEmployee_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            try
            {
                if (e.Column.FieldName == "Sex")
                {
                    if (e.Value != null)
                    {
                        switch (e.Value)
                        {
                        case 0:
                            e.DisplayText = SexValue.Male.ToString();
                            break;

                        case 1:
                            e.DisplayText = SexValue.Female.ToString();
                            break;

                        case 2:
                            e.DisplayText = SexValue.Others.ToString();
                            break;
                        }
                    }
                }

                if (e.Column.FieldName == "JobRank")
                {
                    var datarow = grvEmployee.GetDataRow(e.ListSourceRowIndex);
                    switch (datarow["JobRankType"])
                    {
                    case 0:
                        e.DisplayText = JobRankValue.ProjectManager.ToString() + " " + datarow["JobRankLevel"];
                        break;

                    case 1:
                        e.DisplayText = JobRankValue.Developer.ToString() + " " + datarow["JobRankLevel"];;
                        break;

                    case 2:
                        e.DisplayText = JobRankValue.Tester.ToString() + " " + datarow["JobRankLevel"];;
                        break;

                    case 3:
                        e.DisplayText = JobRankValue.SolutionArchitect.ToString() + " " + datarow["JobRankLevel"];;
                        break;

                    case 4:
                        e.DisplayText = JobRankValue.BussinessAnalyst.ToString() + " " + datarow["JobRankLevel"];;
                        break;
                    }
                }
                if (e.Column.FieldName == "Salary")
                {
                    var datarow = grvEmployee.GetDataRow(e.ListSourceRowIndex);
                    e.DisplayText = datarow["SalaryLevel"].ToString() + "." + datarow["SalarySubLevel"];
                }
            }
            catch (Exception exp)
            {
                CommonFunctions.ShowErrorDialog("Error:" + exp.ToString());
                //  LogService.LogError("Error", ex);
            }
        }
Esempio n. 19
0
        //private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        //{
        //    if (e.RowHandle >= 0)
        //    {
        //        DataRow dr = this.efwGridControl1.GetSelectedRow(0);
        //        int nId = Convert.ToInt32(txtId.EditValue.ToString());
        //        if (nId != 0)
        //        {
        //            this.txtId.EditValue = dr["id"].ToString();
        //            popup = new frmDN01_Pop01();
        //            popup.Id = Convert.ToInt32(txtId.EditValue.ToString());
        //            txtId.EditValue = "0";
        //            popup.ShowDialog();
        //        }
        //    }

        //}

        private void listGridView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            if (e.Column.FieldName == "o_code")
            {
            }
        }
Esempio n. 20
0
        private void gridView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            switch (e.Column.FieldName.ToString())
            {
            case "Itm":
            case "Ctn":
            case "Issue":
            case "RmCtn":
            case "Pl":
            case "Plno":
            case "RmCon":
            case "ShCtn":
            case "Conn":
                try
                {
                    if (e.Value.ToString() == "0")
                    {
                        e.DisplayText = "";
                    }
                    else
                    {
                        e.DisplayText = string.Format("{0:n0}", int.Parse(e.Value.ToString()));
                    }
                }
                catch (Exception)
                {
                }
                break;

            case "Status":
                //new GreeterFunction().GetStatus(1, int.Parse(e.Value.ToString()));
                if (int.Parse(e.Value.ToString()) == StaticFunctionData.StatusSendGEDI)
                {
                    e.DisplayText = "Send GEDI";
                }
                else
                {
                    switch (e.Value.ToString())
                    {
                    case "0":
                        e.DisplayText = "JobList";
                        break;

                    case "1":
                        e.DisplayText = "Invoice";
                        break;

                    case "2":
                        e.DisplayText = "Prepare";
                        break;

                    case "3":
                        e.DisplayText = "Booking";
                        break;

                    case "4":
                        e.DisplayText = "Send GEDI";
                        break;

                    case "5":
                        e.DisplayText = "Closed";
                        break;

                    case "6":
                        e.DisplayText = "Closed";
                        break;

                    default:
                        e.DisplayText = "";
                        break;
                    }
                }
                break;

            case "Invoice":
                //e.Column.AppearanceCell.ForeColor = Color.DarkRed;
                break;

            default:
                break;
            }
        }
Esempio n. 21
0
 void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     if (string.Equals(e.Column.FieldName, "Birthday", StringComparison.CurrentCultureIgnoreCase))
     {
         if (e.Value != null && !string.IsNullOrEmpty(e.Value.ToString()))
         {
             e.DisplayText = Convert.ToDateTime(e.Value).ToString("yyyy-MM-dd");//yyyy-MM-dd
         }
     }
     else if (e.Column.ColumnType == typeof(DateTime))
     {
         string columnName = e.Column.FieldName;
         if (e.Value != null)
         {
             if (Convert.ToDateTime(e.Value) <= Convert.ToDateTime("1900-1-1"))
             {
                 e.DisplayText = "";
             }
             else
             {
                 e.DisplayText = Convert.ToDateTime(e.Value).ToString("yyyy-MM-dd HH:mm:ss");//yyyy-MM-dd
             }
         }
     }
     else if (string.Equals(e.Column.FieldName, "IsExpire", StringComparison.CurrentCultureIgnoreCase))
     {
         if (e.Value != null && !string.IsNullOrEmpty(e.Value.ToString()))
         {
             e.DisplayText = EnumHelper.GetMemberName <IsExpire>(e.Value);
         }
     }
     else if (string.Equals(e.Column.FieldName, "Password", StringComparison.CurrentCultureIgnoreCase))
     {
         e.DisplayText = "******";
     }
     else if (string.Equals(e.Column.FieldName, "Gender", StringComparison.CurrentCultureIgnoreCase))
     {
         if (e.Value != null && !string.IsNullOrEmpty(e.Value.ToString()))
         {
             e.DisplayText = EnumHelper.GetMemberName <Gender>(e.Value);
         }
     }
     else if (string.Equals(e.Column.FieldName, "AuditStatus", StringComparison.CurrentCultureIgnoreCase))
     {
         if (e.Value != null && !string.IsNullOrEmpty(e.Value.ToString()))
         {
             e.DisplayText = EnumHelper.GetMemberName <AuditStatus>(e.Value);
         }
     }
     else if (string.Equals(e.Column.FieldName, "CreatorId", StringComparison.CurrentCultureIgnoreCase))
     {
         if (e.Value != null && !string.IsNullOrEmpty(e.Value.ToString()) && Portal.gc.AllUserInfo.ContainsKey(e.Value.ToString().ToInt32()))
         {
             e.DisplayText = Portal.gc.AllUserInfo[e.Value.ToString().ToInt32()];
         }
     }
     else if (string.Equals(e.Column.FieldName, "EditorId", StringComparison.CurrentCultureIgnoreCase))
     {
         if (e.Value != null && !string.IsNullOrEmpty(e.Value.ToString()) && Portal.gc.AllUserInfo.ContainsKey(e.Value.ToString().ToInt32()))
         {
             e.DisplayText = Portal.gc.AllUserInfo[e.Value.ToString().ToInt32()];
         }
     }
     else if (string.Equals(e.Column.FieldName, "IsDelete", StringComparison.CurrentCultureIgnoreCase))
     {
         if (e.Value != null && !string.IsNullOrEmpty(e.Value.ToString()))
         {
             e.DisplayText = EnumHelper.GetMemberName <IsDelete>(e.Value);
         }
     }
     else if (string.Equals(e.Column.FieldName, "DeptId", StringComparison.CurrentCultureIgnoreCase))
     {
         if (e.Value != null && !string.IsNullOrEmpty(e.Value.ToString()) && Portal.gc.AllOuInfo.ContainsKey(e.Value.ToString().ToInt32()))
         {
             e.DisplayText = Portal.gc.AllOuInfo[e.Value.ToString().ToInt32()];
         }
     }
     else if (string.Equals(e.Column.FieldName, "CompanyId", StringComparison.CurrentCultureIgnoreCase))
     {
         if (e.Value != null && !string.IsNullOrEmpty(e.Value.ToString()) && Portal.gc.AllOuInfo.ContainsKey(e.Value.ToString().ToInt32()))
         {
             e.DisplayText = Portal.gc.AllOuInfo[e.Value.ToString().ToInt32()];
         }
     }
 }
        void View_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            DashboardFlatDataSource data = (DashboardFlatDataSource)grid.DataSource;

            e.DisplayText = data.GetDisplayText(e.Column.FieldName, e.ListSourceRowIndex);
        }
Esempio n. 23
0
 private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     if (e.Column.FieldName == "OutcomeDate")
     {
         MyAppointment app = gridView1.GetRow(e.RowHandle) as MyAppointment;
         if (app != null)
         {
             if (app.OutcomeDate == DateTime.MinValue)
             {
                 e.DisplayText = "";
             }
         }
     }
     else if (e.Column.Name == "colFiscale")
     {
         MyAppointment app = gridView1.GetRow(e.RowHandle) as MyAppointment;
         if (app != null)
         {
             if (app.Customer != null)
             {
                 e.DisplayText = app.Customer.CodiceFiscale;
             }
         }
     }
     else if (e.Column.Name == "colContatti")
     {
         MyAppointment app = gridView1.GetRow(e.RowHandle) as MyAppointment;
         if (app != null)
         {
             if (app.Customer != null)
             {
                 e.DisplayText = app.Customer.Residenza.ToString();
             }
         }
     }
     else if (e.Column.Name == "colTelContatti")
     {
         MyAppointment app = gridView1.GetRow(e.RowHandle) as MyAppointment;
         if (app != null)
         {
             if (app.Customer != null)
             {
                 e.DisplayText = app.Customer.Comunicazione.TelefonoUfficio;
             }
         }
     }
     else if (e.Column.Name == "colCell1")
     {
         MyAppointment app = gridView1.GetRow(e.RowHandle) as MyAppointment;
         if (app != null)
         {
             if (app.Customer != null)
             {
                 e.DisplayText = app.Customer.Comunicazione.Cellulare1;
             }
         }
     }
     else if (e.Column.Name == "colCell2")
     {
         MyAppointment app = gridView1.GetRow(e.RowHandle) as MyAppointment;
         if (app != null)
         {
             if (app.Customer != null)
             {
                 e.DisplayText = app.Customer.Comunicazione.Cellulare2;
             }
         }
     }
 }
Esempio n. 24
0
 private void gdvContra_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
 }
Esempio n. 25
0
        private void gridView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            //gridView.BeginUpdate();
            switch (e.Column.FieldName.ToString())
            {
            case "BalQty":
            case "BalCtn":
            case "ShCtn":
            case "RemCtn":
            case "LotSeq":
            case "PartRmCtn":
            case "CurCtn":
            case "WaitCtn":
                if (e.Value.ToString() == "0")
                {
                    e.DisplayText = "";
                }
                else if (int.Parse(e.Value.ToString()) < 1)
                {
                    e.DisplayText = "";
                }
                else
                {
                    e.DisplayText = string.Format("{0:n0}", int.Parse(e.Value.ToString()));
                }
                break;

            case "Status":
                e.DisplayText = "";
                switch (e.Value.ToString())
                {
                case "0":
                    e.DisplayText = "Wait";
                    break;

                //case "1":
                //    e.DisplayText = "1";
                //    break;
                case "2":
                    e.DisplayText = "On Procress";
                    break;

                //case "3":
                //    e.DisplayText = "3";
                //    break;
                case "4":
                    e.DisplayText = "Completed";
                    break;

                //case "5":
                //    break;
                //case "6":
                //    break;
                //case "7":
                //    break;
                //case "8":
                //    break;
                //case "9":
                //    break;
                default:
                    e.DisplayText = e.Value.ToString();
                    break;
                }
                break;

            default:
                break;
            }
            //gridView.EndUpdate();
        }
Esempio n. 26
0
 void view_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     e.DisplayText = String.Format("[{0}]", e.DisplayText);
 }
Esempio n. 27
0
 private void gridStokHareket_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
 }
Esempio n. 28
0
 private void grdView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     ProdutoServicoDTO produtoDTO = (ProdutoServicoDTO)ProdutoServicoBindingSource[e.ListSourceRowIndex];
 }
Esempio n. 29
0
 private void gridView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
 {
     return;
 }
Esempio n. 30
0
        private void grvJobKpiAssessment_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            try
            {
                if (e.Column.FieldName == "Status")
                {
                    if (e.Value != null)
                    {
                        switch (e.Value)
                        {
                        case 0:
                            e.DisplayText = AssessmentStatusValue.Started.ToString();
                            break;

                        case 1:
                            e.DisplayText = AssessmentStatusValue.Processing.ToString();
                            break;

                        case 2:
                            e.DisplayText = AssessmentStatusValue.Commit.ToString();
                            break;

                        case 3:
                            e.DisplayText = AssessmentStatusValue.Approving.ToString();
                            break;

                        case 4:
                            e.DisplayText = AssessmentStatusValue.Approved.ToString();
                            break;
                        }
                    }
                }
                if (e.Column.FieldName == "RoleInAssessment")
                {
                    if (e.Value != null)
                    {
                        switch (e.Value)
                        {
                        case 0:
                            e.DisplayText = JobRankValue.ProjectManager.ToString();
                            break;

                        case 1:
                            e.DisplayText = JobRankValue.Developer.ToString();
                            break;

                        case 2:
                            e.DisplayText = JobRankValue.Tester.ToString();
                            break;

                        case 3:
                            e.DisplayText = JobRankValue.SolutionArchitect.ToString();
                            break;

                        case 4:
                            e.DisplayText = JobRankValue.BussinessAnalyst.ToString();
                            break;
                        }
                    }
                }
            }
            catch (Exception exp)
            {
                CommonFunctions.ShowErrorDialog("Display error:" + exp.ToString());
                //  LogService.LogError("Error", ex);
            }
        }