Exemplo n.º 1
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsSaleFuelTransport entity = gridRow.DataItem as CmcsSaleFuelTransport;
                if (entity == null)
                {
                    return;
                }
                CmcsSupplier supplier = Dbers.GetInstance().SelfDber.Get <CmcsSupplier>(entity.SupplierId);
                if (supplier != null)
                {
                    gridRow.Cells["clmSupplier"].Value = supplier.Name;
                }
                CmcsFuelKind fuelkind = Dbers.GetInstance().SelfDber.Get <CmcsFuelKind>(entity.FuelKindId);
                if (fuelkind != null)
                {
                    gridRow.Cells["clmFuelKind"].Value = fuelkind.FuelName;
                }
                CmcsTransportCompany company = Dbers.GetInstance().SelfDber.Get <CmcsTransportCompany>(entity.TransportCompanyId);
                if (company != null)
                {
                    gridRow.Cells["clmTransportCompany"].Value = company.Name;
                }

                if (entity.SupplierId == "合计")
                {
                    gridRow.Cells["clmSupplier"].Value           = "合计";
                    gridRow.Cells["clmFuelKind"].Visible         = false;
                    gridRow.Cells["clmTransportCompany"].Visible = false;
                    gridRow.Cells["clmGrossTime"].Visible        = false;
                    gridRow.Cells["clmTareTime"].Visible         = false;
                }
            }
        }
Exemplo n.º 2
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                try
                {
                    CmcsCupCoardSaveDetail entity = gridRow.DataItem as CmcsCupCoardSaveDetail;
                    if (entity == null)
                    {
                        return;
                    }

                    // 填充有效状态
                    gridRow.Cells["CupBoardNumber"].Value = entity.TheSave.CupCoardNumber.ToString();
                    if (entity.SaveTime < DateTime.Now.AddDays(-Over_Day))
                    {
                        gridRow.Cells["glcmSaveTime"].CellStyles.Default.Background.Color1 = Color.Red;
                    }
                }
                catch (Exception)
                {
                }
            }
            #endregion
        }
Exemplo n.º 3
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow item in e.GridPanel.Rows)
            {
                try
                {
                    FulUnLoadPlanDetail entity = item.DataItem as FulUnLoadPlanDetail;
                    item.Cells["clmSupplierName"].Value = entity.TheLMYBDetail.TheLMYB.SupplierName;
                    item.Cells["clmMineName"].Value     = entity.TheLMYBDetail.TheLMYB.MineName;
                    item.Cells["clmIsUnload"].Value     = entity.IsUnLoad == "0" ? "未卸煤" : "已卸煤";
                    if (entity.IsUnLoad == "1")
                    {
                        item.Cells["operation"].Visible = false;
                    }

                    if (entity.TheLMYBDetail.TheLMYB.InFactoryType.Contains("入场"))
                    {
                        item.Cells["clmGrossTime"].Value   = entity.TheLMYBDetail.TheBuyFuelTransport.GrossTime.ToString("yyyy-MM-dd HH:mm:ss");
                        item.Cells["clmGrossWeight"].Value = entity.TheLMYBDetail.TheBuyFuelTransport.GrossWeight.ToString("f2");
                    }
                }
                catch (Exception)
                {
                }
            }
        }
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsBuyFuelTransport entity = gridRow.DataItem as CmcsBuyFuelTransport;
                if (entity == null)
                {
                    return;
                }

                // 填充有效状态
                gridRow.Cells["clmIsUse"].Value = (entity.IsUse == 1 ? "是" : "否");
                CmcsInFactoryBatch cmcsinfactorybatch = Dbers.GetInstance().SelfDber.Get <CmcsInFactoryBatch>(entity.InFactoryBatchId);
                if (cmcsinfactorybatch != null)
                {
                    gridRow.Cells["clmInFactoryBatchNumber"].Value = cmcsinfactorybatch.Batch;
                }

                //List<CmcsTransportPicture> cmcstrainwatchs = Dbers.GetInstance().SelfDber.Entities<CmcsTransportPicture>(String.Format(" where TransportId='{0}'", gridRow.Cells["clmId"].Value));
                //if (cmcstrainwatchs.Count == 0)
                //{
                //    //gridRow.Cells["clmPic"].Value = "";
                //}
            }
        }
Exemplo n.º 5
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsBuyFuelTransport entity = gridRow.DataItem as CmcsBuyFuelTransport;
                if (entity == null)
                {
                    return;
                }

                // 填充有效状态
                gridRow.Cells["clmIsUse"].Value = (entity.IsUse == 1 ? "是" : "否");

                //CmcsInFactoryBatch cmcsinfactorybatch = Dbers.GetInstance().SelfDber.Get<CmcsInFactoryBatch>(entity.InFactoryBatchId);
                //if (cmcsinfactorybatch != null)
                //{
                //    gridRow.Cells["clmInFactoryBatchNumber"].Value = cmcsinfactorybatch.Batch;
                //}
            }

            object[] sum = new object[17] {
                "合计", "", "", "", "", "车数:" + CurrExportData.Count, "", "", "", CurrExportData.Sum(a => a.TicketWeight), "", CurrExportData.Sum(a => a.GrossWeight), CurrExportData.Sum(a => a.TareWeight), CurrExportData.Sum(a => a.DeductWeight), CurrExportData.Sum(a => a.SuttleWeight), "", ""
            };

            this.superGridControl1.PrimaryGrid.Rows.Insert(superGridControl1.PrimaryGrid.Rows.Count, new DevComponents.DotNetBar.SuperGrid.GridRow(sum));
        }
Exemplo n.º 6
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridColumn co in this.superGridControl1.PrimaryGrid.Columns)
            {
                if (co.Name == "clmAlert")
                {
                    if (SelfVars.LoginUser.UserName == "系统管理员")
                    {
                        co.Visible = true;

                        this.superGridControl1.PrimaryGrid.FrozenColumnCount = 3;
                    }
                    else
                    {
                        co.Visible = false;

                        this.superGridControl1.PrimaryGrid.FrozenColumnCount = 2;
                    }
                }
            }

            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsBuyFuelTransport entity = gridRow.DataItem as CmcsBuyFuelTransport;
                if (entity == null)
                {
                    return;
                }
            }
        }
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsSaleFuelTransport cmcsSaleFuelTransport = gridRow.DataItem as CmcsSaleFuelTransport;
                if (cmcsSaleFuelTransport == null)
                {
                    break;
                }
                gridRow.Cells["clmIsUse"].Value = ((cmcsSaleFuelTransport.IsUse == 1) ? "是" : "否");

                gridRow.Cells["SupplierName"].Value = cmcsSaleFuelTransport.TheSupplier != null ? cmcsSaleFuelTransport.TheSupplier.Name : "";
                CmcsTransportCompany cmcsTransportCompany = Dbers.GetInstance().SelfDber.Get <CmcsTransportCompany>(cmcsSaleFuelTransport.TransportCompanyId);
                if (cmcsTransportCompany != null)
                {
                    gridRow.Cells["TransportCompanyName"].Value = cmcsTransportCompany.Name;
                }
                if (cmcsSaleFuelTransport.GrossWeight > 0 || cmcsSaleFuelTransport.TareWeight > 0)
                {
                    gridRow.Cells["clmDelete"].Value = "";
                }
                if (cmcsSaleFuelTransport.GrossWeight > 0m && cmcsSaleFuelTransport.TareWeight > 0m)
                {
                    gridRow.CellStyles.Default.TextColor = System.Drawing.Color.Green;
                }
                else if (cmcsSaleFuelTransport.GrossWeight == 0m && cmcsSaleFuelTransport.TareWeight == 0m)
                {
                    gridRow.CellStyles.Default.TextColor = System.Drawing.Color.Red;
                }
            }
        }
Exemplo n.º 8
0
 private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow gridRow in e.GridPanel.Rows)
     {
         CmcsBuyFuelTransport entity = gridRow.DataItem as CmcsBuyFuelTransport;
         if (entity == null)
         {
             return;
         }
     }
 }
Exemplo n.º 9
0
 private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow item in e.GridPanel.Rows)
     {
         try
         {
         }
         catch (Exception)
         {
         }
     }
 }
Exemplo n.º 10
0
 private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow item in e.GridPanel.Rows)
     {
         try
         {
             CmcsBuyFuelTransport entity = item.DataItem as CmcsBuyFuelTransport;
         }
         catch (Exception)
         {
         }
     }
 }
Exemplo n.º 11
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                SysModule entity = gridRow.DataItem as SysModule;
                if (entity == null)
                {
                    return;
                }

                gridRow.Cells["clmStopUse"].Value = (entity.StopUse == 1 ? "启用" : "停用");
            }
        }
Exemplo n.º 12
0
 private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow gridRow in e.GridPanel.Rows)
     {
         CmcsFinger entity = gridRow.DataItem as CmcsFinger;
         if (entity == null)
         {
             return;
         }
         gridRow.Cells["clmUserAccount"].Value = this.User.UserAccount;
         gridRow.Cells["clmUserName"].Value    = this.User.UserName;
     }
 }
Exemplo n.º 13
0
 private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow gridRow in e.GridPanel.Rows)
     {
         View_BuyFuelTransport entity = gridRow.DataItem as View_BuyFuelTransport;
         if (entity == null)
         {
             return;
         }
         CmcsBuyFuelTransport entity2 = Dbers.GetInstance().SelfDber.Get <CmcsBuyFuelTransport>(entity.Id);
         gridRow.Cells["clmKsWeight"].Value = entity2.AutoKsWeight + entity2.KsWeight;
     }
 }
Exemplo n.º 14
0
 private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow gridRow in e.GridPanel.Rows)
     {
         User entity = gridRow.DataItem as User;
         if (entity == null)
         {
             return;
         }
         gridRow.Cells["clmFingerCount"].Value = Dbers.GetInstance().SelfDber.Count <CmcsFinger>("where UserId=:UserId", new { UserId = entity.PartyId });
         // 填充有效状态
         gridRow.Cells["clmIsUse"].Value = (entity.Stop == 0 ? "是" : "否");
     }
 }
Exemplo n.º 15
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsGoodsTransport entity = gridRow.DataItem as CmcsGoodsTransport;
                if (entity == null)
                {
                    return;
                }

                // 填充有效状态
                gridRow.Cells["clmIsUse"].Value = (entity.IsUse == 1 ? "是" : "否");
            }
        }
Exemplo n.º 16
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsSupplier entity = gridRow.DataItem as CmcsSupplier;
                if (entity == null)
                {
                    return;
                }

                // 填充有效状态
                gridRow.Cells["clmIsUse"].Value = entity.IsStop == "0"?"有效":"无效";
            }
        }
Exemplo n.º 17
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow item in e.GridPanel.Rows)
            {
                try
                {
                    CmcsAutotruck CmcsAutotruck = item.DataItem as CmcsAutotruck;

                    item.Cells["cellIsUse"].Value = CmcsAutotruck.IsUse == 1 ? "有效" : (CmcsAutotruck.IsUse == -1 ? "黑名单" : "无效");
                }
                catch (Exception)
                {
                }
            }
        }
Exemplo n.º 18
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsAutotruck entity = gridRow.DataItem as CmcsAutotruck;
                if (entity == null)
                {
                    return;
                }

                // 填充有效状态
                gridRow.Cells["clmIsUse"].Value      = (entity.IsUse == 1 ? "是" : "否");
                gridRow.Cells["clmCardNumber"].Value = Dbers.GetInstance().SelfDber.Get <CmcsEPCCard>(entity.EPCCardId).CardNumber;
            }
        }
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsVisitTransport entity = gridRow.DataItem as CmcsVisitTransport;
                if (entity == null)
                {
                    return;
                }


                // 填充有效状态
                gridRow.Cells["clmOutFactoryTime"].Value = entity.OutFactoryTime.Year == 1 ? "" : entity.OutFactoryTime.ToString();
            }
        }
Exemplo n.º 20
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsUser entity = gridRow.DataItem as CmcsUser;
                if (entity == null)
                {
                    return;
                }

                gridRow.Cells["clmIsUse"].Value = (entity.IsUse == 1 ? "启用" : "停用");

                // 填充有效状态
                gridRow.Cells["clmIsSupper"].Value = (entity.IsSupper == 1 ? "超级管理员" : "普通用户");
            }
        }
Exemplo n.º 21
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow item in e.GridPanel.Rows)
            {
                try
                {
                    CmcsLMYBDetail entity = item.DataItem as CmcsLMYBDetail;
                    item.Cells["clmSupplierName"].Value = entity.TheLMYB.SupplierName;
                    item.Cells["clmMineName"].Value     = entity.TheLMYB.MineName;

                    item.Cells["clmStepName"].Value = "等待入场";
                    if (entity.IsFinish == "已完成")
                    {
                        item.Cells["operation"].Visible = false;
                    }
                    if (this.Type == "入场煤")
                    {
                        CmcsBuyFuelTransport transport = Dbers.GetInstance().SelfDber.Entity <CmcsBuyFuelTransport>("where LMYBDetailId=:LMYBDetailId order by CreateDate desc", new { LMYBDetailId = entity.Id });
                        if (transport != null)
                        {
                            item.Cells["clmInFactoryTime"].Value = transport.InFactoryTime.ToString("yyyy-MMM-dd");
                            item.Cells["clmStepName"].Value      = transport.StepName;
                        }
                    }
                    else
                    {
                        CmcsSaleFuelTransport transport = Dbers.GetInstance().SelfDber.Entity <CmcsSaleFuelTransport>("where LMYBDetailId=:LMYBDetailId order by CreateDate desc", new { LMYBDetailId = entity.Id });
                        if (transport != null)
                        {
                            item.Cells["clmInFactoryTime"].Value = transport.InFactoryTime.ToString("yyyy-MMM-dd");
                            item.Cells["clmStepName"].Value      = transport.StepName;
                        }
                    }

                    CmcsAutotruck autoTruck = Dbers.GetInstance().SelfDber.Entity <CmcsAutotruck>("where CarNumber=:CarNumber order by CreateDate desc", new { CarNumber = entity.CarNumber });
                    if (autoTruck != null)
                    {
                        item.Cells["clmDriver"].Value      = autoTruck.Driver;
                        item.Cells["clmPhoneNumber"].Value = autoTruck.CellPhoneNumber;
                    }
                }
                catch (Exception)
                {
                }
            }
        }
Exemplo n.º 22
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow item in e.GridPanel.Rows)
            {
                try
                {
                    StorageTemperature entity = item.DataItem as StorageTemperature;

                    item.Cells["cellPointX"].Value      = entity.PointX.ToString("f2");
                    item.Cells["cellPointY"].Value      = entity.PointY.ToString("f2");
                    item.Cells["cellTemperature"].Value = entity.Temperature.ToString("f2");
                }
                catch (Exception)
                {
                }
            }
        }
Exemplo n.º 23
0
        private void superGridControl3_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                InfQCJXCYUnLoadCMD entity = gridRow.DataItem as InfQCJXCYUnLoadCMD;
                if (entity == null)
                {
                    return;
                }

                User user = Dbers.GetInstance().SelfDber.Entity <User>(" where UserAccount= '" + entity.CreateUser + "'");
                if (user != null)
                {
                    gridRow.Cells["CreateUser"].Value = (user.UserName);
                }
            }
        }
Exemplo n.º 24
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsCarModel entity = gridRow.DataItem as CmcsCarModel;
                if (entity == null)
                {
                    return;
                }

                gridRow.Cells["Obstacle1"].Value = entity.LeftObstacle1 + "|" + entity.RightObstacle1;
                gridRow.Cells["Obstacle2"].Value = entity.LeftObstacle2 + "|" + entity.RightObstacle2;
                gridRow.Cells["Obstacle3"].Value = entity.LeftObstacle3 + "|" + entity.RightObstacle3;
                gridRow.Cells["Obstacle4"].Value = entity.LeftObstacle4 + "|" + entity.RightObstacle4;
                gridRow.Cells["Obstacle5"].Value = entity.LeftObstacle5 + "|" + entity.RightObstacle5;
                gridRow.Cells["Obstacle6"].Value = entity.LeftObstacle6 + "|" + entity.RightObstacle6;
            }
        }
Exemplo n.º 25
0
 private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow gridRow in e.GridPanel.Rows)
     {
         CmcsBuyFuelTransport entity = gridRow.DataItem as CmcsBuyFuelTransport;
         if (entity == null)
         {
             return;
         }
         gridRow.Cells["clmKsWeight"].Value = entity.AutoKsWeight + entity.KsWeight;
         if (entity.MineName == "合计")
         {
             gridRow.Cells["clmFuelKind"].Visible  = false;
             gridRow.Cells["clmGrossTime"].Visible = false;
             gridRow.Cells["clmTareTime"].Visible  = false;
         }
     }
 }
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsBuyFuelTransport entity = gridRow.DataItem as CmcsBuyFuelTransport;
                if (entity == null)
                {
                    return;
                }

                // 填充有效状态
                gridRow.Cells["clmIsUse"].Value = (entity.IsUse == 1 ? "是" : "否");
                // 填充是否已打印状态
                gridRow.Cells["clmIsPrint"].Value = (entity.IsPrint == 1 ? "已打印" : "");
                CmcsInFactoryBatch cmcsinfactorybatch = Dbers.GetInstance().SelfDber.Get <CmcsInFactoryBatch>(entity.InFactoryBatchId);
                if (cmcsinfactorybatch != null)
                {
                    gridRow.Cells["clmInFactoryBatchNumber"].Value = cmcsinfactorybatch.Batch;
                }
                if (!HasShowSupplier)
                {
                    gridRow.Cells["clmSupplierName"].Value = "****";
                    gridRow.Cells["clmFuelKind"].Value     = "****";
                    gridRow.Cells["clmMineName"].Value     = "****";
                }
                if (entity.SerialNumber == "合计")
                {
                    gridRow.Cells["clmPrint"].Value  = string.Empty;
                    gridRow.Cells["clmShow"].Value   = string.Empty;
                    gridRow.Cells["clmEdit"].Value   = string.Empty;
                    gridRow.Cells["clmDelete"].Value = string.Empty;
                    gridRow.Cells["clmPic"].Value    = string.Empty;

                    gridRow.Cells["clmInFactoryTime"].Visible = false;
                    gridRow.Cells["clmIsUse"].Visible         = false;
                }

                //List<CmcsTransportPicture> cmcstrainwatchs = Dbers.GetInstance().SelfDber.Entities<CmcsTransportPicture>(String.Format(" where TransportId='{0}'", gridRow.Cells["clmId"].Value));
                //if (cmcstrainwatchs.Count == 0)
                //{
                //    //gridRow.Cells["clmPic"].Value = "";
                //}
            }
        }
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                CmcsBuyFuelTransport entity = gridRow.DataItem as CmcsBuyFuelTransport;
                if (entity == null)
                {
                    return;
                }

                // 填充有效状态
                gridRow.Cells["clmIsUse"].Value = (entity.IsUse == 1 ? "是" : "否");
                CmcsInFactoryBatch cmcsinfactorybatch = Dbers.GetInstance().SelfDber.Get <CmcsInFactoryBatch>(entity.InFactoryBatchId);
                if (cmcsinfactorybatch != null)
                {
                    gridRow.Cells["clmInFactoryBatchNumber"].Value = cmcsinfactorybatch.Batch;
                }
                CmcsSupplier cmcssupplier = Dbers.GetInstance().SelfDber.Get <CmcsSupplier>(entity.SupplierId);
                if (cmcssupplier != null)
                {
                    gridRow.Cells["SupplierName"].Value = cmcssupplier.Name;
                }

                //List<CmcsTransportPicture> cmcstrainwatchs = Dbers.GetInstance().SelfDber.Entities<CmcsTransportPicture>(String.Format(" where TransportId='{0}'", gridRow.Cells["clmId"].Value));
                //if (cmcstrainwatchs.Count == 0)
                //{
                //    //gridRow.Cells["clmPic"].Value = "";
                //}
                if (entity.GrossWeight > 0 || entity.TareWeight > 0)
                {
                    gridRow.Cells["clmDelete"].Value = "";
                }
                if (entity.GrossWeight > 0 && entity.TareWeight > 0)
                {
                    gridRow.CellStyles.Default.TextColor = Color.Green;
                }
                else if (entity.GrossWeight == 0 && entity.TareWeight == 0)
                {
                    gridRow.CellStyles.Default.TextColor = Color.Red;
                }
            }
        }
Exemplo n.º 28
0
        private void sdgvCallLog_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            try
            {
                GridPanel GP = e.GridPanel;
                foreach (GridColumn GC in GP.Columns)
                {
                    GC.RenderType = typeof(GridLabelXEditControl);
                    switch (GC.Name.ToUpper())
                    {
                    case "LOGINID":
                        GC.HeaderText = "Agent";
                        break;

                    case "STATIONID":
                        GC.HeaderText = "Ext";
                        break;

                    case "DURATION":
                        GC.HeaderText = "Duration";
                        break;

                    case "DATETIMESTAMP":
                        GC.HeaderText = "Date";
                        break;

                    case "TELEPHONENUMBER":
                        GC.HeaderText = "Number";
                        break;

                    default:
                        GC.Visible = false;
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                GM.Error_Log(System.Reflection.MethodBase.GetCurrentMethod(), ex, true, true);
            }
        }
Exemplo n.º 29
0
        private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow item in e.GridPanel.Rows)
            {
                try
                {
                    CmcsLMYB CmcsLMYB = item.DataItem as CmcsLMYB;

                    CmcsSupplier fuelSupplier = Dbers.GetInstance().SelfDber.Get <CmcsSupplier>(CmcsLMYB.FuelSupplierId);
                    if (fuelSupplier != null)
                    {
                        item.Cells["cellFuelSupplierName"].Value = fuelSupplier != null ? fuelSupplier.Name : "";
                    }
                    item.Cells["cellInFactoryTime"].Value = CmcsLMYB.InFactoryTime.ToString("yyyy/MM/dd");

                    item.Cells["cellCoalNumber"].Value = CmcsLMYB.CoalNumber.ToString("f2");
                }
                catch (Exception)
                {
                }
            }
        }
Exemplo n.º 30
0
 private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow item in e.GridPanel.Rows)
     {
         try
         {
             CmcsBuyFuelTransport cmcsBuyFuelTransport = item.DataItem as CmcsBuyFuelTransport;
             item.Cells["cellGrossWeight"].Value  = cmcsBuyFuelTransport.GrossWeight.ToString("f2");
             item.Cells["cellTareWeight"].Value   = cmcsBuyFuelTransport.TareWeight.ToString("f2");
             item.Cells["cellSuttleWeight"].Value = cmcsBuyFuelTransport.SuttleWeight.ToString("f2");
             item.Cells["cellKgWeight"].Value     = cmcsBuyFuelTransport.KgWeight.ToString("f2");
             item.Cells["cellKsWeight"].Value     = cmcsBuyFuelTransport.KsWeight.ToString("f2");
             item.Cells["cellkdzt"].Value         = (cmcsBuyFuelTransport.KgWeight + cmcsBuyFuelTransport.KsWeight) > 0 ? "ÒÑ¿Û¶Ö" : "";
             if (cmcsBuyFuelTransport.SuttleWeight > 0)
             {
                 item.Cells["operation"].Visible = false;
             }
         }
         catch (Exception)
         {
         }
     }
 }
Exemplo n.º 31
0
        /// <summary>
        /// Handles invocation of DataBindingComplete events
        /// </summary>
        internal void DoDataBindingCompleteEvent(GridPanel gridPanel)
        {
            if (DataBindingComplete != null)
            {
                GridDataBindingCompleteEventArgs ev = new
                    GridDataBindingCompleteEventArgs(gridPanel);

                DataBindingComplete(this, ev);
            }
        }
Exemplo n.º 32
0
 private void uiWeeklyDataTable_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     uiWeeklyData_superGridControlTable.PrimaryGrid.Columns["id"].CellStyles.Default.TextColor = Color.White;
     uiWeeklyData_superGridControlTable.PrimaryGrid.Columns["id"].FillWeight = 20;
     uiWeeklyData_superGridControlTable.PrimaryGrid.Columns["id"].HeaderText = "";
     e.GridPanel.ExpandImage = _expandimage;
     e.GridPanel.CollapseImage = _collapseimage;
     e.GridPanel.DefaultVisualStyles.ColumnHeaderStyles.Default.Background.Color1 = Color.DodgerBlue;
     e.GridPanel.DefaultVisualStyles.ColumnHeaderStyles.Default.Background.Color2 = Color.DodgerBlue;
 }