Exemple #1
0
        public override Object  FillPropertyGridFromState(Object ClassInstance, PropertyGrid SelectedPgrid)
        {
            StateJ Selectedstate = new StateJ();
            StateJ Dynamicstate  = new StateJ();

            Selectedstate             = (StateJ)SelectedPgrid.SelectedObject;
            Dynamicstate              = (StateJ)ClassInstance;
            Dynamicstate.BrandId      = Selectedstate.BrandId;
            Dynamicstate.ConfigId     = Selectedstate.ConfigId;
            Dynamicstate._Description = Selectedstate.StateDescription;

            Dynamicstate._ExtensionDescription1 = Selectedstate.ExtensionDescription1;
            Dynamicstate._ExtensionDescription2 = Selectedstate.ExtensionDescription2;

            Dynamicstate._BNANotesReturnedScreen         = Selectedstate._BNANotesReturnedScreen;
            Dynamicstate._BNANotesReturnRetainLeaveFlag1 = Selectedstate._BNANotesReturnRetainLeaveFlag1;
            Dynamicstate._BNANotesReturnRetainLeaveFlag2 = Selectedstate._BNANotesReturnRetainLeaveFlag2;
            Dynamicstate._CardRetainedScreen             = Selectedstate._CardRetainedScreen;
            Dynamicstate._ChequeProcessorDocument        = Selectedstate._ChequeProcessorDocument;
            Dynamicstate._ChequesScreenNumber            = Selectedstate._ChequesScreenNumber;
            Dynamicstate._DocumentScreenNumber           = Selectedstate._DocumentScreenNumber;
            //Dynamicstate._NextState = Selectedstate._NextState;
            Dynamicstate._NoReceiptDeliveredScreen = Selectedstate._NoReceiptDeliveredScreen;
            Dynamicstate._ReceiptDeliveredScreen   = Selectedstate._ReceiptDeliveredScreen;
            Dynamicstate._Reserved = Selectedstate._Reserved;
            Dynamicstate._RetractingPMediaScreenNumber = Selectedstate._RetractingPMediaScreenNumber;
            Dynamicstate._StatementDeliveredScreen     = Selectedstate._StatementDeliveredScreen;

            return(Dynamicstate);
        }
Exemple #2
0
        public override object CreateInsertCommandScript(PropertyGrid SelectedPgrid, string ProjectName, string TransactionName, int ExtensionStateNumber)
        {
            StateJ State = new StateJ();

            State = (StateJ)SelectedPgrid.SelectedObject;
            List <string> SqlStringList = new List <string>();

            string sql    = SqlStr;
            string exsql1 = SqlStr;
            string exsql2 = SqlStr;

            if (State.ExtensionStateNumber1 != "255")
            {
                exsql1 = string.Format(exsql1, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.ExtensionStateNumber1,
                                       State.ExtensionDescription1, State.ExtensionStateType1, ProjectName, TransactionName, State.DocumentScreenNumber,
                                       State.ChequeProcessorDocument, State.Reserved, State.Reserved, State.ExtensionStateNumber2, State.Reserved, State.BNANotesReturnRetainLeaveFlag1,
                                       State.Reserved, State.ConfigId, State.BrandId, State.ConfigVersion);
                SqlStringList.Add(exsql1);


                if (State.ExtensionStateNumber2 != "255")
                {
                    exsql2 = string.Format(exsql2, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.ExtensionStateNumber2,
                                           State.ExtensionDescription2, State.ExtensionStateType2, ProjectName, TransactionName, State.ChequesScreenNumber,
                                           State.RetractingPMediaScreenNumber, State.Reserved, "000", State.Reserved, State.Reserved, State.BNANotesReturnRetainLeaveFlag2, State.Reserved,
                                           State.ConfigId, State.BrandId, State.ConfigVersion);
                    SqlStringList.Add(exsql2);
                }
            }

            sql = string.Format(sql, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.StateNumber, State.StateDescription,
                                State.StateType, ProjectName, TransactionName, State.ReceiptDeliveredScreen, State.NextState, State.NoReceiptDeliveredScreen,
                                State.CardRetainedScreen, State.StatementDeliveredScreen, State.Reserved, State.BNANotesReturnedScreen, State.ExtensionStateNumber1,
                                State.ConfigId, State.BrandId, State.ConfigVersion);
            SqlStringList.Add(sql);

            return(SqlStringList);
        }
Exemple #3
0
        public override object FillStatesFromDB(object[] processRow, ArrayList StateList)
        {
            StateJ state = new StateJ();
            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._ReceiptDeliveredScreen = processRow[8].ToString();
            state._NextState = processRow[9].ToString();
            state._NoReceiptDeliveredScreen = processRow[10].ToString();
            state._CardRetainedScreen       = processRow[11].ToString();
            state._StatementDeliveredScreen = processRow[12].ToString();
            state.Reserved = processRow[13].ToString();
            state._BNANotesReturnedScreen = processRow[14].ToString();
            state._ExtensionStateNumber1  = processRow[15].ToString();

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

            //Extension State Kontrolu
            if (state.ExtensionStateNumber1 != "255")
            {
                object[] ExtensionState = GetExtensionState(ref StateList, state.ExtensionStateNumber1);
                state._ExtensionDescription1          = ExtensionState[4].ToString();
                state._DocumentScreenNumber           = ExtensionState[8].ToString();
                state._ChequeProcessorDocument        = ExtensionState[9].ToString();
                state._ExtensionStateNumber2          = ExtensionState[12].ToString();
                state._BNANotesReturnRetainLeaveFlag1 = ExtensionState[14].ToString();

                if (state.ExtensionStateNumber2 != "255")
                {
                    object[] ExtensionStates2 = GetExtensionState(ref StateList, state.ExtensionStateNumber2);
                    state._ExtensionDescription2          = ExtensionStates2[4].ToString();
                    state._ChequesScreenNumber            = ExtensionStates2[8].ToString();
                    state._RetractingPMediaScreenNumber   = ExtensionStates2[9].ToString();
                    state._BNANotesReturnRetainLeaveFlag2 = ExtensionStates2[14].ToString();
                }
            }

            //NextState Kontrolu
            if (state.NextState != "255")
            {
                ChildobjList.Add(GetChildState("NextState", state.NextState, 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);
        }