public List <AL_GetAlertConfiguration> Configuration(string Filter, AL_GetAlertConfiguration Configuration) { DataTable dataTableModel = AL.Get(Filter, Configuration); List <AL_GetAlertConfiguration> ListModel = dataTableModel.ToList <AL_GetAlertConfiguration>(); return(ListModel); }
public HttpResponseMessage RoleConfiguration(AL_GetAlertConfiguration Configuration) { Response result = new Response(); AL_AlertBL model = new AL_AlertBL(); if (Configuration.KeyCode != null) { List <AL_GetAlertConfiguration> ModelResult = model.Configuration("Get_Alert_Role_Configurations", Configuration); return(Request.CreateResponse(HttpStatusCode.OK, ModelResult)); } else { result.Message = "KeyCode is required!"; return(Request.CreateResponse(HttpStatusCode.OK, result)); } }
public HttpResponseMessage GlobalConfiguration(AL_GetAlertConfiguration Configuration) { Response result = new Response(); AL_AlertBL model = new AL_AlertBL(); var dd = System.Web.HttpContext.Current.Application["User"]; if (Configuration.KeyCode != null) { List <AL_GetAlertConfiguration> ModelResult = model.Configuration("Get_Alert_Configurations", Configuration); return(Request.CreateResponse(HttpStatusCode.OK, ModelResult)); } else { result.Message = "KeyCode is required!"; return(Request.CreateResponse(HttpStatusCode.OK, result)); } }
public DataTable Get(string Filter, AL_GetAlertConfiguration Configuration) { SqlCommand loCommand = DataContext.OpenConnection(); try { loCommand = DataContext.SetStoredProcedure(loCommand, "AL_ManageAlert"); return(DataContext.Select(DataContext.AddParameters(loCommand, "@Filter", Filter, "@UserId", Configuration.UserId, "@KeyCode", Configuration.KeyCode, "@RoleId", Configuration.RoleId))); } catch (Exception ex) { throw; } finally { DataContext.CloseConnection(loCommand); } }
public int UpdateConfiguration(string Filter, AL_GetAlertConfiguration ConfigurationList) { SqlCommand loCommand = DataContext.OpenConnection(); try { loCommand = DataContext.SetStoredProcedure(loCommand, "AL_ManageAlert"); loCommand = DataContext.StartTransaction(loCommand); bool result = DataContext.ExecuteNonQuery(DataContext.AddParameters(loCommand, "@Filter", Filter, "@UserId", ConfigurationList.UserId, "@RoleId", ConfigurationList.RoleId, "@IsSubscribed", ConfigurationList.IsSubscribed, "@IsPushAlertRequired", ConfigurationList.IsPushAlertRequired, "@IsEmailAlertRequired", ConfigurationList.IsEmailAlertRequired, "@AlertConfigId", ConfigurationList.AlertConfigId)); DataContext.EndTransaction(loCommand); return(Convert.ToInt32(result)); } catch (Exception ex) { throw; } finally { DataContext.CloseConnection(loCommand); } }