Ejemplo n.º 1
0
        private void WebQueryHelper_DomainObjectToExportRow(object sender, EventArgs e)
        {
            StockAge stockAge = (StockAge)(e as DomainObjectToExportRowEventArgs).DomainObject;

            (e as DomainObjectToExportRowEventArgs).ExportRow =
                new string[] {
                stockAge.Company,
                stockAge.StorageCode,
                stockAge.Firstclass,
                stockAge.Cusorderno,
                stockAge.MaterialName,
                stockAge.MaterialModelCode,
                stockAge.MaterialCode,
                stockAge.Itemgrade,
                stockAge.CustomerItemCode,
                stockAge.Invperiodcode,
                stockAge.Datefrom.ToString(),
                stockAge.dateto.ToString(),
                stockAge.CNT.ToString()
            };
        }
Ejemplo n.º 2
0
        private UltraGridRow GetRowToInput(StockAge stockAge)
        {
            UltraGridRow returnValue = null;

            foreach (UltraGridRow row in this.gridWebGrid.Rows)
            {
                if (row.Cells.FromKey("Company").Text.Trim().ToUpper() == stockAge.Company.Trim().ToUpper() &&
                    row.Cells.FromKey("Storage").Text.Trim().ToUpper() == stockAge.StorageCode.Trim().ToUpper() &&
                    row.Cells.FromKey("FirstClass").Text.Trim().ToUpper() == stockAge.Firstclass.Trim().ToUpper() &&
                    row.Cells.FromKey("CusOrderNo").Text.Trim().ToUpper() == stockAge.Cusorderno.Trim().ToUpper() &&
                    row.Cells.FromKey("MName").Text.Trim().ToUpper() == stockAge.MaterialName.Trim().ToUpper() &&
                    row.Cells.FromKey("MModelCode").Text.Trim().ToUpper() == stockAge.MaterialModelCode.Trim().ToUpper() &&
                    row.Cells.FromKey("ItemCode").Text.Trim().ToUpper() == stockAge.MaterialCode.Trim().ToUpper() &&
                    row.Cells.FromKey("ItemGrade").Text.Trim().ToUpper() == stockAge.Itemgrade.Trim().ToUpper() &&
                    row.Cells.FromKey("CusItemCode").Text.Trim().ToUpper() == stockAge.CustomerItemCode.Trim().ToUpper())
                {
                    returnValue = row;
                    break;
                }
            }

            if (returnValue == null)
            {
                returnValue = new UltraGridRow(new object[this.gridWebGrid.Columns.Count]);
                this.gridWebGrid.Rows.Add(returnValue);

                returnValue.Cells.FromKey("Company").Text     = stockAge.Company;
                returnValue.Cells.FromKey("Storage").Text     = stockAge.StorageCode;
                returnValue.Cells.FromKey("FirstClass").Text  = stockAge.Firstclass;
                returnValue.Cells.FromKey("CusOrderNo").Text  = stockAge.Cusorderno;
                returnValue.Cells.FromKey("MName").Text       = stockAge.MaterialName.ToString();
                returnValue.Cells.FromKey("MModelCode").Text  = stockAge.MaterialModelCode.ToString();
                returnValue.Cells.FromKey("ItemCode").Text    = stockAge.MaterialCode.ToString();
                returnValue.Cells.FromKey("ItemGrade").Text   = stockAge.Itemgrade.ToString();
                returnValue.Cells.FromKey("CusItemCode").Text = stockAge.CustomerItemCode.ToString();
            }

            return(returnValue);
        }