public static void ValidateUpdateCode(int codeID, string code) { Broker.DataAccess.State state = new Broker.DataAccess.State(); state.Code = code; state.ID = codeID; state.TestBeforeUpdate(); }
protected void btnDelete_Click1(object sender, EventArgs e) { if (GXGridView1.SelectedIndex != -1) { int stateID = 0; if (GXGridView1.SelectedDataKey != null) { int GXgvSelectedValue = Convert.ToInt32(GXGridView1.SelectedValue); stateID = GXgvSelectedValue; dvDataSource.SelectParameters.Clear(); dvDataSource.SelectParameters.Add("id", GXgvSelectedValue.ToString()); DetailsView1.DataBind(); } else { int GXgvSelectedValue = GXGridView1SelectedValue; stateID = GXgvSelectedValue; dvDataSource.SelectParameters.Clear(); dvDataSource.SelectParameters.Add("id", GXgvSelectedValue.ToString()); DetailsView1.DataBind(); } Broker.DataAccess.State s = Broker.DataAccess.State.Get(stateID); s.IsActive = false; Broker.DataAccess.State.Table.Context.SubmitChanges(); GXGridView1.TotalRecords = ActiveState.SelectCountCached(); GXGridView1.DataBind(); mvMain.SetActiveView(viewGrid); } }
public static void ValidateInsertCode(string code) { Broker.DataAccess.State state = new Broker.DataAccess.State(); state.Code = code; state.TestBeforeInsert(); }