private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow item in e.GridPanel.Rows)
            {
                try
                {
                    CmcsSaleFuelTransport cmcsBuyFuelTransport = item.DataItem as CmcsSaleFuelTransport;

                    CmcsFuelKind fk = Dbers.GetInstance().SelfDber.Get <CmcsFuelKind>(cmcsBuyFuelTransport.FuelKindId);
                    item.Cells["FuelKindName"].Value = fk != null ? fk.FuelName : "";

                    CmcsSupplier sp = Dbers.GetInstance().SelfDber.Get <CmcsSupplier>(cmcsBuyFuelTransport.SupplierId);
                    item.Cells["SupplierName"].Value = sp != null ? sp.Name : "";

                    CmcsTransportCompany tc = Dbers.GetInstance().SelfDber.Get <CmcsTransportCompany>(cmcsBuyFuelTransport.TransportCompanyId);
                    item.Cells["TransportCompanyName"].Value = tc != null ? tc.Name : "";

                    item.Cells["cellGrossWeight"].Value  = cmcsBuyFuelTransport.GrossWeight.ToString("f2");
                    item.Cells["cellTareWeight"].Value   = cmcsBuyFuelTransport.TareWeight.ToString("f2");
                    item.Cells["cellSuttleWeight"].Value = cmcsBuyFuelTransport.SuttleWeight.ToString("f2");

                    if (cmcsBuyFuelTransport.CarNumber != "总计")
                    {
                        item.Cells["cellInFactoryTime"].Value = cmcsBuyFuelTransport.InFactoryTime.ToShortDateString();
                    }
                }
                catch (Exception)
                {
                }
            }
        }
Beispiel #2
0
        private void SuperGridControl1DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            GridPanel panel = e.GridPanel;

            panel.GroupByRow.Visible = true;

            switch (panel.DataMember)
            {
            case "pPedidosAlm":
                CustomizePedPanel(panel);
                break;

            case "pRengPedAlm":
                CustomizeRengPanel(panel);
                break;

            case "pPedidosRet":
                CustomizePedPanel(panel);
                break;

            case "pRengPedRet":
                CustomizeRengPanel(panel);
                break;
            }
        }
Beispiel #3
0
 private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow gridRow in e.GridPanel.Rows)
     {
         InfCYGSam entity = gridRow.DataItem as InfCYGSam;
     }
 }
Beispiel #4
0
 private void usgSource_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow row in e.GridPanel.Rows)
     {
         row.Cells["colAddReserve"].Value = "<a href='#'>备货</a>";
     }
 }
 private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow gridRow in e.GridPanel.Rows)
     {
         InfCYGSam entity = gridRow.DataItem as InfCYGSam;
         gridRow.Cells["clmAssayCode"].Value = autoCupboardDAO.GetAssayCodeByMakeDetailCode(entity.Code);
     }
 }
 private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     //第一次加载时选中第一条
     foreach (GridRow item in superGridControl1.PrimaryGrid.Rows)
     {
         InfBalanceRecord entity = item.DataItem as InfBalanceRecord;
     }
 }
 private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow gridRow in e.GridPanel.Rows)
     {
         CmcsAppletLog entity = gridRow.DataItem as CmcsAppletLog;
         gridRow.Cells["clmContent"].Value = entity.Content.Replace(Environment.NewLine, "");
         //gridRow.Cells["clmContent"].Value = entity.Content.Replace("\r", "").Replace("\n", "");
     }
 }
Beispiel #8
0
 private void superGridErrorMain_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     foreach (GridColumn GC in superGridErrorMain.PrimaryGrid.Columns)
     {
         if (GC.DataPropertyName.ToUpper() != "MESSAGE")
         {
             GC.Visible = false;
         }
     }
 }
Beispiel #9
0
        private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            if (list.Count > 0)
            {
                object[] sum = new object[11] {
                    "合计", "", "", "", "", "", "车数:" + list.Count, list.Sum(a => a.TicketWeight), list.Sum(a => a.GrossWeight), list.Sum(a => a.TareWeight), list.Sum(a => a.SuttleWeight)
                };

                this.superGridControl1.PrimaryGrid.Rows.Insert(superGridControl1.PrimaryGrid.Rows.Count, new DevComponents.DotNetBar.SuperGrid.GridRow(sum));
            }
        }
 private void superGridControl2_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow item in superGridControl2.PrimaryGrid.Rows)
     {
         InfBalanceRecordDetail entity = item.DataItem as InfBalanceRecordDetail;
         item.Cells["clmDetailStatus"].Value = entity.SyncFlag == 0 ? "未提交" : "已提交";
         if (entity.SyncFlag == 1)
         {
             item.Cells["clmDetailCheck"].ReadOnly = true;
         }
     }
 }
Beispiel #11
0
 private void usgNoticed_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow row in e.GridPanel.Rows)
     {
         int NoticeQty   = row.Cells["colNoticeQty"].Value.ToInt32();
         int PurchaseQty = row.Cells["colPurchaseQty"].Value.ToInt32();
         if (PurchaseQty == 0)
         {
             row.Cells["colOperator"].Value = "<a href='#'>取消采购</a>";
         }
     }
 }
Beispiel #12
0
        private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow item in e.GridPanel.Rows)
            {
                try
                {
                    CmcsTrainRecognition CmcsTrainRecognition = item.DataItem as CmcsTrainRecognition;

                    item.Cells["cellMACHINECODE"].Value = "#" + CmcsTrainRecognition.MACHINECODE + "翻车机";
                }
                catch (Exception)
                {
                }
            }
        }
Beispiel #13
0
        private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow item in e.GridPanel.Rows)
            {
                try
                {
                    CmcsBuyFuelTransport cmcsBuyFuelTransport = item.DataItem as CmcsBuyFuelTransport;

                    item.Cells["cellPASSWEIGHT"].Value = cmcsBuyFuelTransport.PASSWEIGHT.ToString("f2");
                }
                catch (Exception)
                {
                }
            }
        }
Beispiel #14
0
 private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow grid in e.GridPanel.Rows)
     {
         CmcsRCSampleBarrel entity = grid.DataItem as CmcsRCSampleBarrel;
         if (entity == null)
         {
             return;
         }
         if (entity.PrintCount > 0)
         {
             grid.CellStyles.Default.TextColor = Color.Green;
         }
     }
 }
Beispiel #15
0
 private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     foreach (GridRow gridRow in e.GridPanel.Rows)
     {
         CmcsInFactoryBatch entity = gridRow.DataItem as CmcsInFactoryBatch;
         if (entity == null)
         {
             return;
         }
         gridRow.Cells["clmSupplierName"].Value     = entity.TheSupplier != null ? entity.TheSupplier.Name : "";
         gridRow.Cells["clmMineName"].Value         = entity.TheMine != null ? entity.TheMine.Name : "";
         gridRow.Cells["clmFuelKindName"].Value     = entity.TheFuelKind != null ? entity.TheFuelKind.FuelName : "";
         gridRow.Cells["clmFuelSupplierName"].Value = entity.TheFuelSupplier != null ? entity.TheFuelSupplier.Name : "";
     }
 }
 private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     //第一次加载时选中第一条
     foreach (GridRow item in superGridControl1.PrimaryGrid.Rows)
     {
         InfBalanceRecord entity = item.DataItem as InfBalanceRecord;
         if (entity.Id == this.CurrentAssay.Id)
         {
             item.Cells["clmCheck"].Value = 1;
         }
         else
         {
             item.Cells["clmCheck"].Value = 0;
         }
     }
 }
Beispiel #17
0
        /// <summary>
        /// 设置项目经理背景颜色
        /// 2017/06/12(zhuguanjun)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            List <GridElement> listRow = superGridControl1.PrimaryGrid.Rows.ToList();
            int type = 0;

            foreach (GridElement obj in listRow)
            {
                GridRow row = (GridRow)obj;
                type = int.Parse(row.GetCell("IsPublic").Value.ToString());
                if (type != 0)
                {
                    CellVisualStyles style = new CellVisualStyles();
                    style.Default.Background.Color1 = Color.CornflowerBlue;
                    row.CellStyles = style;
                }
            }
        }
Beispiel #18
0
        void SuperGridControl1DataBindingComplete(
            object sender, GridDataBindingCompleteEventArgs e)
        {
            GridPanel panel = e.GridPanel;

            panel.GroupByRow.Visible = true;

            switch (panel.DataMember)
            {
            case "Table":
                //CustomizeCustomerPanel(panel);
                break;

            case "Table1":
                CustomizeOrdersPanel(panel);
                UpdateFooter(panel);
                break;
            }
        }
        /// <summary>
        /// This routine is called after each bindable data portion has
        /// been completed. This callout lets you customize the display
        /// or visibility of the data however the application needs.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void SuperGridControl1DataBindingComplete(
            object sender, GridDataBindingCompleteEventArgs e)
        {
            GridPanel panel = e.GridPanel;

            switch (panel.DataMember)
            {
            case "Customers":
                CustomizeCustomerPanel(panel);
                break;

            case "Orders":
                CustomizeOrdersPanel(panel);
                break;

            case "Order Details":
                CustomizeDetailsPanel(panel);
                break;
            }
        }
        private void SuperGridControl1DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            GridPanel panel = e.GridPanel;

            //panel.GroupByRow.Visible = true;
            switch (panel.DataMember)
            {
            case "Register":
                CustomizeRegisterPanel(panel);
                break;

            case "PayRecords":
                CustomizePayRecordsPanel(panel);
                break;

            case "PayRecordDetails":
                CustomizeDetailsPanel(panel);
                break;
            }
        }
Beispiel #21
0
        private void usgNoNoticed_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow row in e.GridPanel.Rows)
            {
                int qty       = row.Cells["colQty"].Value.ToInt32();
                int notifyQty = row.Cells["colNotifyQty"].Value.ToInt32();
                int spotQty   = row.Cells["colSpotQty"].Value.ToInt32();


                if (qty - notifyQty - spotQty > 0)
                {
                    int needNotifyQty = qty - notifyQty - spotQty;
                    row.Cells["colNeedNotifyQty"].Value = needNotifyQty;
                    row.Cells["colCurrentQty"].Value    = needNotifyQty;
                }
                else
                {
                    row.Cells["colNeedNotifyQty"].Value = 0;
                }
            }
        }
        private void superGridControl_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow gridRow in e.GridPanel.Rows)
            {
                try
                {
                    CmcsLMYB entity = gridRow.DataItem as CmcsLMYB;
                    if (entity == null)
                    {
                        return;
                    }

                    // 填充有效状态
                    gridRow.Cells["clmTransportCompanyName"].Value = entity.TheTransportCompany.Name;
                }
                catch (Exception ex)
                {
                    Log4Neter.Error("出场煤调运加载", ex);
                }
            }
        }
Beispiel #23
0
        private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow item in e.GridPanel.Rows)
            {
                try
                {
                    CmcsBuyFuelTransport cmcsBuyFuelTransport = item.DataItem as CmcsBuyFuelTransport;

                    item.Cells["cellTicketWeight"].Value = cmcsBuyFuelTransport.TicketWeight.ToString("f2");
                    item.Cells["cellGrossWeight"].Value  = cmcsBuyFuelTransport.GrossWeight.ToString("f2");
                    item.Cells["cellTareWeight"].Value   = cmcsBuyFuelTransport.TareWeight.ToString("f2");
                    item.Cells["cellSuttleWeight"].Value = cmcsBuyFuelTransport.SuttleWeight.ToString("f2");

                    if (cmcsBuyFuelTransport.CarNumber != "总计")
                    {
                        item.Cells["cellInFactoryTime"].Value = cmcsBuyFuelTransport.InFactoryTime.ToShortDateString();
                    }
                }
                catch (Exception)
                {
                }
            }
        }
Beispiel #24
0
        private void superGridControl1_DataBindingComplete_1(object sender, GridDataBindingCompleteEventArgs e)
        {
            foreach (GridRow item in e.GridPanel.Rows)
            {
                try
                {
                    CmcsTrainWeightRecord TrainWeight = item.DataItem as CmcsTrainWeightRecord;

                    item.Cells["cellTicketWeight"].Value   = TrainWeight.TicketWeight.ToString("f2");
                    item.Cells["cellGrossWeight"].Value    = TrainWeight.GrossWeight.ToString("f2");
                    item.Cells["cellSkinWeight"].Value     = TrainWeight.SkinWeight.ToString("f2");
                    item.Cells["cellStandardWeight"].Value = TrainWeight.StandardWeight.ToString("f2");

                    if (TrainWeight.TrainNumber != "总计")
                    {
                        item.Cells["cellSpeed"].Value     = TrainWeight.Speed.ToString("f2");
                        item.Cells["cellGrossTime"].Value = TrainWeight.GrossTime.Year > 2010 ? TrainWeight.GrossTime.ToShortDateString() : "";
                    }
                }
                catch (Exception)
                {
                }
            }
        }
Beispiel #25
0
 private void sdgvEmails_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
 }
Beispiel #26
0
 private void sgcStock_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
 }
Beispiel #27
0
        private void sdgvScrapedContacts_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            foreach (GridColumn DC in sdgvScrapedContacts.PrimaryGrid.Columns)
            {
                if (DC.Name == "Action")
                {
                    //DC.Width = 25;
                    DC.FillWeight   = 7;
                    DC.DisplayIndex = 0;
                }
                else
                {
                    DC.HeaderText = GM.ProperCase(DC.Name.Replace("_", " "));
                    DC.ReadOnly   = true;

                    if (DC.Name.ToUpper() == "MASTER_ID")
                    {
                        DC.DisplayIndex = 1;
                        DC.HeaderText   = "ID";
                        DC.FillWeight   = 10;
                    }
                    else if (DC.Name.ToUpper() == "COMPANY_NAME")
                    {
                        DC.DisplayIndex = 2;
                        DC.HeaderText   = "Input Company";
                        DC.FillWeight   = 40;
                    }
                    else if (DC.Name.ToUpper() == "DM_COMPANYNAME")
                    {
                        DC.DisplayIndex = 3;
                        DC.HeaderText   = "Output Company";
                        DC.FillWeight   = 40;
                    }
                    else if (DC.Name.ToUpper() == "OTHERS_JOBTITLE")
                    {
                        DC.DisplayIndex = 4;
                        DC.HeaderText   = "Jobtitle";
                        DC.FillWeight   = 50;
                    }
                    else if (DC.Name.ToUpper() == "FIRST_NAME")
                    {
                        DC.DisplayIndex = 5;
                        DC.FillWeight   = 20;
                    }
                    else if (DC.Name.ToUpper() == "LAST_NAME")
                    {
                        DC.DisplayIndex = 6;
                        DC.FillWeight   = 20;
                    }
                    else if (DC.Name.ToUpper() == "CONTACT_LINK")
                    {
                        DC.DisplayIndex = 7;
                        DC.FillWeight   = 70;

                        Font X = new Font(sdgvScrapedContacts.Font.FontFamily, sdgvScrapedContacts.Font.Size, FontStyle.Underline);
                        DC.CellStyles.Default.Font      = X;
                        DC.CellStyles.Default.TextColor = Color.Blue;
                    }
                    else
                    {
                        DC.Visible = false;
                    }
                }
            }
        }
Beispiel #28
0
        /// <summary>
        /// 计算预算金额剩余金额
        /// 2017/6/12(zhuguanjun)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
        {
            decimal amount = GetAmount();

            txtTotal.Text = amount <= 0 ? "0" : amount.ToString();
        }
Beispiel #29
0
 private void superGridControl1_DataBindingComplete(object sender, GridDataBindingCompleteEventArgs e)
 {
     BindComplete();
 }