public IEnumerable <ScheduleStateDataModel> GetListByApplication() { var dataQuery = new ScheduleStateDataModel(); dataQuery.ApplicationId = 100047; return(ScheduleStateDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile)); }
public ScheduleStateDataModel GetById(string value) { var dataQuery = new ScheduleStateDataModel(); dataQuery.ScheduleStateId = int.Parse(value); var result = ScheduleStateDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile, 1); return(result[0]); }
protected void btnDelete_Click(object sender, EventArgs e) { try { string[] deleteIndexList = DeleteIds.Split(','); foreach (string index in deleteIndexList) { var data = new ScheduleStateDataModel(); data.ScheduleStateId = int.Parse(index); ScheduleStateDataManager.Delete(data, SessionVariables.RequestProfile); } DeleteAndRedirect(); } catch (Exception ex) { Response.Write(ex.Message); } }
protected override DataTable GetData() { try { SuperKey = ApplicationCommon.GetSuperKey(); SetId = ApplicationCommon.GetSetId(); var selectedrows = new DataTable(); var scheduleStatedata = new ScheduleStateDataModel(); selectedrows = ScheduleStateDataManager.GetDetails(scheduleStatedata, SessionVariables.RequestProfile).Clone(); if (!string.IsNullOrEmpty(SuperKey)) { var systemEntityTypeId = (int)PrimaryEntity; var lstEntityKeys = ApplicationCommon.GetSuperKeyDetails(systemEntityTypeId, SuperKey); foreach (var entityKey in lstEntityKeys) { scheduleStatedata.ScheduleStateId = entityKey; var result = ScheduleStateDataManager.GetDetails(scheduleStatedata, SessionVariables.RequestProfile); selectedrows.ImportRow(result.Rows[0]); } } else { scheduleStatedata.ScheduleStateId = SetId; var result = ScheduleStateDataManager.GetDetails(scheduleStatedata, SessionVariables.RequestProfile); selectedrows.ImportRow(result.Rows[0]); } return(selectedrows); } catch (Exception ex) { Response.Write(ex.Message); } return(null); }
private void SetupDropdown() { var isTesting = SessionVariables.IsTesting; var personData = ApplicationUserDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(personData, drpPersonList, ApplicationUserDataModel.DataColumns.FirstName, ApplicationUserDataModel.DataColumns.ApplicationUserId); drpPersonList.SelectedValue = SessionVariables.RequestProfile.AuditId.ToString(); var scheduleStateData = ScheduleStateDataManager.GetList(SessionVariables.RequestProfile); UIHelper.LoadDropDown(scheduleStateData, drpScheduleStateList, StandardDataModel.StandardDataColumns.Name, ScheduleStateDataModel.DataColumns.ScheduleStateId); if (drpScheduleStateList.Items.FindByText("Submitted") != null) { drpScheduleStateList.SelectedValue = drpScheduleStateList.Items.FindByText("Submitted").Value; // Submitted selected by default } if (isTesting) { drpPersonList.AutoPostBack = true; drpScheduleStateList.AutoPostBack = true; if (drpPersonList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtPersonId.Text.Trim())) { drpPersonList.SelectedValue = txtPersonId.Text; } else { txtPersonId.Text = drpPersonList.SelectedItem.Value; } } if (drpScheduleStateList.Items.Count > 0) { if (!string.IsNullOrEmpty(txtScheduleState.Text.Trim())) { drpScheduleStateList.SelectedValue = txtScheduleState.Text; } else { txtScheduleState.Text = drpScheduleStateList.SelectedItem.Value; } } txtPersonId.Visible = true; txtScheduleState.Visible = true; } else { if (!string.IsNullOrEmpty(txtPersonId.Text.Trim())) { drpPersonList.SelectedValue = txtPersonId.Text; } if (!string.IsNullOrEmpty(txtScheduleState.Text.Trim())) { drpScheduleStateList.SelectedValue = txtScheduleState.Text; } } }
// GET api/summary/GetList public IEnumerable <ScheduleStateDataModel> GetList() { return(ScheduleStateDataManager.GetScheduleStateList(SessionVariables.RequestProfile)); }