protected override void Grid_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
        {
            string userCode = this.GetUserCode();

            if (this.gridHelper.IsClickColumn("SyncStatus", e))
            {
                if (string.Compare(e.Cell.Row.Cells.FromKey("Status").Value.ToString(), FlagStatus.FlagStatus_MES, true) != 0 &&
                    string.Compare(e.Cell.Row.Cells.FromKey("Status").Value.ToString(), FlagStatus.FlagStatus_POST, true) != 0)
                {
                    WebInfoPublish.Publish(this, "$Error_OnlyMESAndPOSTStatusCanDo", this.languageComponent1);
                }
                else
                {
                    if (_facade == null)
                    {
                        _facade = new InventoryFacade(base.DataProvider);
                    }
                    this._facade.ManualSyncMaterialSendFlag(
                        e.Cell.Row.Cells.FromKey("MaterialLot").Value.ToString(),
                        int.Parse(e.Cell.Row.Cells.FromKey("PostSeq").Value.ToString()),
                        userCode);

                    this.cmdQuery_Click(null, null);
                }
            }
        }
 private void gridSingleItem_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
 {
     if (this.gridSingleHelper.IsClickColumn("IT_Tracing", e))
     {
         Response.Redirect("FItemTracingQP.aspx?RCARDFROM=" + this.txtSN.Value + "&RCARDTO=" + this.txtSN.Value);
     }
 }
Exemple #3
0
 private void gridWebGrid_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
 {
     if (e.Cell.Column.Index == 2)
     {
         string url = "IQCDetailMP.aspx?IQCNo=" + e.Cell.Row.Cells.FromKey("IQCNo").Text.ToString() + "&STNo=" + e.Cell.Row.Cells.FromKey("STNo").Text.ToString() + "&Status=" + e.Cell.Row.Cells.FromKey("Status").Text.ToString();
         Response.Redirect(url, true);
     }
 }
Exemple #4
0
        private void gridWebGrid_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
        {
            if (e.Cell.Key != "RCardList")
            {
                return;
            }

            string ShelfPK = e.Cell.Row.Cells.FromKey("ShelfPK").Value.ToString();

            this.Response.Redirect(string.Format("FITShelfDetailQP.aspx?ShelfPK={0}&REFEREDURL=FITShelfQP.aspx", ShelfPK), true);
        }
        private void gridWebGrid_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
        {
            if (e.Cell.Column.Index > 0 &&
                e.Cell.Column.Index < this.gridWebGrid.Columns.Count - 1 &&
                e.Cell.Row.Index != this.gridWebGrid.Rows.Count - 1)
            {
                if (e.Cell.Text != null && e.Cell.Text.Trim() != string.Empty)
                {
                    if (!this.IsStartupScriptRegistered("details"))
                    {
                        string script =
                            @"<script language='jscript' src='../Skin/js/selectAll.js'></script>
							<script language='javascript'>"                            ;

                        script += string.Format(
                            @"window.showModalDialog('./{0}','',showDialog(7));",
                            this.MakeRedirectUrl(
                                "FRealTimeQuantityDetails.asp",
                                new string[] {
                            "segmentcode",
                            "shiftday",
                            "shiftcode",
                            "tpcode",
                            "tpcodedetail",
                            "stepsequencecode",
                            "modelcode",
                            "Itemcode",
                            "mocode"
                        },
                                new string[] {
                            this.drpSegmentQuery.SelectedValue,
                            this.eMESDate1.Text,
                            this.drpShiftQuery.SelectedValue,
                            e.Cell.Column.Key,
                            e.Cell.Column.HeaderText,
                            e.Cell.Row.Cells[0].Text,
                            e.Cell.Row.Cells.FromKey("ModelCode").Text,
                            e.Cell.Row.Cells.FromKey("ItemCode").Text,
                            e.Cell.Row.Cells.FromKey("MOCode").Text
                        }));

                        script += @"</script>";

                        this.RegisterClientScriptBlock("details", script);
                    }
                }
            }
        }
Exemple #6
0
        private void gridBurnIn_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
        {
            if (this.gridBurnInHelper.IsClickColumn("RCardList", e.Cell))
            {
                string shelfpk = e.Cell.Row.Cells.FromKey("ShelfPK").Value.ToString().Trim();
                if (shelfpk.Length > 0)
                {
                    int      length = this.Request.QueryString.AllKeys.Length;
                    string[] keys   = this.Request.QueryString.AllKeys;
                    string[] values = new string[length];

                    for (int i = 0; i < length; i++)
                    {
                        values[i] = System.Web.HttpUtility.UrlEncode(this.Request.QueryString[i].ToString());
                    }
                    string referUrl = this.MakeRedirectUrl("FITOPResultBurnInQP.aspx", keys, values);

                    string url = this.MakeRedirectUrl("FITShelfDetailQP.aspx", new string[] { "ShelfPK", "REFEREDURL" }, new string[] { shelfpk, referUrl });
                    Response.Redirect(url);
                }
            }
        }
        private void gridSN_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
        {
            if (e.Cell.Column.Key.ToUpper() == "TESTDATA")
            {
                string url = this.MakeRedirectUrl(
                    "FOQCFuncValueDataQP.aspx",
                    new string[] {
                    "LotNo",
                    "LotSeq",
                    "RCard",
                    "RCardSeq",
                    "BackUrl"
                },
                    new string[] {
                    e.Cell.Row.Cells.FromKey("LotNo").Text,                                                    //this.txtLotNo.Value,
                    e.Cell.Row.Cells.FromKey("LotSeq").Text,                                                   //this.txtLotSeq.Value,
                    e.Cell.Row.Cells.FromKey("RCard").Text,
                    e.Cell.Row.Cells.FromKey("RCardSeq").Text,
                    "FOQCLotSampleQP.aspx"
                });

                this.Response.Redirect(url, true);
            }
        }
        private void gridWebGrid_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
        {
            MO2SAP     mo2sap     = this._MOFacade.GetMO2SAP(this.txtMoCodeQuery.Text.ToUpper().Trim(), decimal.Parse(e.Cell.Row.Cells[0].Text)) as MO2SAP;
            DBDateTime dbDateTime = FormatHelper.GetNowDBDateTime(this.DataProvider);

            if (this.gridHelper.IsClickColumn("SyncStatus", e))
            {
                if (string.IsNullOrEmpty(e.Cell.Row.Cells.FromKey("ConfirmFlag").Text.ToString().Trim()))
                {
                    WebInfoPublish.Publish(this, "$Error_StatusNotAllowEmpty", this.languageComponent1);
                    return;
                }

                if (string.Compare(mo2sap.Flag, "MES", true) == 0)
                {
                    this.DataProvider.BeginTransaction();
                    try
                    {
                        // Update MO2SAP.Flag
                        mo2sap.Flag         = "SAP";
                        mo2sap.ErrorMessage = "";
                        mo2sap.MaintainUser = this.GetUserCode();
                        mo2sap.MaintainDate = dbDateTime.DBDate;
                        mo2sap.MaintainTime = dbDateTime.DBTime;

                        this._MOFacade.UpdateMO2SAP(mo2sap);

                        // Update MO2SAPLog.active
                        this._MOFacade.UpdateMO2SAPLogStatus(mo2sap.MOCode, mo2sap.PostSequence);

                        e.Cell.Row.Cells[11].Text = "SAP";
                        e.Cell.Row.Cells[12].Text = "";
                        this.DataProvider.CommitTransaction();
                    }
                    catch (Exception ex)
                    {
                        this.DataProvider.RollbackTransaction();
                        WebInfoPublish.Publish(this, ex.Message, this.languageComponent1);
                    }
                }
                else
                {
                    WebInfoPublish.Publish(this, "$Error_OnlyMESStatusCanDo", this.languageComponent1);
                }
            }
            else if (this.gridHelper.IsClickColumn("ConfirmAgain", e))
            {
                if (string.IsNullOrEmpty(e.Cell.Row.Cells.FromKey("ConfirmFlag").Text.ToString().Trim()))
                {
                    WebInfoPublish.Publish(this, "$Error_StatusNotAllowEmpty", this.languageComponent1);
                    return;
                }

                if (string.Compare(mo2sap.Flag, "MES", true) == 0)
                {
                    // Update MO2SAP
                    mo2sap.MaintainUser = this.GetUserCode();
                    mo2sap.MaintainDate = dbDateTime.DBDate;
                    mo2sap.MaintainTime = dbDateTime.DBTime;

                    this._MOFacade.UpdateMO2SAP(mo2sap);

                    // Update MO2SAPLog.active
                    this._MOFacade.UpdateMO2SAPLogStatus(mo2sap.MOCode, mo2sap.PostSequence);

                    this.CallMOConfirm(mo2sap);
                }
                else
                {
                    WebInfoPublish.Publish(this, "$Error_OnlyMESStatusCanDo", this.languageComponent1);
                }
            }
            else if (this.gridHelper.IsClickColumn("ErrorMessage", e))
            {
                if (string.IsNullOrEmpty(e.Cell.Row.Cells.FromKey("ConfirmFlag").Text.ToString().Trim()))
                {
                    WebInfoPublish.Publish(this, "$Error_StatusNotAllowEmpty", this.languageComponent1);
                    return;
                }

                if (string.Compare(mo2sap.Flag, "MES", true) == 0)
                {
                    Response.Redirect(this.MakeRedirectUrl("FMO2SAPLogQP.aspx", new string[] { "MOCode", "PostSeq", "PageName" }, new string[] { mo2sap.MOCode, mo2sap.PostSequence.ToString(), "FMOStorgeConfirmMP.aspx" }));
                }
                else
                {
                    WebInfoPublish.Publish(this, "$Error_OnlyMESStatusCanDo", this.languageComponent1);
                }
            }
            else if (this.gridHelper.IsClickColumn("Edit", e))
            {
                if (e.Cell.Row.Cells.FromKey("ConfirmFlag").Text.ToString().Trim() == string.Empty)
                {
                    this.SetEditObject(e.Cell.Row);
                    //this.buttonHelper.PageActionStatusHandle(PageActionType.Update);
                }
                else
                {
                    WebInfoPublish.Publish(this, "$Error_OnlyNotStatusCanDo", this.languageComponent1);
                }
            }
            else
            {
                return;
            }
        }
Exemple #9
0
 private void gridWebGrid_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
 {
 }
 private void dgPermission_UpdateCellBatch(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
 {
     sm1.权限模块.Rows.Find(e.Cell.Row.DataKey)[e.Cell.Column.Key] = e.Cell.Value;
 }
        protected override void Grid_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
        {
            string userCode = this.GetUserCode();

            if (this.gridHelper.IsClickColumn("SyncStatus", e))
            {
                if (string.Compare(e.Cell.Row.Cells.FromKey("Status").Value.ToString(), FlagStatus.FlagStatus_MES, true) != 0 &&
                    string.Compare(e.Cell.Row.Cells.FromKey("Status").Value.ToString(), FlagStatus.FlagStatus_POST, true) != 0)
                {
                    WebInfoPublish.Publish(this, "$Error_OnlyMESAndPOSTStatusCanDo", this.languageComponent1);
                }
                else
                {
                    this.iqcFacade.ManualSyncMaterialReceiveFlag(
                        e.Cell.Row.Cells.FromKey("IQCNo").Value.ToString(),
                        int.Parse(e.Cell.Row.Cells.FromKey("STLine").Value.ToString()),
                        userCode);

                    this.cmdQuery_Click(null, null);
                }
            }

            //if (this.gridHelper.IsClickColumn("ConfirmReceiveAgain", e))
            //{
            //    if (string.Compare(e.Cell.Row.Cells.FromKey("Status").Value.ToString(), FlagStatus.FlagStatus_MES, true) != 0)
            //    {
            //        WebInfoPublish.Publish(this, "$Error_OnlyMESStatusCanDo", this.languageComponent1);
            //    }
            //    else
            //    {
            //        MaterialReceive mr = this.iqcFacade.GetMaterialReceive(e.Cell.Row.Cells.FromKey("IQCNo").Value.ToString(),
            //            int.Parse(e.Cell.Row.Cells.FromKey("STLine").Value.ToString())) as MaterialReceive;

            //        if (mr != null)
            //        {
            //            // 再次报工
            //            DT_MES_SOURCESTOCK_REQLIST po = Post2SAPUtility.GenerateSAPPOInfo(mr);
            //            MaterialPOTransferArgument mpArg = new MaterialPOTransferArgument(this.DataProvider);
            //            mpArg.InventoryList.Add(po);

            //            mr.TransactionCode = mpArg.TransactionCode;
            //            this.iqcFacade.UpdateMaterialReceive(mr);

            //            ServiceResult sr = Post2SAPUtility.CallSAPInterface(mpArg);

            //            if (sr.Result == true)
            //            {

            //            }
            //            else
            //            {
            //                WebInfoPublish.Publish(this, sr.Message + " Transaction Code=" + sr.TransactionCode, this.languageComponent1);
            //            }
            //        }
            //    }

            //}

            else if (this.gridHelper.IsClickColumn("SRMSyncStatus", e))
            {
                if (!this.iqcFacade.IsFromASN(e.Cell.Row.Cells.FromKey("STNo").Value.ToString()))
                {
                    WebInfoPublish.Publish(this, "$Error_OnlyFromASNCanDo", this.languageComponent1);
                }
                else if (string.Compare(e.Cell.Row.Cells.FromKey("SRMFlag").Value.ToString(), FlagStatus.FlagStatus_MES, true) != 0)
                {
                    WebInfoPublish.Publish(this, "$Error_OnlyMESStatusCanDo", this.languageComponent1);
                }
                else
                {
                    this.iqcFacade.ManualSyncIQCDetailSRMFlag(
                        e.Cell.Row.Cells.FromKey("IQCNo").Value.ToString(),
                        int.Parse(e.Cell.Row.Cells.FromKey("STLine").Value.ToString()),
                        userCode);

                    this.cmdQuery_Click(null, null);
                }
            }
        }
Exemple #12
0
 private void dgRoleOfUser_UpdateCellBatch(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
 {
     sm1.用户角色.Rows.Find(e.Cell.Row.DataKey)[e.Cell.Column.Key] = e.Cell.Value;
 }