public static void ThemNhatKy(CNhatKy nk) { try { NhatKy dao = new NhatKy(); dao.ThemNhatKy(nk); } catch (SqlException ex) { throw ex; } }
public void ThemNhatKy(CNhatKy nk) { Provider dao = new Provider(); try { dao.Connect(); string sql = "KSP_ThemNhatKy"; CommandType type = CommandType.StoredProcedure; dao.ExeCuteNonQuery(type, sql, new SqlParameter { ParameterName = "@MChine", Value = nk.MChine }, new SqlParameter { ParameterName = "@IP", Value = nk.IP }, new SqlParameter { ParameterName = "@UserID", Value = nk.UserID }, new SqlParameter { ParameterName = "@Created", Value = nk.Created }, new SqlParameter { ParameterName = "@Module", Value = nk.Module }, new SqlParameter { ParameterName = "@Action", Value = nk.Action }, new SqlParameter { ParameterName = "@Action_Name", Value = nk.Action_Name }, new SqlParameter { ParameterName = "@Reference", Value = nk.Reference }, new SqlParameter { ParameterName = "@Description", Value = nk.Description }, new SqlParameter { ParameterName = "@Active", Value = nk.Active } ); } catch (SqlException ex) { throw ex; } finally { dao.DisConnect(); } }
public static void LuuThongTin() { CNhatKy nk = new CNhatKy(UserID, DateTime.Now, Module, ActionName, Reference, ActionName + " " + Module + (Reference == "" || Reference == null ? "" : " - " + Reference)); BUS_NhatKy.ThemNhatKy(nk); }