Ejemplo n.º 1
0
        public static void DeleteWorkLog(Guid userId, Guid taskId, DateTime workDate)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@UserId", userId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@TaskId", taskId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@WorkDate", workDate, SqlDbType.DateTime);
            qb.ExecuteNonQuery("spDeleteWorkLog");
        }
Ejemplo n.º 2
0
        public static void UpdateTodayWorkLog(Guid userId, Guid taskId, decimal hours)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@UserId", userId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@TaskId", taskId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Hours", hours, SqlDbType.Decimal);
            qb.ExecuteNonQuery("spUpdateTodayWorkLog");
        }
Ejemplo n.º 3
0
        public static void UpdateComment(string commentId, string comment, string userId)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@CommentId", Guid.Parse(commentId), SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Comment", comment, SqlDbType.NVarChar);
            qb.SetInParam("@ModifiedBy", Guid.Parse(userId), SqlDbType.UniqueIdentifier);
            qb.ExecuteNonQuery("spUpdateComment");
        }
Ejemplo n.º 4
0
        public static void UpdateTaskRank(string data, int?status)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.ClearParameters();
            qb.SetInParam("@data", data, SqlDbType.NVarChar);
            qb.SetInParam("@status", status, SqlDbType.Int);
            qb.ExecuteScalar("spUpdateTaskRank", CommandType.StoredProcedure);
        }
Ejemplo n.º 5
0
        public static DataTable DownloadAttachment(string attachmentId, string entityId)
        {
            DataSet    ds = null;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@AttachmentId", Guid.Parse(attachmentId), SqlDbType.UniqueIdentifier);
            qb.SetInParam("@EntityId", Guid.Parse(entityId), SqlDbType.UniqueIdentifier);
            ds = qb.ExecuteDataset("spDownloadAttachment2");
            return(ds.Tables[0]);
        }
Ejemplo n.º 6
0
        public static DataSet GetUserWorkLogs(string userId, DateTime dateWorklog)
        {
            DataSet    ds = null;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@UserId", Guid.Parse(userId), SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Period", dateWorklog, SqlDbType.DateTime);
            ds = qb.ExecuteDataset("spGetMonthlyWorkLog");
            return(ds);
        }
Ejemplo n.º 7
0
        public static DataSet GetTodayWorklog(string taskId, string userId)
        {
            DataSet    ds = null;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@TaskId", Guid.Parse(taskId), SqlDbType.UniqueIdentifier);
            qb.SetInParam("@UserId", Guid.Parse(userId), SqlDbType.UniqueIdentifier);
            ds = qb.ExecuteDataset("spGetTodayWorklog");
            return(ds);
        }
Ejemplo n.º 8
0
        public static DataSet CheckAttendanceTime(Guid?employeeId, DateTime?date)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Date", date, SqlDbType.DateTime);
            ds = qb.ExecuteDataset("spCheckAttendanceTime");
            return(ds);
        }
Ejemplo n.º 9
0
        public static DataSet GetVersionDetails(Guid?versionId, Guid?taskId = null)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@VersionId", versionId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@TaskId", taskId, SqlDbType.UniqueIdentifier);
            ds = qb.ExecuteDataset("spGetDetailVersionData");
            return(ds);
        }
Ejemplo n.º 10
0
        public static DataSet GetTypes(int?entityType, string optionSetName)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EntityType", entityType, SqlDbType.Int);
            qb.SetInParam("@OptionSetName", optionSetName, SqlDbType.NVarChar);
            ds = qb.ExecuteDataset("spGetOptions");
            return(ds);
        }
Ejemplo n.º 11
0
        public static long ImportBulkReleaseNotes(Guid?releaseNoteSummaryId, string selectedVersions)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ReleaseNoteSummaryId", releaseNoteSummaryId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@SelectedVersions", selectedVersions, SqlDbType.NVarChar);
            result = qb.ExecuteNonQuery("spGetReference");
            return(result);
        }
Ejemplo n.º 12
0
        public static DataSet CopyTaxSavingData(Guid EmployeeId, int FinancialPriviousYear)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EmployeeId", EmployeeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@FinancialPriviousYear", FinancialPriviousYear, SqlDbType.Int);
            DataSet ds = qb.ExecuteDataset("spCopyTaxSavingData", CommandType.StoredProcedure);

            return(ds);
        }
Ejemplo n.º 13
0
        public static DataSet GetComments(int entityType, string taskId)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EntityType", entityType, SqlDbType.Int);
            qb.SetInParam("@EntityId", Guid.Parse(taskId), SqlDbType.UniqueIdentifier);
            var ds = qb.ExecuteDataset("spGetComments");

            return(ds);
        }
Ejemplo n.º 14
0
        public static DataSet GetTaxSavingReceiptForExcel(Guid?employeeId, int finacialYear)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@FinancialYear", finacialYear, SqlDbType.Int);
            ds = qb.ExecuteDataset("spGetTaxSavingReceiptExcel");
            return(ds);
        }
Ejemplo n.º 15
0
        public static void InsertComment(string entityId, int entityType, string commentId, string comment, string userId)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EntityId", Guid.Parse(entityId), SqlDbType.UniqueIdentifier);
            qb.SetInParam("@EntityType", entityType, SqlDbType.Int);
            qb.SetInParam("@Comment", comment, SqlDbType.VarChar);
            qb.SetInParam("@CreatedBy", Guid.Parse(userId), SqlDbType.UniqueIdentifier);
            qb.ExecuteNonQuery("spInsertComment");
        }
Ejemplo n.º 16
0
        public static DataSet GetDBScriptsBySearchText(Guid?componentId, string searchText)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ComponentId", componentId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@SearchText", searchText, SqlDbType.NVarChar);
            ds = qb.ExecuteDataset("spGetScriptsByComponentAndName");
            return(ds);
        }
Ejemplo n.º 17
0
        public static long DeleteDeploymentDetails(Guid?versionId, Guid?deploymentSiteId)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@VersionId", versionId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@DeploymentSiteId", deploymentSiteId, SqlDbType.UniqueIdentifier);
            result = qb.ExecuteNonQuery("spDeleteDeploymentDetail");
            return(result);
        }
Ejemplo n.º 18
0
        public static DataSet GetVersionsForComponentByTaskId(Guid?taskId, string project)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@TaskId", taskId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Project", project, SqlDbType.NVarChar);
            ds = qb.ExecuteDataset("spGetVersionsForTask");
            return(ds);
        }
Ejemplo n.º 19
0
        public static long LockDBScript(Guid?dBBuildId, bool?isLocked, Guid?modifiedBy)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@DBBuildId", dBBuildId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@IsLocked", isLocked, SqlDbType.Bit);
            qb.SetInParam("@ModifiedBy", modifiedBy, SqlDbType.UniqueIdentifier);
            result = qb.ExecuteNonQuery("spUpdateDBBuild");
            return(result);
        }
Ejemplo n.º 20
0
        public static long InsertTaxSavingType(TaxSavingTypeModel taxSavingType)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.ClearParameters();
            qb.SetInParam("@TaxSavingTypeName", taxSavingType.TaxSavingTypeName, SqlDbType.NVarChar);
            qb.SetInParam("@TaxCategoryCode", taxSavingType.TaxCategoryCode, SqlDbType.NVarChar);
            result = qb.ExecuteNonQuery("spInsertTaxSavingType", CommandType.StoredProcedure);
            return(result);
        }
Ejemplo n.º 21
0
        public static DataTable GetEmployeeTotalLeave(Guid?employeeId, DateTime?leaveDate, int?year)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@LeaveDate", leaveDate, SqlDbType.DateTime);
            qb.SetInParam("@Year", year, SqlDbType.Int);
            DataSet ds = qb.ExecuteDataset("spGetEmployeeTotalLeave");

            return(ds.Tables[0]);
        }
Ejemplo n.º 22
0
        public static DataSet GetComponents(Guid?projectId = null, Boolean?isDBComponent = null, Boolean?isVersionComponent = null)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ProjectId", projectId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@IsDBComponent", isDBComponent, SqlDbType.Bit);
            qb.SetInParam("@IsVersionComponent", isVersionComponent, SqlDbType.Bit);
            ds = qb.ExecuteDataset("spGetComponentsByType");
            return(ds);
        }
Ejemplo n.º 23
0
        public static int InsertContainer(Container container)
        {
            int retStatus = 0;

            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ContainerName", container.Name, SqlDbType.NVarChar);
            qb.SetInParam("@Directories", container.Directories, SqlDbType.NVarChar);
            retStatus = Convert.ToInt32(qb.ExecuteNonQuery("spInsertContainer"));
            return(retStatus);
        }
Ejemplo n.º 24
0
        public static long LockVersion(Guid?versionId, Guid?userId)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@VersionId", versionId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@IsLocked", true, SqlDbType.Bit);
            qb.SetInParam("@ModifiedBy", userId, SqlDbType.UniqueIdentifier);
            result = qb.ExecuteNonQuery("spUpdateVersionLock");
            return(result);
        }
Ejemplo n.º 25
0
        public static long InsertNewBuild(Guid?componentId, string name, Guid?createdBy)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ComponentId", componentId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Name", name, SqlDbType.NVarChar);
            qb.SetInParam("@CreatedBy", createdBy, SqlDbType.UniqueIdentifier);
            result = qb.ExecuteNonQuery("spInsertDBBuild");
            return(result);
        }
Ejemplo n.º 26
0
        public static long InsertOutTime(Guid?employeeId, DateTime?attendanceDate, DateTime?outTime)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@AttendanceDate", attendanceDate, SqlDbType.DateTime);
            qb.SetInParam("@OutTime", outTime, SqlDbType.DateTime);
            result = qb.ExecuteNonQuery("spOutTimeAttendance");
            return(result);
        }
Ejemplo n.º 27
0
        public static int UpdateProjectPermission(string projectId, string userIds)
        {
            int retStatus = 0;

            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ProjectId", Guid.Parse(projectId), SqlDbType.UniqueIdentifier);
            qb.SetInParam("@UserIds", userIds, SqlDbType.NVarChar);
            retStatus = Convert.ToInt32(qb.ExecuteNonQuery("spUpdateProjectPermission"));
            return(retStatus);
        }
Ejemplo n.º 28
0
        public static long MoveChanges(Guid?versionId, Guid?versionChangeId, int?status)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@VersionId", versionId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@VersionChangeId", versionChangeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Status", status, SqlDbType.Int);
            result = qb.ExecuteNonQuery("spMoveChanges");
            return(result);
        }
Ejemplo n.º 29
0
        public static DataTable GetBuildsBetweenFromAndTo(Guid?componentId, string dBBuildFrom, string dBBuildTo)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ComponentId", componentId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@DBBuildFrom", dBBuildFrom, SqlDbType.NVarChar);
            qb.SetInParam("@DBBuildTo", dBBuildTo, SqlDbType.NVarChar);
            ds = qb.ExecuteDataset("spGetTotalBuild");
            return(ds.Tables[0]);
        }
Ejemplo n.º 30
0
        public static DataSet GetContainers(bool isAdminRole, string userId)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@IsAdminRole", isAdminRole, SqlDbType.Bit);
            if (!string.IsNullOrWhiteSpace(userId))
            {
                qb.SetInParam("@UserId", Guid.Parse(userId), SqlDbType.UniqueIdentifier);
            }
            return(qb.ExecuteDataset("spGetContainers"));
        }