Пример #1
0
    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);
        }
    }
Пример #2
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)
     }));
 }
Пример #3
0
    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);
    }
Пример #4
0
    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);
    }
Пример #5
0
 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)
     }));
 }
Пример #6
0
 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)
     }));
 }
Пример #7
0
 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)
     }));
 }
Пример #8
0
 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)
     }));
 }
Пример #9
0
 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)
     }));
 }
Пример #10
0
 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)
     }));
 }
Пример #11
0
 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)
     }));
 }
Пример #12
0
 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)
     }));
 }
Пример #13
0
 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)
     }));
 }
Пример #14
0
 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)
     }));
 }
Пример #15
0
    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);
    }
Пример #16
0
        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)
            }));
        }
Пример #17
0
    public static int RQMTSet_AddRQMT(int RQMTSetID, int RQMTID, string RQMT, bool addAsChild, int childBasedOnRQMTSet_RQMTSystemID, string pasteOptions)
    {
        SqlParameter paramRQMTID = new SqlParameter("@RQMTID", RQMTID);

        paramRQMTID.Direction = ParameterDirection.InputOutput;

        if (WTSData.ExecuteStoredProcedure("RQMTSet_AddRQMT", new SqlParameter[] {
            new SqlParameter("@RQMTSetID", RQMTSetID),
            paramRQMTID,
            new SqlParameter("@RQMT", string.IsNullOrWhiteSpace(RQMT) ? (object)DBNull.Value : RQMT),
            new SqlParameter("@AddAsChild", addAsChild),
            new SqlParameter("@ChildBasedOnRQMTSet_RQMTSystemID", childBasedOnRQMTSet_RQMTSystemID),                          // this parameter overrides the AddAsChild parameter, and bases the child indent setting on the specified RSRS's setting
            new SqlParameter("@PasteOptions", string.IsNullOrWhiteSpace(pasteOptions) ? (object)DBNull.Value : pasteOptions), // when the @ChildBasedOnRQMTSet_RQMTSystemID is filled out, this option specifies whether we are copying attributes, defects, and descriptsion from source rqmtsytems (if different than the target rqmtsystem)
            new SqlParameter("@CreatedBy", HttpContext.Current.User.Identity.Name),
            new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name)
        }))
        {
            return(paramRQMTID.Value != DBNull.Value ? (int)paramRQMTID.Value : 0);
        }

        return(0);
    }
Пример #18
0
    public static int RQMTSet_Save(int RQMTSetID, string RQMTSetName, int WTS_SYSTEMID, int WorkAreaID, int RQMTTypeID, int RQMTComplexityID, string justification)
    {
        SqlParameter paramRQMTSetID = new SqlParameter("@RQMTSetID", RQMTSetID);

        paramRQMTSetID.Direction = ParameterDirection.InputOutput;

        if (WTSData.ExecuteStoredProcedure("RQMTSet_Save", new SqlParameter[] {
            paramRQMTSetID,
            new SqlParameter("@RQMTSetName", RQMTSetName),
            new SqlParameter("@WTS_SYSTEMID", WTS_SYSTEMID),
            new SqlParameter("@WorkAreaID", WorkAreaID),
            new SqlParameter("@RQMTTypeID", RQMTTypeID),
            new SqlParameter("@RQMTComplexityID", RQMTComplexityID),
            new SqlParameter("@Justification", string.IsNullOrWhiteSpace(justification) ? (object)DBNull.Value : justification),
            new SqlParameter("@CreatedBy", HttpContext.Current.User.Identity.Name),
            new SqlParameter("@UpdatedBy", HttpContext.Current.User.Identity.Name),
        }))
        {
            RQMTSetID = (int)paramRQMTSetID.Value;
        }

        return(RQMTSetID);
    }