public string Create(int Id, string Tax_name, string Tax_Percentage, string gender, string date) { demo_dbEntities db = new demo_dbEntities(); string msg; try { if (ModelState.IsValid) { Tax_Enter Emp = new Tax_Enter(); Emp.Id=Id; Emp.Tax_name = Tax_name; Emp.Tax_Percentage = Tax_Percentage; Emp.gender = gender; Emp.date = date; db.AddToTax_Enter(Emp); db.SaveChanges(); msg = "Saved Successfully"; } else { msg = "Validation data not successfull"; } } catch (Exception ex) { msg = "Error occured:" + ex.Message; } return msg; }
/// <summary> /// Create a new Tax_Enter object. /// </summary> /// <param name="id">Initial value of the Id property.</param> public static Tax_Enter CreateTax_Enter(global::System.Int32 id) { Tax_Enter tax_Enter = new Tax_Enter(); tax_Enter.Id = id; return(tax_Enter); }
/// <summary> /// Deprecated Method for adding a new object to the Tax_Enter EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToTax_Enter(Tax_Enter tax_Enter) { base.AddObject("Tax_Enter", tax_Enter); }
/// <summary> /// Deprecated Method for adding a new object to the Tax_Enter EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToTax_Enter(Tax_Enter tax_Enter) { base.AddObject("Tax_Enter", tax_Enter); }
/// <summary> /// Create a new Tax_Enter object. /// </summary> /// <param name="id">Initial value of the Id property.</param> public static Tax_Enter CreateTax_Enter(global::System.Int32 id) { Tax_Enter tax_Enter = new Tax_Enter(); tax_Enter.Id = id; return tax_Enter; }