public bool Delete() { try { MonamurDBDataSetTableAdapters.ProceduresTableAdapter t_procedTableAdap = new MonamurDBDataSetTableAdapters.ProceduresTableAdapter(); t_procedTableAdap.DeleteProcedure(ID); return(true); } catch { return(false); } }
public bool InsertProcedure() { try { MonamurDBDataSetTableAdapters.ProceduresTableAdapter t_procedTableAdap = new MonamurDBDataSetTableAdapters.ProceduresTableAdapter(); t_procedTableAdap.InsertProcedure(ProcedureName, AnimalID, Cost, Info); return(true); } catch { return(false); } }
public void GetInfoByProcId() { MonamurDBDataSetTableAdapters.ProceduresTableAdapter t_procedTableAdap = new MonamurDBDataSetTableAdapters.ProceduresTableAdapter(); MonamurDBDataSet.ProceduresDataTable t_procedDataTable = new MonamurDBDataSet.ProceduresDataTable(); t_procedTableAdap.FillById(t_procedDataTable, ProcedureID); ProcedureName = t_procedDataTable.Rows[0]["procedure_name"].ToString(); if (t_procedDataTable.Rows[0]["cost"].ToString() != String.Empty) { Cost = Convert.ToInt32(t_procedDataTable.Rows[0]["cost"]); } Info = t_procedDataTable.Rows[0]["info"].ToString(); }