public static void Update(Category C) { using (var myCnn = Cnn.GetOpenConnection()) { myCnn.Update(C); } }
public void ChangeMode(string Mode) { ActiveMode = Mode; if (ActiveMode == Modes.ADD) SpecsCategory = new Category(); SpecsCategory = null; if (ActiveMode == Modes.DEFAULT) SelectedIndex = -1; }
public static void Save(Category C) { using (var myCnn = Cnn.GetOpenConnection()) { myCnn.Execute("INSERT INTO CATEGORY (Wording, Targetprice,B_Code) VALUES(@Wording, @Targetprice,@B_Code)", new { C.Wording, C.Targetprice, C.B_Code }); } }
public void SpecsPropertiesToObject() { SpecsCategory = new Category { Id = this.Id, Wording = this.Wording, Targetprice = this.Targetprice, B_Code = Global.BankAccountCode }; }
public void SpecsPropertiesToObject() { if (SelectedCategory == null) SelectedCategory = new Category(); SpecsRegistration = new Registration { Id = this.Id, Wording = this.Wording, Description = this.Description, DateR = this.DateR, Way = this.Way, Price = this.Price, B_Code = Global.BankAccountCode, C_Id = this.SelectedCategory.Id, T_Id = this.T_Id, Category = this.SelectedCategory }; }