Exemplo n.º 1
0
//		protected override ControlLibrary.Web.Language.LanguageComponent GetLanguageComponent()
//		{
//			return this.languageComponent1;
//		}

        private void InitPageValue()
        {
            this.txtMinDutyRatoMin.Text = string.Empty;
            this.txtMinDutyRatoMax.Text = string.Empty;
            this.txtBurstMdFreMin.Text  = string.Empty;
            this.txtBurstMdFreMax.Text  = string.Empty;
            this.txtElectricCount.Text  = "0";
            this.txtGroupCount.Text     = "0";

            if (_facade == null)
            {
                _facade = new OQCFacadeFactory(base.DataProvider).CreateOQCFacade();
            }
            object objMain = _facade.GetOQCFuncTest(this.txtItemCode.Text);

            if (objMain == null)
            {
                return;
            }
            OQCFuncTest testMain = (OQCFuncTest)objMain;

            this.txtMinDutyRatoMin.Text = testMain.MinDutyRatoMin.ToString("##.##");
            this.txtMinDutyRatoMax.Text = testMain.MinDutyRatoMax.ToString("##.##");
            this.txtBurstMdFreMin.Text  = testMain.BurstMdFreMin.ToString("##.##");;
            this.txtBurstMdFreMax.Text  = testMain.BurstMdFreMax.ToString("##.##");;
            this.txtElectricCount.Text  = Convert.ToInt32(testMain.ElectricTestCount).ToString();
            this.txtGroupCount.Text     = Convert.ToInt32(testMain.FuncTestGroupCount).ToString();

            itemGroupValue = _facade.QueryOQCFuncTestSpec(this.txtItemCode.Text);

            InitGridView();
        }
Exemplo n.º 2
0
        protected override void AddDomainObject(object domainObject)
        {
            if (_oqcfade == null)
            {
                _oqcfade = new BenQGuru.eMES.OQC.OQCFacade(base.DataProvider);
            }

            Object objAQL = _oqcfade.GetAQL((domainObject as Domain.OQC.AQL).AQLSeq, (domainObject as Domain.OQC.AQL).AqlLevel);

            if (objAQL != null)
            {
                WebInfoPublish.Publish(this, "$Error_PK_is_Repeat", this.languageComponent1);
                return;
            }

            int LotSizeMin = int.Parse(this.txtLotSizeMin.Text.Trim());
            int LotSizeMax = int.Parse(this.txtLotSizeMax.Text.Trim());
            int count      = _oqcfade.GetIsRepeatLotSizeMin2MaxForAdd(LotSizeMin, LotSizeMax, FormatHelper.CleanString(this.txtAqlLevel.Text));

            if (count > 0)
            {
                WebInfoPublish.Publish(this, "$BS_Repeat_LotSize", this.languageComponent1);
                return;
            }

            this._oqcfade.AddAQL((Domain.OQC.AQL)domainObject);
        }
Exemplo n.º 3
0
        private object[] LoadDataSource(int inclusive, int exclusive)
        {
            if (_OQCFacade == null)
            {
                _OQCFacade = new OQCFacade(this.DataProvider);
            }

            string rCardStart = string.Empty;
            string rCardEnd   = string.Empty;
            string lotNo      = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtLotNoQuery.Text));
            string moCode     = string.Empty;
            string itemCode   = string.Empty;

            string frozenStatus      = FrozenStatus.STATUS_FRONZEN;
            int    frozenDateStart   = FormatHelper.TODateInt(this.txtDateFrom.Text);
            int    frozenDateEnd     = FormatHelper.TODateInt(this.txtDateTo.Text);
            int    unfrozenDateStart = -1;
            int    unfrozenDateEnd   = -1;

            return(this._OQCFacade.QueryFrozen(
                       rCardStart, rCardEnd,
                       lotNo, moCode, itemCode,
                       frozenStatus, frozenDateStart, frozenDateEnd, unfrozenDateStart, unfrozenDateEnd,
                       inclusive, exclusive));
        }
Exemplo n.º 4
0
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_facade == null)
     {
         _facade = new OQCFacadeFactory(base.DataProvider).CreateOQCFacade();
     }
     this._facade.DeleteOQCCheckList((OQCCheckList[])domainObjects.ToArray(typeof(OQCCheckList)));
 }
Exemplo n.º 5
0
 protected override void UpdateDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new OQCFacade(base.DataProvider);
     }
     this._facade.UpdateOQCCheckGroup((OQCCheckGroup)domainObject);
 }
Exemplo n.º 6
0
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_facade == null)
     {
         _facade = new OQCFacade(base.DataProvider);
     }
     this._facade.DeleteOQCCheckGroup((OQCCheckGroup[])domainObjects.ToArray(typeof(OQCCheckGroup)));
 }
Exemplo n.º 7
0
 protected override void UpdateDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new OQCFacadeFactory(base.DataProvider).CreateOQCFacade();
     }
     this._facade.UpdateOQCCheckList((OQCCheckList)this.GetEditObject());
 }
Exemplo n.º 8
0
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_oqcfade == null)
     {
         _oqcfade = new BenQGuru.eMES.OQC.OQCFacade(base.DataProvider);
     }
     this._oqcfade.DeleteAQL((Domain.OQC.AQL[])domainObjects.ToArray(typeof(Domain.OQC.AQL)));
 }
Exemplo n.º 9
0
 protected override int GetRowCount()
 {
     if (_oqcfade == null)
     {
         _oqcfade = new BenQGuru.eMES.OQC.OQCFacade(base.DataProvider);
     }
     return(this._oqcfade.GetAqlCountForQuery(this.txtAQLLevelQuery.Text.Trim().ToUpper()));
 }
Exemplo n.º 10
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)));
        }
Exemplo n.º 11
0
 private void btnInitGroupCount_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     if (_facade == null)
     {
         _facade = new OQCFacadeFactory(base.DataProvider).CreateOQCFacade();
     }
     itemGroupValue = _facade.QueryOQCFuncTestSpec(this.txtItemCode.Text);
     InitGridView();
 }
Exemplo n.º 12
0
        protected override object[] LoadDataSource(int inclusive, int exclusive)
        {
            if (_oqcfade == null)
            {
                _oqcfade = new BenQGuru.eMES.OQC.OQCFacade(base.DataProvider);
            }

            return(this._oqcfade.GetAqlForQuery(this.txtAQLLevelQuery.Text.Trim().ToUpper(), inclusive, exclusive));
        }
Exemplo n.º 13
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new OQCFacadeFactory(base.DataProvider).CreateOQCFacade();
     }
     return(this._facade.QueryOQCCheckListCount(
                FormatHelper.CleanString(this.txtCheckListCodeQuery.Text)));
 }
Exemplo n.º 14
0
        protected void cmdSave_ServerClick(object sender, System.EventArgs e)
        {
            ArrayList array = this.gridHelper.GetCheckedRows();

            if (array == null || array.Count <= 0)
            {
                return;
            }

            if (!ValidateInput())
            {
                return;
            }

            Frozen frozen         = null;
            string unfrozenReason = this.txtUnfrozenCauseEdit.Text.Trim();
            string userCode       = this.GetUserCode();

            try
            {
                ((SQLDomainDataProvider)this.DataProvider).PersistBroker.AutoCloseConnection = false;
                ((SQLDomainDataProvider)this.DataProvider).PersistBroker.OpenConnection();
                this.DataProvider.BeginTransaction();

                if (_OQCFacade == null)
                {
                    _OQCFacade = new OQCFacade(this.DataProvider);
                }

                foreach (UltraGridRow row in array)
                {
                    frozen = (Frozen)this.GetEditObject(row);

                    if (frozen != null)
                    {
                        _OQCFacade.UnfreezeRCard(frozen, unfrozenReason, userCode);
                    }
                }

                this.DataProvider.CommitTransaction();

                this.txtUnfrozenCauseEdit.Text = string.Empty;
            }
            catch (Exception ex)
            {
                this.DataProvider.RollbackTransaction();
                throw ex;
            }
            finally
            {
                ((SQLDomainDataProvider)this.DataProvider).PersistBroker.CloseConnection();
                ((SQLDomainDataProvider)this.DataProvider).PersistBroker.AutoCloseConnection = true;
            }

            this.gridHelper.RequestData();
        }
Exemplo n.º 15
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new OQCFacade(base.DataProvider);
     }
     return(this._facade.QueryOQCCheckGroupCount(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtChkGroupQuery.Text))
                ));
 }
Exemplo n.º 16
0
 protected override object[] LoadDataSource(int inclusive, int exclusive)
 {
     if (_facade == null)
     {
         _facade = new OQCFacadeFactory(base.DataProvider).CreateOQCFacade();
     }
     return(this._facade.QueryOQCCheckList(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtCheckListCodeQuery.Text)),
                inclusive, exclusive));
 }
Exemplo n.º 17
0
        private object GetEditObject(GridRecord row)
        {
            if (_OQCFacade == null)
            {
                _OQCFacade = new OQCFacade(this.DataProvider);
            }
            object obj = this._OQCFacade.GetOQCLot(row.Items.FindItemByKey("OQCLotNo").Value.ToString(), OQCFacade.Lot_Sequence_Default);

            return(obj);
        }
Exemplo n.º 18
0
        protected override object GetEditObject()
        {
            if (_facade == null)
            {
                _facade = new OQCFacade(base.DataProvider);
            }
            OQCCheckGroup checkGroup = this._facade.CreateNewOQCCheckGroup();

            checkGroup.CheckGroupCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtChkGroupEdit.Text, 40));
            checkGroup.MaintainUser   = base.GetUserCode();

            return(checkGroup);
        }
Exemplo n.º 19
0
        protected override object GetEditObject(GridRecord row)
        {
            if (_oqcfade == null)
            {
                _oqcfade = new OQCFacade(base.DataProvider);
            }
            object obj = _oqcfade.GetAQL(int.Parse(row.Items.FindItemByKey("AqlSql").Value.ToString()), FormatHelper.CleanString(row.Items.FindItemByKey("AqlLevel").Value.ToString()));

            if (obj != null)
            {
                return(obj);
            }
            return(null);
        }
Exemplo n.º 20
0
 protected override object GetEditObject()
 {
     if (_oqcfade == null)
     {
         _oqcfade = new OQCFacade(base.DataProvider);
     }
     Domain.OQC.AQL aql = this._oqcfade.CreateNewAQL();
     aql.AQLSeq       = int.Parse(this.txtAqlSeq.Text.Trim());
     aql.AqlLevel     = FormatHelper.CleanString(this.txtAqlLevel.Text, 40);
     aql.LotSizeMin   = int.Parse(this.txtLotSizeMin.Text.Trim());
     aql.LotSizeMax   = int.Parse(this.txtLotSizeMax.Text.Trim());
     aql.SampleSize   = int.Parse(this.txtSampleSize.Text.Trim());
     aql.RejectSize   = int.Parse(this.txtRejectSize.Text.Trim());
     aql.MaintainUser = this.GetUserCode();
     return(aql);
 }
Exemplo n.º 21
0
        protected override object GetEditObject()
        {
            if (_facade == null)
            {
                _facade = new OQCFacadeFactory(base.DataProvider).CreateOQCFacade();
            }
            OQCCheckList checklist = this._facade.CreateNewOQCCheckList();

            checklist.CheckItemCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtCheckListCodeEdit.Text, 40));
            checklist.Description   = FormatHelper.CleanString(this.txtCheckItemDesc.Text);
            checklist.CheckIemUnit  = FormatHelper.CleanString(this.txtUnit.Text);
            checklist.CheckValueMax = FormatHelper.CleanString(this.txtCheckValueMax.Text);
            checklist.CheckValueMin = FormatHelper.CleanString(this.txtCheckValueMin.Text);
            checklist.MaintainUser  = this.GetUserCode();

            return(checklist);
        }
Exemplo n.º 22
0
        private object[] LoadDataSource(int inclusive, int exclusive)
        {
            if (_OQCFacade == null)
            {
                _OQCFacade = new OQCFacade(this.DataProvider);
            }
            string LotNo        = this.txtLotNoQuery.Text.ToString().Trim();
            string Stepsequence = this.txtStepsequence.Text.Trim();

            Stepsequence = Stepsequence.Replace(",", "','");
            string Mmodelcode = this.txtModelcode.Text.Trim();

            Mmodelcode = Mmodelcode.Replace(",", "','");
            string BigLine = this.txtBIGLine.Text.Trim();

            BigLine = BigLine.Replace(",", "','");
            int frozenDateStart = FormatHelper.TODateInt(this.txtDateFrom.Text);
            int frozenDateEnd   = FormatHelper.TODateInt(this.txtDateTo.Text);

            object[] objs = this._OQCFacade.QueryFrozenAndMaterial(LotNo, Mmodelcode, Stepsequence, BigLine, frozenDateStart, frozenDateEnd, -1, -1, FrozenStatus.STATUS_FRONZEN, inclusive, exclusive);

            if (objs != null && objs.Length > 0)
            {
                for (int i = 0; i < objs.Length; i++)
                {
                    object[] MoObjs = _OQCFacade.QueryMoCodeINOLot2CardByLotNo(((OQCLOTAndMaterial)objs[i]).LOTNO);
                    if (MoObjs != null &&
                        MoObjs.Length > 0)
                    {
                        for (int j = 0; j < MoObjs.Length; j++)
                        {
                            if (j == 0)
                            {
                                ((OQCLOTAndMaterial)objs[i]).MoCdoe = ((OQCLot2Card)MoObjs[j]).MOCode;
                            }
                            else
                            {
                                ((OQCLOTAndMaterial)objs[i]).MoCdoe = ((OQCLOTAndMaterial)objs[i]).MoCdoe + ", " + ((OQCLot2Card)MoObjs[j]).MOCode;
                            }
                        }
                    }
                }
            }
            return(objs);
        }
Exemplo n.º 23
0
        protected override void UpdateDomainObject(object domainObject)
        {
            if (_oqcfade == null)
            {
                _oqcfade = new OQCFacade(this.DataProvider);
            }
            int LotSizeMin = int.Parse(this.txtLotSizeMin.Text.Trim());
            int LotSizeMax = int.Parse(this.txtLotSizeMax.Text.Trim());
            int AqlSeq     = int.Parse(this.txtAqlSeq.Text.Trim());
            int count      = _oqcfade.GetIsRepeatLotSizeMin2MaxForUpdate(LotSizeMin, LotSizeMax, AqlSeq, FormatHelper.CleanString(this.txtAqlLevel.Text));

            if (count > 0)
            {
                WebInfoPublish.Publish(this, "$BS_Repeat_LotSize", this.languageComponent1);
                return;
            }

            this._oqcfade.UpdateAQL((Domain.OQC.AQL) this.GetEditObject());
        }
Exemplo n.º 24
0
        protected override object GetEditObject(GridRecord row)
        {
            if (_facade == null)
            {
                _facade = new OQCFacadeFactory(base.DataProvider).CreateOQCFacade();
            }
            string strCode = string.Empty;
            object objCode = row.Items.FindItemByKey("CheckItemCode").Value;

            if (objCode != null)
            {
                strCode = objCode.ToString();
            }
            object obj = _facade.GetOQCCheckList(strCode);

            if (obj != null)
            {
                return((OQCCheckList)obj);
            }
            return(null);
        }
Exemplo n.º 25
0
        private int GetRowCount()
        {
            if (_OQCFacade == null)
            {
                _OQCFacade = new OQCFacade(this.DataProvider);
            }

            string LotNo        = this.txtLotNoQuery.Text.ToString().Trim();
            string Stepsequence = this.txtStepsequence.Text.Trim();

            Stepsequence = Stepsequence.Replace(",", "','");
            string Mmodelcode = this.txtModelcode.Text.Trim();

            Mmodelcode = Mmodelcode.Replace(",", "','");
            string BigLine = this.txtBIGLine.Text.Trim();

            BigLine = BigLine.Replace(",", "','");
            int frozenDateStart = FormatHelper.TODateInt(this.txtDateFrom.Text);
            int frozenDateEnd   = FormatHelper.TODateInt(this.txtDateTo.Text);

            return(this._OQCFacade.QueryFrozenAndMaterialCount(LotNo, Mmodelcode, Stepsequence,
                                                               BigLine, frozenDateStart, frozenDateEnd, -1, -1, FrozenStatus.STATUS_FRONZEN));
        }
Exemplo n.º 26
0
        protected void cmdSave_ServerClick(object sender, System.EventArgs e)
        {
            ArrayList array = this.gridHelper.GetCheckedRows();

            if (array == null || array.Count <= 0)
            {
                return;
            }

            if (!ValidateInput())
            {
                return;
            }

            string unfrozenReason = this.txtUnfrozenCauseEdit.Text.Trim();
            string userCode       = this.GetUserCode();

            try
            {
                ((SQLDomainDataProvider)this.DataProvider).PersistBroker.AutoCloseConnection = false;
                ((SQLDomainDataProvider)this.DataProvider).PersistBroker.OpenConnection();
                this.DataProvider.BeginTransaction();

                if (_OQCFacade == null)
                {
                    _OQCFacade = new OQCFacade(this.DataProvider);
                }

                DBDateTime currentDBDateTime = FormatHelper.GetNowDBDateTime(this.DataProvider);

                foreach (GridRecord row in array)
                {
                    OQCLot OQClot = (OQCLot)this.GetEditObject(row);

                    if (OQClot != null)
                    {
                        //更新Lot
                        _OQCFacade.UpdateUnFrozenOnLot(((OQCLot)OQClot).LOTNO, unfrozenReason, currentDBDateTime.DBDate,
                                                       currentDBDateTime.DBTime, userCode, OQCFacade.Lot_Sequence_Default);
                        // 更新frozen
                        _OQCFacade.UnFreezeFrozen(((OQCLot)OQClot).LOTNO, unfrozenReason, currentDBDateTime.DBDate,
                                                  currentDBDateTime.DBTime, userCode, OQCFacade.Lot_Sequence_Default);
                    }
                }


                this.DataProvider.CommitTransaction();

                this.txtUnfrozenCauseEdit.Text = string.Empty;
            }
            catch (Exception ex)
            {
                this.DataProvider.RollbackTransaction();
                throw ex;
            }
            finally
            {
                ((SQLDomainDataProvider)this.DataProvider).PersistBroker.CloseConnection();
                ((SQLDomainDataProvider)this.DataProvider).PersistBroker.AutoCloseConnection = true;
            }

            this.gridHelper.RequestData();
        }
Exemplo n.º 27
0
        private void QueryEvent(object sender, EventArgs e)
        {
            //将序列号转换为SourceCode
            DataCollectFacade dataCollectfacade = new DataCollectFacade(this.DataProvider);
            //对于序列号的输入框,需要进行一下处理
            string startRCard = FormatHelper.CleanString(this.txtStartSnQuery.Text.Trim().ToUpper());
            string endRCard   = FormatHelper.CleanString(this.txtEndSnQuery.Text.Trim().ToUpper());
            //转换成SourceCard
            string startSourceCard = dataCollectfacade.GetSourceCard(startRCard, string.Empty);
            string endSourceCard   = dataCollectfacade.GetSourceCard(endRCard, string.Empty);
            //end

            int OQCBeginDate = FormatHelper.TODateInt(this.txtOQCBeginDate.Text);
            int OQCEndDate   = FormatHelper.TODateInt(this.txtOQCEndDate.Text);

            //int OQCBeginTime = FormatHelper.TOTimeInt(this.txtOQCBeginTime.Text);
            //int OQCEndTime = FormatHelper.TOTimeInt(this.txtOQCEndTime.Text);

            BenQGuru.eMES.OQC.OQCFacade oqcfacade = new BenQGuru.eMES.OQC.OQCFacade(base.DataProvider);
            (e as WebQueryEventArgsNew).GridDataSource =
                oqcfacade.QueryOQCLot2CardCheck(
                    FormatHelper.CleanString(this.txtConditionItem.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtConditionMo.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtOQCLotQuery.Text),
                    FormatHelper.CleanString(startSourceCard),
                    FormatHelper.CleanString(endSourceCard),
                    FormatHelper.CleanString(this.txtSSCode.Text),

                    FormatHelper.CleanString(this.txtBigSSCodeWhere.Text),
                    FormatHelper.CleanString(this.txtMaterialModelCodeWhere.Text),
                    FormatHelper.CleanString(this.txtOQCLotTypeQuery.Text),
                    FormatHelper.CleanString(this.txtReWorkMOQuery.Text),
                    FormatHelper.CleanString(this.txtProductionTypeQuery.Text),
                    FormatHelper.CleanString(this.drpCrewCodeQuery.SelectedValue),
                    FormatHelper.CleanString(this.txtOQCMUserRQuery.Text),

                    OQCBeginDate, 0,
                    OQCEndDate, 235959,
                    (e as WebQueryEventArgsNew).StartRow,
                    (e as WebQueryEventArgsNew).EndRow);

            (e as WebQueryEventArgsNew).RowCount =
                oqcfacade.QueryOQCLot2CardCheckCount(
                    FormatHelper.CleanString(this.txtConditionItem.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtConditionMo.Text).ToUpper(),
                    FormatHelper.CleanString(this.txtOQCLotQuery.Text),
                    FormatHelper.CleanString(startSourceCard),
                    FormatHelper.CleanString(endSourceCard),
                    FormatHelper.CleanString(this.txtSSCode.Text),

                    FormatHelper.CleanString(this.txtBigSSCodeWhere.Text),
                    FormatHelper.CleanString(this.txtMaterialModelCodeWhere.Text),
                    FormatHelper.CleanString(this.txtOQCLotTypeQuery.Text),
                    FormatHelper.CleanString(this.txtReWorkMOQuery.Text),
                    FormatHelper.CleanString(this.txtProductionTypeQuery.Text),
                    FormatHelper.CleanString(this.drpCrewCodeQuery.SelectedValue),
                    FormatHelper.CleanString(this.txtOQCMUserRQuery.Text),

                    OQCBeginDate, 0,
                    OQCEndDate, 235959);
        }
Exemplo n.º 28
0
        protected void cmdSave_ServerClick(object sender, EventArgs e)
        {
            if (CheckData() == false)
            {
                return;
            }

            try
            {
                ((BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider)base.DataProvider).PersistBroker.OpenConnection();
                if (_facade == null)
                {
                    _facade = new OQCFacadeFactory(base.DataProvider).CreateOQCFacade();
                }
                OQCFuncTest test   = (OQCFuncTest)_facade.GetOQCFuncTest(this.txtItemCode.Text);
                bool        bIsNew = false;
                if (test == null)
                {
                    bIsNew = true;
                    test   = new OQCFuncTest();
                }
                test.ItemCode           = this.txtItemCode.Text;
                test.FuncTestGroupCount = Convert.ToDecimal(this.txtGroupCount.Text);
//				test.MinDutyRatoMin = 0;
//				test.MinDutyRatoMax = 0;
//				test.BurstMdFreMin = 0;
//				test.BurstMdFreMax = 0;
                test.ElectricTestCount = Convert.ToDecimal(this.txtElectricCount.Text);
                test.MaintainUser      = this.GetUserCode();
                test.MaintainDate      = FormatHelper.TODateInt(DateTime.Today);
                test.MaintainTime      = FormatHelper.TOTimeInt(DateTime.Now);
                if (bIsNew == true)
                {
                    _facade.AddOQCFuncTest(test);
                }
                else
                {
                    _facade.UpdateOQCFuncTest(test);
                }

//				string strSql = "DELETE FROM tblOQCFuncTestSpec WHERE ItemCode='" + this.txtItemCode.Text + "'";
//				this.DataProvider.CustomExecute(new SQLCondition(strSql));
//
//				for (int i = 0; i < this.gridWebGrid.Rows.Count; i++)
//				{
//					OQCFuncTestSpec spec = new OQCFuncTestSpec();
//					spec.ItemCode = this.txtItemCode.Text;
//					spec.GroupSequence = i;
//					spec.FreMin = Convert.ToDecimal(this.gridWebGrid.Rows[i].Cells.FromKey("FreMin").Value);
//					spec.FreMax = Convert.ToDecimal(this.gridWebGrid.Rows[i].Cells.FromKey("FreMax").Value);
//					spec.ElectricMin = Convert.ToDecimal(this.gridWebGrid.Rows[i].Cells.FromKey("ElectricMin").Value);
//					spec.ElectricMax = Convert.ToDecimal(this.gridWebGrid.Rows[i].Cells.FromKey("ElectricMax").Value);
//					spec.MaintainUser = this.GetUserCode();
//					spec.MaintainDate = FormatHelper.TODateInt(DateTime.Today);
//					spec.MaintainTime = FormatHelper.TOTimeInt(DateTime.Now);
//					_facade.AddOQCFuncTestSpec(spec);
//				}
                ((BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider)base.DataProvider).PersistBroker.CommitTransaction();
            }
            catch (Exception ex)
            {
                ((BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider)base.DataProvider).PersistBroker.RollbackTransaction();
                throw ex;
            }
            finally
            {
                ((BenQGuru.eMES.Common.DomainDataProvider.SQLDomainDataProvider)base.DataProvider).PersistBroker.CloseConnection();
            }
        }