public int UpdateResolveDevice(LogResolve ResolveDevice) { using (SqlConnection conObj = new SqlConnection(conStr)) { SqlCommand cmdObj = new SqlCommand("uspUpdateFixedDevice", conObj); cmdObj.CommandType = CommandType.StoredProcedure; cmdObj.Parameters.Add(new SqlParameter("@DeviceID", ResolveDevice.DeviceID)); cmdObj.Parameters.Add(new SqlParameter("@Serial", ResolveDevice.Serial)); cmdObj.Parameters.Add(new SqlParameter("@NoteTypeID", ResolveDevice.NoteTypeID)); conObj.Open(); return(Convert.ToInt32(cmdObj.ExecuteScalar())); } }
public int LogNoteAck(LogResolve NoteResolveDevice) { using (SqlConnection conObj = new SqlConnection(conStr)) { SqlCommand cmdObj = new SqlCommand("uspInsertNoteFixedLog", conObj); cmdObj.CommandType = CommandType.StoredProcedure; cmdObj.Parameters.Add(new SqlParameter("@Serial", NoteResolveDevice.Serial)); cmdObj.Parameters.Add(new SqlParameter("@LogDate", NoteResolveDevice.LogDate)); cmdObj.Parameters.Add(new SqlParameter("@userID", NoteResolveDevice.userID)); cmdObj.Parameters.Add(new SqlParameter("@Note", NoteResolveDevice.Note)); conObj.Open(); return(Convert.ToInt32(cmdObj.ExecuteScalar())); } }
public int InsertResolveLog(LogResolve ResolveLog) { using (SqlConnection conObj = new SqlConnection(conStr)) { SqlCommand cmdObj = new SqlCommand("uspInsertDeviceHistory", conObj); cmdObj.CommandType = CommandType.StoredProcedure; cmdObj.Parameters.Add(new SqlParameter("@DeviceID", ResolveLog.DeviceID)); cmdObj.Parameters.Add(new SqlParameter("@Serial", ResolveLog.Serial)); cmdObj.Parameters.Add(new SqlParameter("@LogDate", ResolveLog.LogDate)); cmdObj.Parameters.Add(new SqlParameter("@LogRetireDate", DBNull.Value)); conObj.Open(); return(Convert.ToInt32(cmdObj.ExecuteScalar())); } }