public void Insert(object obj) { StoreRules soru = (StoreRules)obj; if (!IsExecute(Insert(TABLE_NAME, new string[] { STORE_ID, RULE_ID, VAL }, new string[] { soru.Store_id.ToString(), soru.Rules_id.ToString(), "0" }))) { System.Windows.Forms.MessageBox.Show("Error When Insert Into '" + TABLE_NAME + "'"); } }
public void ChangeStoreRules(Store store, Rules rule, bool typ) { StoreRules sr = new StoreRules(); if (typ) { sr.Val = 1; } else { sr.Val = 0; } if (!IsExecute(Update(TABLE_NAME, new string[] { VAL + "='" + sr.Val + "'" }, RULE_ID + "='" + rule.Id + "' and " + STORE_ID + "='" + store.Id + "'"))) { System.Windows.Forms.MessageBox.Show("Error When Update Data On '" + TABLE_NAME + "' Table"); } }