public void deleteImage(string deviceId) { int rowsAffected = 0; RadDBImpl _dbImpl = new RadDBImpl(); string sql = "delete from image where device_id = '" + deviceId + "'"; try { rowsAffected = _dbImpl.ExeDML(sql); } catch { } }
public bool updateRegKey(string deviceId, string regKey) { RadDBImpl _dbImpl = new RadDBImpl(); bool val = false; int rowsAffected = 0; if (string.IsNullOrEmpty(deviceId)) { return(false); } else { string sql = "update device set REGKEY = '" + regKey + "' where device_id = '" + deviceId + "'"; rowsAffected = _dbImpl.ExeDML(sql); if (rowsAffected > 0) { val = true; } } return(val); }
public bool UpdateProject(string company_id, string clientID, string Bugid, string Project_type_id, string bugdesc, string start_st, string end_dt, string action_taken, string contact_person, string sessionId) { bool val = false; int rowsAffected = 0; RadDBImpl _dbImpl = new RadDBImpl(); if (string.IsNullOrEmpty(Bugid) || string.IsNullOrEmpty(Project_type_id) || string.IsNullOrEmpty(bugdesc) || string.IsNullOrEmpty(start_st) || string.IsNullOrEmpty(action_taken) || string.IsNullOrEmpty(contact_person) ) { val = false; } else { string status = string.Empty; DateTime?end_date = null; if (string.IsNullOrEmpty(end_dt)) { status = "N"; } else { status = "Y"; end_date = Convert.ToDateTime(end_dt); } string sql = "update PROJECT set Project_type_id = '" + Project_type_id.ToUpper() + "',bug_desc = '" + bugdesc + "',start_dt = to_date('" + Convert.ToDateTime(start_st) + "','MM/dd/yyyy hh:mi:ss am'),end_dt = to_date('" + end_date + "','MM/dd/yyyy hh:mi:ss am'),status='" + status.ToUpper() + "',ACTION_TAKEN='" + action_taken + "',CONTACT_PERSON='" + contact_person + "' where bug_id = '" + Bugid + "'"; rowsAffected = _dbImpl.ExeDML(sql); if (rowsAffected > 0) { val = true; } } return(val); }