public override Object FillStatesFromDB(object[] processRow, ArrayList StateList) { StateSemicolon state = new StateSemicolon(); 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._Description = processRow[4].ToString(); state.StateType = processRow[5].ToString(); state._GoodNextState = processRow[8].ToString(); state._ProcessingNotPerformedNextState = processRow[9].ToString(); state._Reserved = processRow[14].ToString(); state.ConfigId = processRow[16].ToString(); state.BrandId = processRow[17].ToString(); state.ConfigVersion = processRow[18].ToString(); //NextState Kontrolu if (state.GoodNextState != "255") { ChildobjList.Add(GetChildState("GoodNextState", state.GoodNextState, StateList, processRow[7].ToString(), state.StateType, state.StateNumber)); } if (state.ProcessingNotPerformedNextState != "255") { ChildobjList.Add(GetChildState("ProcessingNotPerformedNextState ", state.ProcessingNotPerformedNextState, 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); }
public override object CreateInsertCommandScript(PropertyGrid SelectedPgrid, string ProjectName, string TransactionName, int ExtensionStateNumber) { StateSemicolon State = new StateSemicolon(); State = (StateSemicolon)SelectedPgrid.SelectedObject; List <string> SqlStringList = new List <string>(); string sql = SqlStr; sql = string.Format(sql, Guid, Status, DateTime.Now.ToString("yyyyMMddHHmmss"), State.StateNumber, State.StateDescription, State.StateType, ProjectName, TransactionName, State.GoodNextState, State.ProcessingNotPerformedNextState, State.Reserved, State.Reserved, State.Reserved, State.Reserved, State.Reserved, State.Reserved, State.ConfigId, State.BrandId, State.ConfigVersion); SqlStringList.Add(sql); return(SqlStringList); }
public override Object FillPropertyGridFromState(Object ClassInstance, PropertyGrid SelectedPgrid) { StateSemicolon Selectedstate = new StateSemicolon(); StateSemicolon Dynamicstate = new StateSemicolon(); Selectedstate = (StateSemicolon)SelectedPgrid.SelectedObject; Dynamicstate = (StateSemicolon)ClassInstance; Dynamicstate._Description = Selectedstate.StateDescription; Dynamicstate.BrandId = Selectedstate.BrandId; Dynamicstate.ConfigId = Selectedstate.ConfigId; //Dynamicstate._GoodNextState = Selectedstate._GoodNextState; //Dynamicstate._ProcessingNotPerformedNextState = Selectedstate._ProcessingNotPerformedNextState; Dynamicstate._Reserved = Selectedstate.Reserved; return(Dynamicstate); }
public override Object StateChanged(string SelectedProperty, string newValue, Object ClassInstance, PropertyGrid SelectedPgrid) { //FillStateFromPropertyGrid StateSemicolon Selectedstate = new StateSemicolon(); StateSemicolon Dynamicstate = new StateSemicolon(); Selectedstate = (StateSemicolon)SelectedPgrid.SelectedObject; Dynamicstate = (StateSemicolon)ClassInstance; Dynamicstate._Description = Selectedstate.StateDescription; Dynamicstate.BrandId = Selectedstate.BrandId; Dynamicstate.ConfigId = Selectedstate.ConfigId; Dynamicstate._GoodNextState = Selectedstate.GoodNextState; Dynamicstate._ProcessingNotPerformedNextState = Selectedstate.ProcessingNotPerformedNextState; Dynamicstate._Reserved = Selectedstate.Reserved; return(Dynamicstate); }