public Boolean Add(string categoryid, string name, string remark, string status) { string SQL = string.Format("INSERT INTO mst_subcategory(categoryid,name,remark,status) VALUES" + " ('{0}','{1}','{2}','{3}')",categoryid, name, remark, status); DBTool dbTool = new DBTool(); if (dbTool.RunCommand(SQL)) { return true; } else { return false; } }
public Boolean Update(string name, string remark, string publisherid) { string SQL = string.Format("UPDATE mst_publisher SET name = '{0}' , remark = '{1}' WHERE" + " publisherid = '{3}'", name, remark, publisherid); DBTool dbTool = new DBTool(); if (dbTool.RunCommand(SQL)) { return true; } else { return false; } }
public Boolean Add(string name, string remark) { string SQL = string.Format("INSERT INTO mst_publisher(name,remark) VALUES ('{0}','{1}')", name, remark); DBTool dbTool = new DBTool(); if (dbTool.RunCommand(SQL)) { return true; } else { return false; } }
private void AddCounter(string bookid, string Userid) { DBTool dbTool = new DBTool(); Utility Util = new Utility(); string SQL = string.Format("INSERT INTO tb_counter(userid,bookid,load_date) VALUES ({0},{1},'{2}')", Userid, bookid, Util.GetToday()); dbTool.RunCommand(SQL); }
public Boolean Update(string name, string remark, string status, string subcategoryid) { string SQL = string.Format("UPDATE mst_subcategory SET name = '{0}' , remark = '{1}', status = '{2}' WHERE" + " subcategoryid = '{3}'", name, remark, status, subcategoryid); DBTool dbTool = new DBTool(); if (dbTool.RunCommand(SQL)) { return true; } else { return false; } }