Exemplo n.º 1
0
        public static DataSet GetSavingTypes()
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());
            DataSet    ds = qb.ExecuteDataset("spGetSavingTypes", CommandType.StoredProcedure);

            return(ds);
        }
Exemplo n.º 2
0
        public static DataSet GetTasks(string projectId, string status, string taskType = "", string component = "", string assignees = "", int isBoard = 0)
        {
            DataSet    ds = null;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ProjectId", Guid.Parse(projectId), SqlDbType.UniqueIdentifier);
            if (!string.IsNullOrEmpty(status))
            {
                qb.SetInParam("@Status", status, SqlDbType.VarChar);
            }
            if (!string.IsNullOrEmpty(taskType))
            {
                qb.SetInParam("@TaskType", taskType, SqlDbType.VarChar);
            }
            if (!string.IsNullOrEmpty(component))
            {
                qb.SetInParam("@Component", component, SqlDbType.VarChar);
            }
            if (!string.IsNullOrEmpty(assignees))
            {
                qb.SetInParam("@Assignees", assignees, SqlDbType.VarChar);
            }
            qb.SetInParam("@IsBoard", isBoard, SqlDbType.Bit);
            ds = qb.ExecuteDataset("spGetTasks");
            return(ds);
        }
Exemplo n.º 3
0
        public static DataSet GetCalendar(LogModel logModel = null)
        {
            BuildQuery qb = new BuildQuery();
            var        ds = qb.ExecuteDataset("spGetCalendar", logModel: logModel);

            return(ds);
        }
Exemplo n.º 4
0
        public static DataSet GetAttendanceSummary(LogModel logModel = null)
        {
            BuildQuery qb = new BuildQuery();
            var        ds = qb.ExecuteDataset("spEmployeeAttendanceSummary", logModel: logModel);

            return(ds);
        }
Exemplo n.º 5
0
        public static DataSet GetTaxSavingType()
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());
            var        ds = qb.ExecuteDataset("spGetTaxSavingTypes");

            return(ds);
        }
Exemplo n.º 6
0
        public static DataSet GetDataBaseSnapshot(string tables, LogModel logModel = null)
        {
            BuildQuery qb = new BuildQuery();
            var        ds = qb.ExecuteDataset("spGetDBSnapshots", logModel: logModel);

            return(ds);
        }
Exemplo n.º 7
0
        public static DataTable EmployeeLeaveRecord(string isAdmin, Guid?employeeId)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            if (isAdmin == "1")
            {
                ds = qb.ExecuteDataset("spGetEmployeeLeaveCount");
            }
            else
            {
                qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier);
                ds = qb.ExecuteDataset("spGetEmployeeLeaveCount");
            }
            return(ds.Tables[0]);
        }
Exemplo n.º 8
0
        public static DataSet GetProjectSummary()
        {
            DataSet    ds = null;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            ds = qb.ExecuteDataset("spGetProjectSummary");
            return(ds);
        }
Exemplo n.º 9
0
        public static DataSet GetResourceWorkload()
        {
            DataSet    ds = null;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            ds = qb.ExecuteDataset("spGetResourceWorkload");
            return(ds);
        }
Exemplo n.º 10
0
        public static DataSet GetClients()
        {
            DataSet    ds = null;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            ds = qb.ExecuteDataset("spSelectActiveClient");
            return(ds);
        }
Exemplo n.º 11
0
        public static DataSet GetEmailTemplates()
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            ds = qb.ExecuteDataset("GetEmailTemplates");
            return(ds);
        }
        //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;
        //}
        //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;
        //}

        public static DataSet GetAttendanceReport(DateTime?reportDate)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@Period", reportDate, SqlDbType.DateTime);
            var ds = qb.ExecuteDataset("spGetEmployeeAttendance");

            return(ds);
        }
Exemplo n.º 13
0
        public static DataSet CheckRole(Guid?userId, LogModel logModel = null)
        {
            BuildQuery qb = new BuildQuery();

            qb.SetInParam("@EmployeeId", userId, SqlDbType.UniqueIdentifier);
            var ds = qb.ExecuteDataset("spCheckRole", logModel: logModel);

            return(ds);
        }
Exemplo n.º 14
0
        public static DataTable EmployeeLeaveCount(Guid?employeeId)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier);
            var ds = qb.ExecuteDataset("spGetEmployeeLeaveCount");

            return(ds.Tables[0]);
        }
        public static DataSet GetReleaseNotes(string releaseNoteSummaryIds)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ReleaseNoteSummaryIds", releaseNoteSummaryIds, SqlDbType.NVarChar);
            ds = qb.ExecuteDataset("spGetReleaseNoteBySummaryId");
            return(ds);
        }
Exemplo n.º 16
0
        public static DataSet GetEmployees(string EmployeeId)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EmployeeId", EmployeeId == null ? Guid.Empty: Guid.Parse(EmployeeId), SqlDbType.UniqueIdentifier);
            DataSet ds = qb.ExecuteDataset("spGetEmployee", CommandType.StoredProcedure);

            return(ds);
        }
        public static DataSet GetReleaseSummary(Guid?componentId)
        {
            DataSet    ds;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ComponentId", componentId, SqlDbType.UniqueIdentifier);
            ds = qb.ExecuteDataset("spGetReleaseNoteSummary");
            return(ds);
        }
Exemplo n.º 18
0
        public static DataTable GetTaskStatus(int entity_Type_Task)
        {
            DataSet    ds = null;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EntityType", entity_Type_Task, SqlDbType.Int);
            ds = qb.ExecuteDataset("spGetStatus");
            return(ds.Tables[0]);
        }
Exemplo n.º 19
0
        public static DataSet GetAllProjects(string userId)
        {
            DataSet    ds = null;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@UserId", Guid.Parse(userId), SqlDbType.UniqueIdentifier);
            ds = qb.ExecuteDataset("spGetAssignedProject");
            return(ds);
        }
Exemplo n.º 20
0
        public static DataSet GetProjectWorkLogs(DateTime dateWorklog)
        {
            DataSet    ds = null;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@Period", dateWorklog, SqlDbType.DateTime);
            ds = qb.ExecuteDataset("spGetMonthlyWorkLogProject");
            return(ds);
        }
Exemplo n.º 21
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);
        }
Exemplo n.º 22
0
        public static DataSet TodayAttendanceTime(Guid?employeeId, DateTime?date)
        {
            BuildQuery qb = new BuildQuery();

            qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Date", date, SqlDbType.DateTime);
            var ds = qb.ExecuteDataset("spCheckAttendanceTime");

            return(ds);
        }
Exemplo n.º 23
0
        public static DataSet GetUserContainerPermission(string containerId)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            if (!string.IsNullOrWhiteSpace(containerId))
            {
                qb.SetInParam("@ContainerId", Guid.Parse(containerId), SqlDbType.UniqueIdentifier);
            }
            return(qb.ExecuteDataset("spGetUserContainerPermission"));
        }
Exemplo n.º 24
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);
        }
Exemplo n.º 25
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);
        }
Exemplo n.º 26
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);
        }
Exemplo n.º 27
0
        public static DataSet GetTaxSavingReceiptForExcel(Guid?employeeId, int finacialYear)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@FinancialYear", finacialYear, SqlDbType.Int);
            var ds = qb.ExecuteDataset("spGetTaxSavingReceiptExcel");

            return(ds);
        }
Exemplo n.º 28
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);
        }
Exemplo n.º 29
0
        //public static long UpdateLeave(Guid? leaveId, DateTime? leaveDate, string leaveType, decimal? leaveCount, string remarks, bool? isApproved)
        //{
        //    long result;
        //    BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());
        //    qb.SetInParam("@LeaveId", leaveId, SqlDbType.UniqueIdentifier);
        //    qb.SetInParam("@LeaveDate", leaveDate, SqlDbType.DateTime);
        //    qb.SetInParam("@LeaveType", leaveType, SqlDbType.NVarChar);
        //    qb.SetInParam("@LeaveCount", leaveCount, SqlDbType.Decimal);
        //    qb.SetInParam("@Remarks", remarks, SqlDbType.NVarChar);
        //    qb.SetInParam("@IsApproved", isApproved, SqlDbType.Bit);
        //    result = qb.ExecuteNonQuery("spUpdateLeave");
        //    return result;
        //}
        //public static long DeleteLeave(Guid? leaveId)
        //{
        //    long result;
        //    BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());
        //    qb.SetInParam("@LeaveId", leaveId, SqlDbType.UniqueIdentifier);
        //    result = qb.ExecuteNonQuery("spDeleteLeave");
        //    return result;
        //}
        //public static long InsertLeave(Guid? employeeId, DateTime? leaveFromDate, DateTime? leaveToDate, string leaveType, decimal? leaveCount, string remarks)
        //{
        //    long result;
        //    BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());
        //    qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier);
        //    qb.SetInParam("@LeaveFromDate", leaveFromDate, SqlDbType.DateTime);
        //    qb.SetInParam("@LeaveToDate", leaveToDate, SqlDbType.DateTime);
        //    qb.SetInParam("@LeaveType", leaveType, SqlDbType.NVarChar);
        //    qb.SetInParam("@LeaveCount", leaveCount, SqlDbType.Decimal);
        //    qb.SetInParam("@Remarks", remarks, SqlDbType.NVarChar);
        //    result = qb.ExecuteNonQuery("spInsertLeave");
        //    return result;
        //}
        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]);
        }
Exemplo 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"));
        }