コード例 #1
0
        private void DeletePattern()
        {
            FbTransaction trans = AppRes.DB.BeginTrans();

            try
            {
                slaveLedSet.SlavePatternNo = slaveSet.RecNo;
                slaveLedSet.Delete(trans);
                slaveSet.Delete(trans);

                AppRes.DB.CommitTrans();
            }
            catch
            {
                AppRes.DB.RollbackTrans();
            }
        }
コード例 #2
0
        private void DeleteRecipe()
        {
            FbTransaction trans = AppRes.DB.BeginTrans();

            try
            {
                Int64 recipeNo = recipeSet.RecNo;
                masterSet.Select(recipeNo, trans);

                for (int i = 0; i < masterSet.RowCount; i++)
                {
                    masterSet.Fetch(i);

                    slaveSet.MasterPatternNo = masterSet.RecNo;
                    slaveSet.Select(masterSet.RecNo, trans);

                    for (int j = 0; j < slaveSet.RowCount; j++)
                    {
                        slaveSet.Fetch(i);

                        slaveLedSet.SlavePatternNo = slaveSet.RecNo;
                        slaveLedSet.Delete(trans);
                    }

                    slaveSet.Delete(masterSet.RecNo, trans);

                    masterLedSet.MasterPatternNo = masterSet.RecNo;
                    masterLedSet.Delete(trans);
                }

                masterSet.RecipeNo = recipeNo;
                masterSet.Delete(trans);

                smuSet.RecipeNo = recipeNo;
                smuSet.Delete(trans);

                recipeSet.Delete(trans);

                AppRes.DB.CommitTrans();
            }
            catch
            {
                AppRes.DB.RollbackTrans();
            }
        }