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); }
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); }
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); }
public static long UpdateEmployeeForMap(string userId, string employeeId) { BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@UserId", userId, SqlDbType.NVarChar); qb.SetInParam("@EmployeeId", employeeId, SqlDbType.NVarChar); var result = qb.ExecuteNonQuery("spMapEmployee", CommandType.StoredProcedure); return(result); }
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); }
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); }
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); }
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); }
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); }
public static long InsertOutTime(Guid?employeeId, DateTime?attendanceDate, DateTime?outTime) { BuildQuery qb = new BuildQuery(); qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier); qb.SetInParam("@AttendanceDate", attendanceDate, SqlDbType.DateTime); qb.SetInParam("@OutTime", outTime, SqlDbType.DateTime); var result = qb.ExecuteNonQuery("spOutTimeAttendance"); return(result); }
public static long InsertTaxSavingType(TaxSavingTypeModel taxSavingType) { BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.ClearParameters(); qb.SetInParam("@TaxSavingTypeName", taxSavingType.TaxSavingTypeName, SqlDbType.NVarChar); qb.SetInParam("@TaxCategoryCode", taxSavingType.TaxCategoryCode, SqlDbType.NVarChar); var result = qb.ExecuteNonQuery("spInsertTaxSavingType", CommandType.StoredProcedure); return(result); }
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); }
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); }
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")); }
public static int UpdateUserContainer(string containerId, string userIds) { int retStatus = 0; BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@ContainerId", Guid.Parse(containerId), SqlDbType.UniqueIdentifier); qb.SetInParam("@UserIds", userIds, SqlDbType.VarChar); retStatus = Convert.ToInt32(qb.ExecuteNonQuery("spUpdateUserContainer")); return(retStatus); }
//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]); }
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); }
public static DataSet GetEmployeeLeaves(Guid?employeeId, DateTime?leaveDate, bool?isAdmin, int?year) { BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier); qb.SetInParam("@LeaveDate", leaveDate, SqlDbType.DateTime); qb.SetInParam("@IsAdmin", isAdmin, SqlDbType.Bit); qb.SetInParam("@Year", year, SqlDbType.Int); var ds = qb.ExecuteDataset("spGetLeave"); return(ds); }
public static DataTable GetTotalWorkingHours(Guid employeeId, int day, int month, int year) { BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier); qb.SetInParam("@Day", day, SqlDbType.Int); qb.SetInParam("@Month", month, SqlDbType.Int); qb.SetInParam("@Year", year, SqlDbType.Int); DataSet ds = qb.ExecuteDataset("spEmployeeTotalPresentHour"); return(ds.Tables[0]); }
public static DataSet GetAttendance(Guid employeeId, int?day, int month, int year) { BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier); qb.SetInParam("@Day", day, SqlDbType.Int); qb.SetInParam("@Month", month, SqlDbType.Int); qb.SetInParam("@Year", year, SqlDbType.Int); DataSet ds = qb.ExecuteDataset("spGetAttendance"); return(ds); }
public static long AddReleaseSummary(Guid?componentId, string releaseTitle, bool?isLocked, Guid?createdBy, DateTime?releaseDate) { long result; BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@ComponentId", componentId, SqlDbType.UniqueIdentifier); qb.SetInParam("@ReleaseTitle", releaseTitle, SqlDbType.NVarChar); qb.SetInParam("@IsLocked", isLocked, SqlDbType.Bit); qb.SetInParam("@CreatedBy", createdBy, SqlDbType.UniqueIdentifier); qb.SetInParam("@ReleaseDate", releaseDate, SqlDbType.DateTime); result = qb.ExecuteNonQuery("spInsertReleaseNoteSummary"); return(result); }
public static long UpdateReleaseSummary(string releaseTitle, bool?isLocked, Guid?modifiedBy, Guid?releaseNoteSummaryId, DateTime?releaseDate) { long result; BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@ReleaseTitle", releaseTitle, SqlDbType.NVarChar); qb.SetInParam("@IsLocked", isLocked, SqlDbType.Bit); qb.SetInParam("@ModifiedBy", modifiedBy, SqlDbType.UniqueIdentifier); qb.SetInParam("@ReleaseNoteSummaryId", releaseNoteSummaryId, SqlDbType.UniqueIdentifier); qb.SetInParam("@ReleaseDate", releaseDate, SqlDbType.DateTime); result = qb.ExecuteNonQuery("spUpdateReleaseNoteSummary"); return(result); }
//public static DataTable EmployeeLeaveCount(Guid? employeeId) //{ // DataSet ds; // BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); // qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier); // ds = qb.ExecuteDataset("spGetEmployeeLeaveCount"); // return ds.Tables[0]; //} //public static DataTable UpcomingLeaves() //{ // BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); // DataSet ds = qb.ExecuteDataset("spGetUpcomingLeaves"); // return ds.Tables[0]; //} public static DataSet LeaveReport(string employeeStatus, Guid?employeeId = null) { BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@EmployeeStatus", employeeStatus, SqlDbType.NVarChar); if (employeeId != null && employeeId != Guid.Empty) { qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier); } DataSet ds = qb.ExecuteDataset("spGetEmployeeLeaveRecordV2"); return(ds); }
public static DataSet GetComponents(string projectId, string componentId) { DataSet ds = null; BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); if (!string.IsNullOrWhiteSpace(projectId)) { qb.SetInParam("@ProjectId", Guid.Parse(projectId), SqlDbType.UniqueIdentifier); } if (!string.IsNullOrWhiteSpace(componentId)) { qb.SetInParam("@ComponentId", Guid.Parse(componentId), SqlDbType.UniqueIdentifier); } ds = qb.ExecuteDataset("spGetComponents"); return(ds); }
public static long InsertHoliday(HolidayModel holiday) { try { BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.ClearParameters(); qb.SetInParam("@HolidayDate", holiday.HolidayDate, SqlDbType.DateTime); qb.SetInParam("@Name", holiday.Name, SqlDbType.NVarChar); qb.SetInParam("@Remarks", holiday.Remark, SqlDbType.NVarChar); var result = qb.ExecuteNonQuery("spInsertHoliday", CommandType.StoredProcedure); return(result); } catch (Exception ex) { throw ex; } }
public static long ApproveTaxSavingReceipt(string receiptsForApprovalString) { BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@TaxSavingIds", receiptsForApprovalString, SqlDbType.NVarChar); var result = qb.ExecuteNonQuery("spApproveTaxSavingReceipts"); return(result); }
public static long DeleteTaxSavingReceipt(Guid?taxSavingId) { BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@TaxSavingId", taxSavingId, SqlDbType.UniqueIdentifier); var result = qb.ExecuteNonQuery("spDeleteTaxSavingReceipt"); return(result); }
public static long UpdateTaxSavingReceipt(Guid?taxSavingId, Guid?employeeId, int?financialYear, int?taxSavingType, int?recurringFrequency, DateTime?savingDate, string accountNumber, float?amount, string remarks, int eligibleCount) { BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@TaxSavingId", taxSavingId, SqlDbType.UniqueIdentifier); qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier); qb.SetInParam("@FinancialYear", financialYear, SqlDbType.Int); qb.SetInParam("@TaxSavingType", taxSavingType, SqlDbType.Int); qb.SetInParam("@RecurringFrequency", recurringFrequency, SqlDbType.Int); qb.SetInParam("@SavingDate", savingDate, SqlDbType.DateTime); qb.SetInParam("@AccountNumber", accountNumber, SqlDbType.NVarChar); qb.SetInParam("@Amount", amount, SqlDbType.Decimal); qb.SetInParam("@Remarks", remarks, SqlDbType.NVarChar); qb.SetInParam("@EligibleCount", eligibleCount, SqlDbType.Int); var result = qb.ExecuteNonQuery("spUpdateTaxSavingReceipt"); return(result); }
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); }
public static long DeleteReleaseNote(Guid?releaseNoteId) { long result; BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()); qb.SetInParam("@ReleaseNoteId", releaseNoteId, SqlDbType.UniqueIdentifier); result = qb.ExecuteNonQuery("spDeleteReleaseNote"); return(result); }