//Constructors public StateBehaviour(Entity.State state, Entity host) { this.state = state; this.host = host; host.AddBehaviour(this); }
////////////////////////////// //Constructors// ////////////////////////////// public AStarChase(Entity.State state, Entity host, Entity target, Entity.State nextState) : base(state, host) { this.target = target; this.nextState = nextState; this.currentRoute = new LinkedList<Node>(); }
public static void Save(Entity.State State) { using (DataManager oDm = new DataManager()) { oDm.Add("@pStateId", SqlDbType.Int, ParameterDirection.Input, State.StateId); oDm.Add("@pStateName", SqlDbType.VarChar, 50, ParameterDirection.Input, State.StateName); oDm.CommandType = CommandType.StoredProcedure; oDm.ExecuteNonQuery("usp_State_Save"); } }
protected void dgvState_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("AddUpdate")) { int RowIndex = Convert.ToInt32(e.CommandArgument.ToString()); StateId = Convert.ToInt32(dgvState.DataKeys[RowIndex].Value.ToString()); BusinessLayer.State ObjState = new BusinessLayer.State(); Entity.State State = new Entity.State(); State.StateId = StateId; State.StateName = ((TextBox)dgvState.Rows[RowIndex].FindControl("txtState")).Text; ObjState.Save(State); LoadStateList(); } }
public void Save(Entity.State State) { DataAccess.State.Save(State); }
public void Update(Entity.State State) { _context.Entry(State).State = EntityState.Modified; }
public void Insert(Entity.State State) { _context.Entry(State).State = EntityState.Added; }