Example #1
0
        public override Object StateChanged(string SelectedProperty, string newValue, Object ClassInstance, PropertyGrid SelectedPgrid)
        {
            //FillStateFromPropertyGrid
            StateQuery Selectedstate = new StateQuery();
            StateQuery Dynamicstate  = new StateQuery();

            Selectedstate = (StateQuery)SelectedPgrid.SelectedObject;
            Dynamicstate  = (StateQuery)ClassInstance;

            Dynamicstate._Description = Selectedstate.StateDescription;
            Dynamicstate.BrandId      = Selectedstate.BrandId;
            Dynamicstate.ConfigId     = Selectedstate.ConfigId;

            Dynamicstate._NextState               = Selectedstate._NextState;
            Dynamicstate._CurrencyType            = Selectedstate._CurrencyType;
            Dynamicstate._TransactionType         = Selectedstate._TransactionType;
            Dynamicstate._AmountAuthorisedSource1 = Selectedstate._AmountAuthorisedSource1;
            Dynamicstate._AmountAuthorisedSource2 = Selectedstate._AmountAuthorisedSource2;
            Dynamicstate._AmountOtherSource1      = Selectedstate._AmountOtherSource1;

            Dynamicstate._AmountOtherSource2 = Selectedstate._AmountOtherSource2;
            Dynamicstate._Reserved           = Selectedstate._Reserved;

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

            string AmountAuthorisedSource;
            string AmountOtherSource;

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

            state._NextState       = processRow[8].ToString();
            state._CurrencyType    = processRow[9].ToString();
            state._TransactionType = processRow[10].ToString();

            AmountAuthorisedSource         = (String.IsNullOrEmpty(processRow[11].ToString())?"000":processRow[11].ToString());
            AmountOtherSource              = (String.IsNullOrEmpty(processRow[12].ToString())?"000":processRow[12].ToString());
            state._AmountAuthorisedSource1 = AmountAuthorisedSource.Substring(0, 2);
            state._AmountAuthorisedSource2 = AmountAuthorisedSource.Substring(2, 1);
            state._AmountOtherSource1      = AmountOtherSource.Substring(0, 2);
            state._AmountOtherSource2      = AmountAuthorisedSource.Substring(2, 1);
            state._Reserved = processRow[13].ToString();

            state.ConfigId      = processRow[16].ToString();
            state.BrandId       = processRow[17].ToString();
            state.ConfigVersion = processRow[18].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);
        }
Example #3
0
        public override object CreateInsertCommandScript(PropertyGrid SelectedPgrid, string ProjectName, string TransactionName, int ExtensionStateNumber)
        {
            StateQuery State = new StateQuery();

            State = (StateQuery)SelectedPgrid.SelectedObject;
            List <string> SqlStringList          = new List <string>();
            string        sql                    = SqlStr;
            string        AmountAuthorisedSource = AmountAuthorisedSource1 + AmountAuthorisedSource2;
            string        AmountOtherSource      = AmountOtherSource1 + AmountOtherSource2;

            sql = string.Format(sql, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.StateNumber, State.StateDescription,
                                State.StateType, ProjectName, TransactionName, State.NextState, State.CurrencyType,
                                State.TransactionType, AmountAuthorisedSource, AmountOtherSource, State.Reserved, State.Reserved,
                                State.Reserved, State.ConfigId, State.BrandId, State.ConfigVersion);
            SqlStringList.Add(sql);

            return(SqlStringList);
        }