Example #1
0
        public void GetStepValue(object Info, bool bSpecExist)
        {
            LinkedList condition = (LinkedList)Info;

            if (condition[Definition.DynamicCondition_Search_key.RECIPE] == null)
            {
                return;
            }

            ResetCondition();

            LinkedList stepList = new LinkedList();

            DataTable dtRecipe = (DataTable)condition[Definition.DynamicCondition_Search_key.RECIPE];

            if (dtRecipe != null)
            {
                ArrayList recipeRawidList = new ArrayList();
                for (int i = 0; i < dtRecipe.Rows.Count; i++)
                {
                    string rawid = dtRecipe.Rows[i][Definition.DynamicCondition_Search_key.VALUEDATA].ToString();
                    recipeRawidList.Add(rawid);
                }
                stepList.Add(Definition.CONDITION_KEY_RECIPE_LIST_RAWID, recipeRawidList);
            }

            DataTable dtModule = (DataTable)condition[Definition.DynamicCondition_Search_key.MODULE];

            if (dtModule != null)
            {
                ArrayList rawidList = new ArrayList();
                for (int i = 0; i < dtModule.Rows.Count; i++)
                {
                    string rawid = dtModule.Rows[i][Definition.DynamicCondition_Search_key.VALUEDATA].ToString();
                    rawidList.Add(rawid);
                }
                stepList.Add(Definition.CONDITION_KEY_EQP_RAWID_LIST, rawidList);
            }

            if (bSpecExist)
            {
                stepList.Add(Definition.CONDITION_KEY_SPEC_EXIST, bSpecExist);
            }

            byte[] btdata = stepList.GetSerialData();

            DataSet ds = _fdcWebService.GetRecipeStep(btdata);

            _dsAllStep = ds;

            if (bSpecExist)
            {
                DataSet dsAll = _fdcWebService.GetAllStep(btdata);

                if (dsAll != null && dsAll.Tables.Count > 0 && dsAll.Tables[0].Rows.Count > 0)
                {
                    ds = RefreshCondition(ds);
                }

                ApplySpecCondition(ds);
            }

            if (ds != null)
            {
                _dtStep = ds.Tables[0];

                //bsprStep.SetDataSource(ds);
                bsprStep.DataSet = ds;

                //FarPoint.Win.Spread.CellType.ICellType ct_Test_2 = this.bsprStep.ActiveSheet.Cells[0, (int)ParamColumn.SELECT].CellType;
            }
        }