示例#1
0
        protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            BenQGuru.eMES.Domain.Alert.Alert alert = obj as BenQGuru.eMES.Domain.Alert.Alert;
            if (alert != null)
            {
                Infragistics.WebUI.UltraWebGrid.UltraGridRow ur = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                    new object[] { "false",
                                   alert.AlertID,
                                   alert.AlertMsg,
                                   alert.SSCode,
                                   alert.ProductCode,
                                   _alertConst.GetName(alert.AlertStatus),
                                   _alertConst.GetName(alert.AlertType),
                                   _alertConst.GetName(alert.AlertItem),
                                   "",
                                   alert.SendUser,
                                   FormatHelper.ToDateString(alert.AlertDate),
                                   FormatHelper.ToTimeString(alert.AlertTime),
                                   alert.MaintainUser,
                                   FormatHelper.ToDateString(alert.MaintainDate),
                                   FormatHelper.ToTimeString(alert.MaintainTime) });
                ur.Cells[2].Style.ForeColor = ColorHelper.GetColor(alert.AlertLevel);
                ur.Cells[5].Style.ForeColor = ColorHelper.GetColor(alert.AlertStatus);
                return(ur);
            }

            else
            {
                return(null);
            }
        }
示例#2
0
    private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        // Display hyperlink for each container
        string sIFCId = e.Row.Cells.FromKey("InputFormContainerId").Text;

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

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

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

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

            if ((containerName.Length == 0 || containerName.IndexOf(filter) < 0) && (comment.Length == 0 || comment.IndexOf(filter) < 0))
            {
                r.Delete();
            }
            else
            {
                UITools.HiglightGridRowFilter2(ref r, txtFilter.Text, true, Convert.ToInt32(txtSortColPos.Value));
            }
        }
    }
示例#3
0
        private void _processDataSource(object sender, int inclusive, int exclusive, int pageSize)
        {
            WebQueryEventArgs args = new WebQueryEventArgs(inclusive, exclusive);

            this.LoadGridDataSource(sender, args);

            if (args.GridDataSource != null)
            {
                DomainObjectToGridRowEventArgs args1 = new DomainObjectToGridRowEventArgs();
                Infragistics.WebUI.UltraWebGrid.UltraGridRow lastRow = null;

                foreach (DomainObject obj in args.GridDataSource)
                {
                    args1.DomainObject = obj;
                    this.DomainObjectToGridRow(sender, args1);

                    if (args1.GridRow != null)
                    {
                        this.gridWebGrid.Rows.Add(this.buildMergedGridRow(args1.GridRow, lastRow));

                        lastRow = args1.GridRow;
                    }
                }
            }

            if (this.pagerSizeSelector != null)
            {
                this.pagerToolBar.PageSize = pageSize;
            }

            if (this.pagerToolBar != null)
            {
                this.pagerToolBar.RowCount = args.RowCount;
            }
        }
        protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            WarehouseTicketDetail item = (WarehouseTicketDetail)obj;
            string  strCurrQty         = "0";
            string  strKey             = this.txtTicketNoQuery.Text + ":" + item.Sequence.ToString();
            decimal deLeft             = item.Qty - item.ActualQty;
            string  strReturnQty       = "0";
            string  strReturnScrapQty  = "0";

            Infragistics.WebUI.UltraWebGrid.UltraGridRow row = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                new object[] {
                item.Sequence,
                item.ItemCode,
                item.ItemName,
                item.MOCode,
                Math.Round(item.Qty, 2),
                Math.Round(deLeft, 2),
                Math.Round(Convert.ToDecimal(strCurrQty), 2),
                Math.Round(Convert.ToDecimal(strReturnQty), 2),
                Math.Round(Convert.ToDecimal(strReturnScrapQty), 2),
                ""
            });
            item = null;
            return(row);
        }
        private object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_opItemControlFacade == null)
            {
                _opItemControlFacade = new FacadeFactory(base.DataProvider).CreateOPItemControlFacade();
            }
            int sequence = 0;

            try
            {
                sequence = Int32.Parse(row.Cells[1].Text);
            }
            catch
            {
                ExceptionManager.Raise(this.GetType().BaseType, "$Error_System_Error");
            }
            object obj = this._opItemControlFacade.GetOPBOMItemControl(ItemCode, OPID, OPBOMItemCode, OPBOMCode, OPBOMVersion, sequence);

            if (obj != null)
            {
                return((OPItemControl)obj);
            }

            return(null);
        }
示例#6
0
        protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            decimal seq;

            try
            {
                seq = decimal.Parse(row.Cells[2].Text.ToString());
            }
            catch
            {
                seq = 0;
            }
            if (_facade == null)
            {
                _facade = new ReworkFacadeFactory(base.DataProvider).Create();
            }
            object obj = _facade.GetReject(row.Cells[1].Text.ToString(), seq);

            if (obj != null)
            {
                return((Reject)obj);
            }

            return(null);
        }
示例#7
0
 private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     if (txtFilter.Text.Length > 0)
     {
         Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row;
         UITools.HiglightGridRowFilter(ref r, txtFilter.Text);
     }
 }
示例#8
0
 protected void SetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
 {
     this.txtdateDateEdit.Text           = Convert.ToDateTime(row.Cells.FromKey("MaterialPlanDate").Text.ToString()).ToString("yyyy-MM-dd");
     this.txtBigSSCodeGroupEdit.Text     = row.Cells.FromKey("BigSSCode").Text;
     this.txtMOSeqEdit.Text              = row.Cells.FromKey("MoSeq").Text;
     this.txtMOCodeGroupEdit.Text        = row.Cells.FromKey("MoCode").Text;
     this.timePromiseTimeEdit.TimeString = row.Cells.FromKey("PromiseTime").Text;
 }
示例#9
0
 protected override void Grid_DblClick(object sender, ClickEventArgs e)
 {
     Infragistics.WebUI.UltraWebGrid.UltraGridRow Row = e.Row;
     if (Row != null)
     {
         SaveQuery();
         Response.Redirect(this.MakeRedirectUrl("FAlertEP.aspx", new string[] { "alertid" }, new string[] { Row.Cells[1].Value.ToString() }));
     }
 }
示例#10
0
 protected override void Grid_DblClick(object sender, ClickEventArgs e)
 {
     Infragistics.WebUI.UltraWebGrid.UltraGridRow Row = e.Row;
     if (Row != null)
     {
         SaveQuery();
         Response.Redirect(this.MakeRedirectUrl("FAlertBillEP.aspx", new string[] { "billid", "alerttype" }, new string[] { Row.Cells[1].Text.Trim(), this._alertConst.GetCode(Row.Cells.FromKey("AlertType").Text.Trim()) }));
     }
 }
示例#11
0
 private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
 {
     // Display filter
     if (txtFilter.Text != string.Empty)
     {
         Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row;
         UITools.HiglightGridRowFilter(ref r, txtFilter.Text);
     }
 }
示例#12
0
        private object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_OQCFacade == null)
            {
                _OQCFacade = new OQCFacade(this.DataProvider);
            }

            return(_OQCFacade.GetFrozen(row.Cells[1].Text, row.Cells[4].Text, int.Parse(row.Cells[5].Text), row.Cells[3].Text, row.Cells[2].Text, int.Parse(row.Cells[10].Text)));
        }
示例#13
0
        private object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
//			Model2Route model2Route = this._modelFacade.CreateNewModel2Route();
//			model2Route.ModelCode = ModelCode;
//			model2Route.RouteCode = row.Cells[1].Text;
//			model2Route.MaintainUser = this.GetUserCode();
//
//			return model2Route;
            return(null);
        }
示例#14
0
 protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
 {
     BenQGuru.eMES.Domain.MOModel.Item            item = (BenQGuru.eMES.Domain.MOModel.Item)obj;
     Infragistics.WebUI.UltraWebGrid.UltraGridRow row  = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
         new object[] { "false",
                        item.ItemCode,
                        item.ItemName, });
     item = null;
     return(row);
 }
示例#15
0
        protected override void Grid_DblClick(object sender, ClickEventArgs e)
        {
            Infragistics.WebUI.UltraWebGrid.UltraGridRow Row = e.Row;
            if (Row != null)
            {
                Session["ss_action"]     = PageActionType.Update;
                Session["ss_alertlevel"] = this.drpAlertLevel.SelectedValue;

                Response.Redirect(this.MakeRedirectUrl("FManualAlertEP.aspx", new string[] { "action", "alertid" }, new string[] { "edit", Row.Cells[1].Value.ToString() }));
            }
        }
示例#16
0
        protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            WarehouseItem item = (WarehouseItem)obj;

            Infragistics.WebUI.UltraWebGrid.UltraGridRow row = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                new object[] { "false",
                               item.ItemCode,
                               item.ItemName, });
            item = null;
            return(row);
        }
示例#17
0
        protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            AlertSample sample = _facade.CreateNewAlertSample();

            sample.ID           = row.Cells[1].Value.ToString();
            sample.SampleDesc   = row.Cells[2].Value.ToString();
            sample.MaintainUser = row.Cells[3].Value.ToString();
            sample.MaintainDate = FormatHelper.TODateInt(row.Cells[4].Value.ToString());

            return(sample);
        }
示例#18
0
        protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            object obj = this.WarehouseFacade.GetMaterialBusiness(row.Cells[1].Text.ToString());

            if (obj != null)
            {
                return((MaterialBusiness)obj);
            }

            return(null);
        }
    private void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        // Update link
        e.Row.Cells.FromKey("Tag").Text = "<a href='javascript://' onclick=\"OpenPopupInputForms(" + e.Row.Cells.FromKey("Id").ToString() + ")\">" + e.Row.Cells.FromKey("Tag").Text + "</a>";

        // Update filter
        if (txtFilter.Text.Length > 0)
        {
            Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row;
            UITools.HiglightGridRowFilter(ref r, txtFilter.Text);
        }
    }
示例#20
0
        protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            Warehouse2StepSequence w2ss = (Warehouse2StepSequence)obj;

            Infragistics.WebUI.UltraWebGrid.UltraGridRow row = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                new object[] { "false",
                               w2ss.FactoryCode,
                               //w2ss.SegmentCode,
                               w2ss.WarehouseCode,
                               "" });
            w2ss = null;
            return(row);
        }
示例#21
0
        private object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_modelFacade == null)
            {
                _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
            }
            Model2Item model2Item = this._modelFacade.CreateModel2Item();

            model2Item.ModelCode      = this.ModelCode;
            model2Item.ItemCode       = row.Cells[1].Text;
            model2Item.MaintainUser   = this.GetUserCode();
            model2Item.OrganizationID = GlobalVariables.CurrentOrganizations.First().OrganizationID;
            return(model2Item);
        }
示例#22
0
        protected override Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            TransactionType tt = (TransactionType)obj;

            Infragistics.WebUI.UltraWebGrid.UltraGridRow row = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                new object[] { "false",
                               tt.TransactionTypeCode,
                               tt.TransactionTypeName,
                               tt.TransactionTypeDescription,
                               GetBooleanDisplay(tt.IsByMOControl),
                               "" });
            tt = null;
            return(row);
        }
        protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            /*
             * if(_facade==null){_facade = new WarehouseFacade(base.DataProvider);}
             * object obj = _facade.GetWarehouseTicketDetail( row.Cells[0].Text.ToString(), this.txtTicketNoQuery.Text );
             *
             * if (obj != null)
             * {
             *      return obj as WarehouseTicketDetail;
             * }
             */

            return(null);
        }
示例#24
0
    protected void dg_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        //ifcl.ApplyFilter("ContainerId", Convert.ToInt32(e.Row.Cells.FromKey("Id").Text), CollectionView.FilterOperand.Equals);
        e.Row.Cells.FromKey("ContainerName").Text = "[" + e.Row.Cells.FromKey("Tag").Text + "] - " + e.Row.Cells.FromKey("ContainerName").Text;
        TemplatedColumn col      = (TemplatedColumn)e.Row.Cells.FromKey("ifcType").Column;
        CellItem        cellItem = (CellItem)col.CellItems[e.Row.Index];
        DropDownList    ddType   = (DropDownList)cellItem.FindControl("ddType");

        if (e.Row.Cells.FromKey("LookupId") != null && e.Row.Cells.FromKey("LookupId").Text == "-1")
        {
            foreach (string t in Enum.GetNames(typeof(InputFormContainerType)))
            {
                ddType.Items.Add(new ListItem(t, t));
            }
        }
        else
        {
            string defaultValue = Enum.GetName(typeof(InputFormContainerType), InputFormContainerType.Normal);
            ddType.Items.Add(new ListItem(defaultValue, defaultValue));
            ddType.Enabled = false;
        }
        if (txtFilter.Text.Trim() != string.Empty)
        {
            Infragistics.WebUI.UltraWebGrid.UltraGridRow r = e.Row;
            UITools.HiglightGridRowFilter(ref r, txtFilter.Text, true);
        }
        //if (ifcl.Count != 0)
        //{
        //  InputFormContainer obj = ((InputFormContainer)ifcl[0]);
        //  col = (TemplatedColumn)e.Row.Cells.FromKey("Select").Column;
        //  cellItem = (CellItem)col.CellItems[e.Row.Index];
        //  CheckBox cb = (CheckBox)cellItem.FindControl("g_sd");
        //  cb.Checked = true;
        //  cb.Enabled = false;
        //  col = (TemplatedColumn)e.Row.Cells.FromKey("Mandatory").Column;
        //  cellItem = (CellItem)col.CellItems[e.Row.Index];
        //  cb = (CheckBox)cellItem.FindControl("g_m");
        //  cb.Checked = obj.Mandatory;
        //  cb.Enabled = false;
        //  ddType.SelectedValue = obj.Type.ToString();
        //  e.Row.Cells.FromKey("Comment").Text = obj.Comment.ToString();
        //  e.Row.Cells.FromKey("Comment").AllowEditing = AllowEditing.No;
        //  ddType.Enabled = false;
        //}
        //else
        //{
        ddType.SelectedValue = InputFormContainerType.Normal.ToString();
        //}
        //ifcl.RemoveFilter();
    }
示例#25
0
        private void RequestData()
        {
            this.InitWebGrid();
            ImportExcel imXls = new ImportExcel(this.UploadedFileName, this.InputType, this.XmlHelper.GridBuilder, this.XmlHelper.NotAllowNullField);
            DataTable   dt    = imXls.XlaDataTable;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                object[] objs = new object[dt.Columns.Count + 1];
                Array.Copy(dt.Rows[i].ItemArray, 0, objs, 1, dt.Columns.Count);
                Infragistics.WebUI.UltraWebGrid.UltraGridRow row = new Infragistics.WebUI.UltraWebGrid.UltraGridRow(objs);
                this.gridHelper.Grid.Rows.Add(row);
            }
            this.lblCount.Text = dt.Rows.Count.ToString();
        }
示例#26
0
        private object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_moFacade == null)
            {
                _moFacade = new MOFacade(this.DataProvider);
            }
            object obj = this._moFacade.GetResource2MO(decimal.Parse(row.Cells.FromKey("Sequence").Text.ToString()));

            if (obj != null)
            {
                return((Resource2MO)obj);
            }

            return(null);
        }
示例#27
0
        protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_facade == null)
            {
                _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade();
            }
            object obj = _facade.GetTSSmartConfig(decimal.Parse(row.Cells.FromKey("Sequence").Text.ToString()));

            if (obj != null)
            {
                return((TSSmartConfig)obj);
            }

            return(null);
        }
示例#28
0
        protected override object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_facade == null)
            {
                _facade = new FacadeFactory(base.DataProvider).CreateModelFacade();
            }
            object obj = _facade.GetBarcodeRule(row.Cells[1].Text.ToString(), row.Cells[2].Text.ToString());

            if (obj != null)
            {
                return(obj as BarcodeRule);
            }

            return(null);
        }
示例#29
0
        private object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_shelfFacade == null)
            {
                _shelfFacade = new FacadeFactory(base.DataProvider).CreateShelfFacade();
            }
            object obj = this._shelfFacade.GetShelf(row.Cells.FromKey("ShelfNO").Text.ToString());

            if (obj != null)
            {
                return((Shelf)obj);
            }

            return(null);
        }
示例#30
0
        private object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row)
        {
            if (_opBOMFacade == null)
            {
                _opBOMFacade = new FacadeFactory(base.DataProvider).CreateOPBOMFacade();
            }
            object obj = _opBOMFacade.GetOPBOM(row.Cells[1].Text, row.Cells[2].Text, row.Cells[7].Text, GlobalVariables.CurrentOrganizations.First().OrganizationID);

            if (obj != null)
            {
                return((OPBOM)obj);
            }

            return(null);
        }