public static int RQMTBuilder_RQMTUpdate(int RQMTID, string RQMT, string addToSets, string deleteFromSets) { SqlParameter paramExistingID = new SqlParameter("@ExistingID", SqlDbType.Int); paramExistingID.Direction = ParameterDirection.Output; if (WTSData.ExecuteStoredProcedure("RQMTBuilder_RQMTUpdate", new SqlParameter[] { new SqlParameter("@RQMTID", RQMTID), new SqlParameter("@RQMT", RQMT), new SqlParameter("@AddToSets", string.IsNullOrWhiteSpace(addToSets) ? (object)DBNull.Value : addToSets), new SqlParameter("@DeleteFromSets", string.IsNullOrWhiteSpace(deleteFromSets) ? (object)DBNull.Value : deleteFromSets), new SqlParameter("@AddedBy", HttpContext.Current.User.Identity.Name), paramExistingID })) { int eid = paramExistingID.Value != DBNull.Value && (int)paramExistingID.Value != 0 ? (int)paramExistingID.Value : RQMTID; if (eid != RQMTID) { return(eid); } } return(RQMTID); }
protected void Page_LoadComplete(object sender, EventArgs e) //Complete { int attachmentID = 0; if (Request.QueryString["attachmentID"] == null || string.IsNullOrWhiteSpace(Request.QueryString["attachmentID"])) { return; } int.TryParse(Server.UrlDecode(Request.QueryString["attachmentID"].ToString()), out attachmentID); DataTable dt = WTSData.DOWNLOAD_ATTACHMENT(attachmentID); if (dt == null || dt.Rows.Count == 0) { return; } byte[] fByte; fByte = (byte[])dt.Rows[0]["FileData"]; if (fByte.Length > 0) { Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=\"" + dt.Rows[0]["FileName"].ToString() + "\""); Response.AddHeader("Content-Length", fByte.Length.ToString()); Response.ContentType = "application/octet-stream"; Response.OutputStream.Write(fByte, 0, fByte.Length); Response.End(); } else { Response.Write("This file does not exist."); } }
public static int RQMTSystem_SaveDescription(int RQMTSystemID, int RQMTSet_RQMTSystemID, int RQMTSystemRQMTDescriptionID, string RQMTDescription, int RQMTDescriptionTypeID, bool editMode, string changeMode) { SqlParameter paramRQMTDescriptionID = new SqlParameter("@RQMTDescriptionID", -1); paramRQMTDescriptionID.Direction = ParameterDirection.InputOutput; if (WTSData.ExecuteStoredProcedure("RQMTSystem_SaveDescription", new SqlParameter[] { new SqlParameter("@RQMTSystemID", RQMTSystemID), new SqlParameter("@RQMTSet_RQMTSystemID", RQMTSet_RQMTSystemID), new SqlParameter("@RQMTSystemRQMTDescriptionID", RQMTSystemRQMTDescriptionID), paramRQMTDescriptionID, new SqlParameter("@RQMTDescription", RQMTDescription != null ? RQMTDescription : (object)DBNull.Value), new SqlParameter("@RQMTDescriptionTypeID", RQMTDescriptionTypeID), new SqlParameter("@Edit", editMode), new SqlParameter("@ChangeMode", changeMode), new SqlParameter("@CreatedBy", HttpContext.Current.User.Identity.Name), new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name) })) { return(paramRQMTDescriptionID.Value != DBNull.Value ? (int)paramRQMTDescriptionID.Value : 0); } else { return(0); } }
public static DataTable RQMTSetList_Get(int RQMTSetID = 0, bool addRQMTCount = false) { return(WTSData.GetDataTableFromStoredProcedure("RQMTSetList_Get", null, new SqlParameter[] { new SqlParameter("@RQMTSetID", RQMTSetID), new SqlParameter("@AddRQMTCount", addRQMTCount) })); }
private void LoadAvailableAttributes() { ListItem item = null; try { DataTable dt = WTSData.AttributeList_Get(1); //1 = Resource if (dt != null && dt.Rows.Count > 0) { foreach (DataRow row in dt.Rows) { item = new ListItem(row["Attribute"].ToString(), row["AttributeId"].ToString()); item.Attributes.Add("AttributeID", row["AttributeId"].ToString()); item.Attributes.Add("Attribute", row["Attribute"].ToString()); this.chkListAttributes.Items.Add(item); } } } catch (Exception ex) { LogUtility.LogException(ex); throw; } }
public static int RQMTEditData_Save(int RQMTID, string RQMT, string addToSets, string deleteFromSets, string attrChanges, string usageChanges, string funcChanges, string descChanges, int ParentRQMTID) { SqlParameter newID = new SqlParameter("NewID", SqlDbType.Int); newID.Direction = ParameterDirection.Output; if (WTSData.ExecuteStoredProcedure("RQMTEditData_Save", new SqlParameter[] { new SqlParameter("@RQMTID", RQMTID), new SqlParameter("@RQMT", RQMT), new SqlParameter("@AddToSets", string.IsNullOrWhiteSpace(addToSets) ? (object)DBNull.Value : addToSets), new SqlParameter("@DeleteFromSets", string.IsNullOrWhiteSpace(deleteFromSets) ? (object)DBNull.Value : deleteFromSets), new SqlParameter("@AttrChanges", string.IsNullOrWhiteSpace(attrChanges) ? (object)DBNull.Value : attrChanges), new SqlParameter("@UsageChanges", string.IsNullOrWhiteSpace(usageChanges) ? (object)DBNull.Value : usageChanges), new SqlParameter("@FuncChanges", string.IsNullOrWhiteSpace(funcChanges) ? (object)DBNull.Value : funcChanges), new SqlParameter("@DescChanges", string.IsNullOrWhiteSpace(descChanges) ? (object)DBNull.Value : descChanges), new SqlParameter("@ParentRQMTID", ParentRQMTID), new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name), newID })) { int savedID = RQMTID > 0 ? RQMTID : (int)newID.Value; return(savedID); } return(0); }
public static bool RQMTSet_Delete(int RQMTSetID) { return(WTSData.ExecuteStoredProcedure("RQMTSet_Delete", new SqlParameter[] { new SqlParameter("@RQMTSetID", RQMTSetID), new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name) })); }
public static bool RQMTDefectsImpactTask_Delete(int RQMTSystemDefectTaskID) { return(WTSData.ExecuteStoredProcedure("RQMTDefectsImpactTask_Delete", new SqlParameter[] { new SqlParameter("@RQMTSystemDefectTaskID", RQMTSystemDefectTaskID), new SqlParameter("@DeletedBy", HttpContext.Current.User.Identity.Name) })); }
public static DataSet RQMTDefectsImpact_Get(int intRQMT_ID = 0, int intSYSTEM_ID = 0) { return(WTSData.GetDataSetFromStoredProcedure("RQMTDefectsImpact_Get", new string[] { "Data", "SR", "Tasks" }, new SqlParameter[] { new SqlParameter("@RQMT_ID", intRQMT_ID), new SqlParameter("@SYSTEM_ID", intSYSTEM_ID) })); }
public static bool RQMTSet_ReorderRQMTs(int RQMTSetID, string order) { return(WTSData.ExecuteStoredProcedure("RQMTSet_ReorderRQMTs", new SqlParameter[] { new SqlParameter("@RQMTSetID", RQMTSetID), new SqlParameter("@Order", string.IsNullOrWhiteSpace(order) ? (object)DBNull.Value : order), new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name) })); }
public static bool RQMTSet_Task_Add(int RQMTSetID, int WORKITEM_TASKID) { return(WTSData.ExecuteStoredProcedure("RQMTSet_Task_Add", new SqlParameter[] { new SqlParameter("@RQMTSetID", RQMTSetID), new SqlParameter("@WORKITEM_TASKID", WORKITEM_TASKID), new SqlParameter("@AddedBy", HttpContext.Current.User.Identity.Name) })); }
public static DataTable RQMTBuilderDescriptionList_Get(int RQMTDescriptionID = 0, string RQMTDescription = null, bool includeArchive = false) { return(WTSData.GetDataTableFromStoredProcedure("RQMTBuilderDescriptionList_Get", "Data", new SqlParameter[] { new SqlParameter("@RQMTDescriptionID", RQMTDescriptionID), new SqlParameter("@RQMTDescription", RQMTDescription != null ? RQMTDescription : (object)DBNull.Value), new SqlParameter("@IncludeArchive", includeArchive) })); }
public static bool RQMTSystem_DeleteDescription(int RQMTSystemRQMTDescriptionID) { return(WTSData.ExecuteStoredProcedure("RQMTSystem_DeleteDescription", new SqlParameter[] { new SqlParameter("@RQMTSystemRQMTDescriptionID", RQMTSystemRQMTDescriptionID), new SqlParameter("@DeleteOrphanedDescription", true), new SqlParameter("@DeletedBy", HttpContext.Current.User.Identity.Name) })); }
public static bool RQMTDescriptionAttachment_Delete(int RQMTDescriptionAttachmentID, int RQMTDescriptionID, int attachmentID) { return(WTSData.ExecuteStoredProcedure("RQMTDescriptionAttachment_Delete", new SqlParameter[] { new SqlParameter("@RQMTDescriptionAttachmentID", RQMTDescriptionAttachmentID), new SqlParameter("@RQMTDescriptionID", RQMTDescriptionID), new SqlParameter("@AttachmentID", attachmentID) })); }
public static bool RQMTSet_RQMTSystem_Usage_Update(int RQMTSet_RQMTSystemID, int month, bool selected) { return(WTSData.ExecuteStoredProcedure("RQMTSet_RQMTSystem_Usage_Update", new SqlParameter[] { new SqlParameter("@RQMTSet_RQMTSystemID", RQMTSet_RQMTSystemID), new SqlParameter("@Month", month), new SqlParameter("@Selected", selected), new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name) })); }
public static bool RQMTDefectsImpactSR_Add(int RQMTSystemDefectID, int SRID, int AORSR_SRID) { return(WTSData.ExecuteStoredProcedure("RQMTDefectsImpactSR_Add", new SqlParameter[] { new SqlParameter("@RQMTSystemDefectID", RQMTSystemDefectID), new SqlParameter("@SRID", SRID > 0 ? SRID : (object)DBNull.Value), new SqlParameter("@AORSR_SRID", AORSR_SRID > 0 ? AORSR_SRID : (object)DBNull.Value), new SqlParameter("@AddedBy", HttpContext.Current.User.Identity.Name) })); }
public static DataTable AuditHistory_Get(int AuditLogTypeID, int ItemID, int ParentItemID, DateTime maxUpdatedDate) { return(WTSData.GetDataTableFromStoredProcedure("AuditHistory_Get", null, new SqlParameter[] { new SqlParameter("@AuditLogTypeID", AuditLogTypeID), new SqlParameter("@ItemID", ItemID), new SqlParameter("@ParentItemID", ParentItemID > 0 ? ParentItemID : (object)DBNull.Value), new SqlParameter("@MaxUpdatedDate", maxUpdatedDate != DateTime.MinValue ? maxUpdatedDate : (object)DBNull.Value) })); }
public static DataTable RQMTDescriptionAttachment_Get(int RQMTDescriptionAttachmentID, int RQMTDescriptionID, int attachmentID, bool includeData, int RQMTID) { return(WTSData.GetDataTableFromStoredProcedure("RQMTDescriptionAttachment_Get", null, new SqlParameter[] { new SqlParameter("@RQMTDescriptionAttachmentID", RQMTDescriptionAttachmentID), new SqlParameter("@RQMTDescriptionID", RQMTDescriptionID), new SqlParameter("@AttachmentID", attachmentID), new SqlParameter("@IncludeData", includeData), new SqlParameter("@RQMTID", RQMTID) })); }
public static bool RQMTSet_DeleteRQMT(int RQMTSetID, int RQMTID, int RQMTSet_RQMTSystemID, bool reorderAfterDelete) { return(WTSData.ExecuteStoredProcedure("RQMTSet_DeleteRQMT", new SqlParameter[] { new SqlParameter("@RQMTSetID", RQMTSetID), new SqlParameter("@RQMTID", RQMTID), new SqlParameter("@RQMTSet_RQMTSystemID", RQMTSet_RQMTSystemID), new SqlParameter("@ReorderAfterDelete", reorderAfterDelete), new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name) })); }
public static bool RQMTSystemAttributes_Save(int RQMTSet_RQMTSystemID, int RQMTStageID, int CriticalityID, int RQMTStatusID, bool RQMTAccepted) { return(WTSData.ExecuteStoredProcedure("RQMTSystemAttributes_Save", new SqlParameter[] { new SqlParameter("@RQMTSet_RQMTSystemID", RQMTSet_RQMTSystemID), new SqlParameter("@RQMTStageID", RQMTStageID != 0 ? RQMTStageID : (object)DBNull.Value), new SqlParameter("@CriticalityID", CriticalityID != 0 ? CriticalityID : (object)DBNull.Value), new SqlParameter("@RQMTStatusID", RQMTStatusID != 0 ? RQMTStatusID : (object)DBNull.Value), new SqlParameter("@RQMTAccepted", RQMTAccepted), new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name) })); }
public static DataSet RQMTBuilder_Data_Get(int RQMTSetID, string RQMTSetName, int WTS_SYSTEMID, int WorkAreaID, int RQMTTypeID, int RQMTSet_RQMTSystemID) { // note: this query can bring back multiple rows for the same rqmt because each rqmt can have multiple descriptions and functionalities; the code viewing the data must account for the dups return(WTSData.GetDataSetFromStoredProcedure("RQMTBuilder_Data_Get", new string[] { "RQMT", "DESC", "FUNC", "DEFECT", "RQMTSETTASK" }, new SqlParameter[] { new SqlParameter("@RQMTSetID", RQMTSetID), new SqlParameter("@RQMTSetName", RQMTSetName), new SqlParameter("@WTS_SYSTEMID", WTS_SYSTEMID), new SqlParameter("@WorkAreaID", WorkAreaID), new SqlParameter("@RQMTTypeID", RQMTTypeID), new SqlParameter("@RQMTSet_RQMTSystemID", RQMTSet_RQMTSystemID) })); }
public static DataTable AORSRWebsystemList_Get(bool includeWTS) { DataTable dt = WTSData.GetDataTableFromStoredProcedure("AORSRWebsystemList_Get"); if (includeWTS) { DataRow row = dt.NewRow(); row["Websystem"] = "WTS"; } return(dt); }
public static bool RQMTFunctionality_Save(int RQMTSetID, int RQMTSet_RQMTSystemID, string RQMTFunctionalities, int RQMTSetFunctionalityID, int FunctionalityID, int ComplexityID, string Justification) { return(WTSData.ExecuteStoredProcedure("RQMTFunctionality_Save", new SqlParameter[] { new SqlParameter("@RQMTSetID", RQMTSetID), new SqlParameter("@RQMTSet_RQMTSystemID", RQMTSet_RQMTSystemID), new SqlParameter("@RQMTFunctionalities", string.IsNullOrWhiteSpace(RQMTFunctionalities) ? (object)DBNull.Value : RQMTFunctionalities), new SqlParameter("@RQMTSetFunctionalityID", RQMTSetFunctionalityID), new SqlParameter("@FunctionalityID", FunctionalityID), new SqlParameter("@RQMTComplexityID", ComplexityID), new SqlParameter("@Justification", string.IsNullOrWhiteSpace(Justification) ? (object)DBNull.Value : Justification), new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name) })); }
public static bool RQMTSetName_Save(int RQMTSetNameID, string RQMTSetName) { SqlParameter paramExists = new SqlParameter("@Exists", 1); paramExists.Direction = ParameterDirection.InputOutput; WTSData.ExecuteStoredProcedure("RQMTSetName_Save", new SqlParameter[] { new SqlParameter("@RQMTSetNameID", RQMTSetNameID), new SqlParameter("@RQMTSetName", RQMTSetName), new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name), paramExists }); return((int)paramExists.Value == 0); }
public static int RQMT_GetRQMTSetRQMTSystemForSet(int RQMTID, int RQMTSetID) { int RQMTSet_RQMTSystemID = 0; DataTable dt = WTSData.GetDataTableFromStoredProcedure("RQMT_GetRQMTSetRQMTSystemForSet", null, new SqlParameter[] { new SqlParameter("@RQMTID", RQMTID), new SqlParameter("@RQMTSetID", RQMTSetID) }); if (dt.Rows.Count > 0) { RQMTSet_RQMTSystemID = (int)dt.Rows[0]["RQMTSet_RQMTSystemID"]; } return(RQMTSet_RQMTSystemID); }
protected void LoadAvailableOptions(MembershipUser u) { trAdmin.Visible = false; string[] roles = UserManagement.GetUserRoles_Membership(); List <string> userRoles = new List <string>(roles); //Get View options DataTable dt = WTSData.GetViewOptions(userId: this.UserId, gridName: "Default"); if (dt != null && dt.Rows.Count > 0) { ddlView_Work.DataTextField = "ViewName"; ddlView_Work.DataValueField = "GridViewID"; ddlView_Work.DataSource = dt; ddlView_Work.DataBind(); if (dt.Columns.Contains("ViewName") && dt.Columns.Contains("ViewDescription")) { ViewInfo = string.Empty; foreach (DataRow row in dt.Rows) { ViewInfo += string.Format("{0}:<br />{1}<br /><br />", row["ViewName"].ToString(), row["ViewDescription"].ToString()); } } } // 11626 - 2: get saved View Option for this user ListItem item = ddlView_Work.Items.FindByText(Session["defaultStartModule"].ToString()); //ListItem item = ddlView_Work.Items.FindByText(defaultStartGrid); if (item != null) { item.Selected = true; } else { ddlView_Work.SelectedIndex = 0; } setAdminOptions(userRoles); setMasterDataOptions(userRoles); setReportsOptions(userRoles); setWorkOptions(userRoles); setMeetingOptions(userRoles); setAOROptions(userRoles); setRQMTOptions(userRoles); setSROptions(userRoles); }
protected void Page_Load(object sender, EventArgs e) { InitializeEvents(); readQueryString(); string description = ""; string attachmentType = ""; setupMultipleFileGrid(); btnSubmit.Click += this.btnSubmit_Click; if (!IsPostBack) { //If we are adding a newsAttachment then we want dont want the user to be able to change it if (Module != "News") { DataTable dtAttachmentType = WTSData.AttachmentType_GetList(); ddlAttachmentType.DataSource = dtAttachmentType; ddlAttachmentType.DataValueField = "ATTACHMENTTYPEID"; ddlAttachmentType.DataTextField = "ATTACHMENTTYPE"; ddlAttachmentType.DataBind(); ListItem item = new ListItem("- Select -", "0"); ddlAttachmentType.Items.Insert(0, item); if (Request.QueryString["attachmentType"] != null) { attachmentType = Server.UrlDecode(Request.QueryString["attachmentType"]); } item = ddlAttachmentType.Items.FindByText(attachmentType); if (item != null) { item.Selected = true; } } if (Request.QueryString["description"] != null) { description = Server.UrlDecode(Request.QueryString["description"]); } txtDescription.Text = description; txtAttachmentID.Text = this.AttachmentID.ToString(); } }
public static bool RQMTDescriptionAttachment_Save(int RQMTDescriptionAttachmentID, int RQMTDescription_ID, int attachmentID, int attachmentTypeId, string fileName, string description, byte[] fileData, out int newAttachmentID) { newAttachmentID = 0; try { int newID = 0; string errors = null; WTSData.Attachment_Add(attachmentTypeId, fileName, "RQMTDESC ATT", description, fileData, 0, out newID, out errors); if (newID > 0) { using (SqlConnection cn = new SqlConnection(WTSCommon.WTS_ConnectionString)) { cn.Open(); using (SqlCommand cmd = new SqlCommand("RQMTDescriptionAttachment_Save", cn)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@RQMTDescriptionAttachmentID", SqlDbType.Int).Value = 0; cmd.Parameters.Add("@RQMTDescriptionID", SqlDbType.Int).Value = RQMTDescription_ID; cmd.Parameters.Add("@AttachmentID", SqlDbType.Int).Value = newID; cmd.ExecuteNonQuery(); newAttachmentID = newID; } } } else { LogUtility.LogError(errors); return(false); } } catch (Exception ex) { LogUtility.LogException(ex); return(false); } return(true); }
public static bool AuditLog_Save(int ItemID, int ParentItemID, int AuditLogTypeID, int ITEM_UPDATETYPEID, string FieldChanged, string OldValue, string NewValue, DateTime UpdatedDate, string UpdatedBy) { if (OldValue == NewValue) { return(true); } return(WTSData.ExecuteStoredProcedure("AuditLog_Save", new SqlParameter[] { new SqlParameter("@ItemID", ItemID), new SqlParameter("@ParentItemID", (ParentItemID > 0 ? ParentItemID : (object)DBNull.Value)), new SqlParameter("@AuditLogTypeID", AuditLogTypeID), new SqlParameter("@ITEM_UPDATETYPEID", ITEM_UPDATETYPEID), new SqlParameter("@FieldChanged", FieldChanged), new SqlParameter("@OldValue", string.IsNullOrWhiteSpace(OldValue) ? (object)DBNull.Value : OldValue), new SqlParameter("@NewValue", string.IsNullOrWhiteSpace(NewValue) ? (object)DBNull.Value : NewValue), new SqlParameter("@UpdatedDate", UpdatedDate == DateTime.MinValue ? (object)DBNull.Value : UpdatedDate), new SqlParameter("@UpdatedBy", UpdatedBy) })); }
protected void LoadUserPrefs() { // 11626 - 2: // Set defaults first, just in case. Session["defaultAORGrid"] = "Default"; Session["defaultStartModule"] = "My Data"; Session["defaultCrosswalkGrid"] = "Default"; Session["defaultWorkloadGrid"] = "3"; // Workload DataTable dt = WTSData.GetUserPreferences(this.UserId); if (dt != null) { DataTableReader reader = new DataTableReader(dt); while (reader.Read()) { switch (reader["GridNameID"].ToString()) { case "9": // Default Session["defaultStartModule"] = reader["ViewName"].ToString(); break; case "10": // Crosswalk Session["defaultCrosswalkGrid"] = reader["ViewName"].ToString(); break; case "1": // View Session["defaultWorkloadGrid"] = reader["SettingValue"].ToString(); break; case "11": // View Session["defaultAORGrid"] = reader["SettingValue"].ToString(); break; } } } else { // SCB TODO: Alert use to new preference options? } }