public override object CreateInsertCommandScript(PropertyGrid SelectedPgrid, string ProjectName, string TransactionName, int ExtensionStateNumber)
        {
            Stateb State = new Stateb();

            State = (Stateb)SelectedPgrid.SelectedObject;
            List <string> SqlStringList = new List <string>();
            string        sql           = SqlStr;

            string exsql = sql;

            if (State.ExtensionStateNumber != "255")
            {
                exsql = string.Format(exsql, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.ExtensionStateNumber,
                                      State.ExtensionDescription, State.ExtensionType, ProjectName, TransactionName, State.NumbermatchingCSPpair,
                                      State.PINpairattempts, State.Reserved, State.Reserved, State.Reserved, State.Reserved,
                                      State.Reserved, State.Reserved, State.ConfigId, State.BrandId, State.ConfigVersion);
                SqlStringList.Add(exsql);
            }

            sql = string.Format(sql, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.StateNumber, State.StateDescription,
                                State.StateType, ProjectName, TransactionName, State.FirstEntryScreen, State.TimeoutNextState, State.CancelNextState,
                                State.GoodNextState, State.CSPFailNextState, State.SecondEntryScreen, State.MisMatchFirstEntryScreen, State.ExtensionStateNumber,
                                State.ConfigId, State.BrandId, State.ConfigVersion);
            SqlStringList.Add(sql);

            return(SqlStringList);
        }
        public override object FillPropertyGridFromState(object ClassInstance, PropertyGrid SelectedPgrid)
        {
            Stateb Selectedstate = new Stateb();

            Selectedstate = (Stateb)SelectedPgrid.SelectedObject;
            Stateb Dynamicstate = new Stateb();

            Dynamicstate = (Stateb)ClassInstance;
            Dynamicstate._Description = Selectedstate.StateDescription;
            Dynamicstate.BrandId      = Selectedstate.BrandId;
            Dynamicstate.ConfigId     = Selectedstate.ConfigId;

            Dynamicstate._FirstEntryScreen = Selectedstate.FirstEntryScreen;
            //Dynamicstate._TimeoutNextState = Selectedstate._TimeoutNextState;
            //Dynamicstate._CancelNextState = Selectedstate._CancelNextState;
            //Dynamicstate._GoodNextState = Selectedstate._GoodNextState;
            //Dynamicstate._CSPFailNextState = Selectedstate._CSPFailNextState;
            Dynamicstate._SecondEntryScreen        = Selectedstate.SecondEntryScreen;
            Dynamicstate._MisMatchFirstEntryScreen = Selectedstate.MisMatchFirstEntryScreen;

            Dynamicstate._ExtensionStateNumber  = Selectedstate.ExtensionStateNumber;
            Dynamicstate._ExtensionType         = Selectedstate.ExtensionType;
            Dynamicstate._ExtensionDescription  = Selectedstate.ExtensionDescription;
            Dynamicstate._NumbermatchingCSPpair = Selectedstate.NumbermatchingCSPpair;
            Dynamicstate._PINpairattempts       = Selectedstate.PINpairattempts;
            Dynamicstate._Reserved = Selectedstate.Reserved;

            return(Dynamicstate);
        }
        public override object FillStatesFromDB(object[] processRow, ArrayList StateList)
        {
            Stateb state = new Stateb();
            ModelCanvasStateObject        TransStateObj = new ModelCanvasStateObject();
            List <ModelParentStateObject> ParentobjList = new List <ModelParentStateObject>();
            List <ModelChildStateObject>  ChildobjList  = new List <ModelChildStateObject>();

            state.Status           = processRow[1].ToString();
            state.StateNumber      = processRow[3].ToString();
            state.StateDescription = processRow[4].ToString();
            state.StateType        = processRow[5].ToString();

            state._FirstEntryScreen         = processRow[8].ToString();
            state._TimeoutNextState         = processRow[9].ToString();
            state._CancelNextState          = processRow[10].ToString();
            state._GoodNextState            = processRow[11].ToString();
            state._CSPFailNextState         = processRow[12].ToString();
            state._SecondEntryScreen        = processRow[13].ToString();
            state._MisMatchFirstEntryScreen = processRow[14].ToString();
            state._ExtensionStateNumber     = processRow[15].ToString();

            state.ConfigId      = processRow[16].ToString();
            state.BrandId       = processRow[17].ToString();
            state.ConfigVersion = processRow[18].ToString();

            //Extension State Kontrolu
            if (state.ExtensionStateNumber != "255")
            {
                object[] ExtensionState = GetExtensionState(ref StateList, state.ExtensionStateNumber);
                state._ExtensionDescription  = ExtensionState[4].ToString();
                state._NumbermatchingCSPpair = ExtensionState[8].ToString();
                state._PINpairattempts       = ExtensionState[9].ToString();
                state._Reserved = ExtensionState[10].ToString();
            }


            //NextState Kontrolu
            //if (state.FirstEntryScreen != "255")
            //{
            //    ChildobjList.Add(GetChildState("FirstEntryScreen", state.FirstEntryScreen, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            //}
            if (state.TimeoutNextState != "255")
            {
                ChildobjList.Add(GetChildState("TimeoutNextState", state.TimeoutNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            }
            if (state.CancelNextState != "255")
            {
                ChildobjList.Add(GetChildState("CancelNextState", state.CancelNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            }
            if (state.GoodNextState != "255")
            {
                ChildobjList.Add(GetChildState("GoodNextState", state.GoodNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            }
            if (state.CSPFailNextState != "255")
            {
                ChildobjList.Add(GetChildState("CSPFailNextState", state.CSPFailNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber));
            }

            TransStateObj.BrandId          = state.BrandId;
            TransStateObj.ConfigId         = state.ConfigId;
            TransStateObj.Id               = state.StateNumber;
            TransStateObj.StateDescription = state.StateDescription;
            TransStateObj.Type             = state.StateType;
            TransStateObj.TransactionName  = processRow[7].ToString();

            TransStateObj.PropertyGrid.SelectedObject = state;
            TransStateObj.ParentStateList             = ParentobjList;
            TransStateObj.ChildStateList = ChildobjList;
            designerCanvas.TransactionList.Add(TransStateObj);

            return(StateList);
        }