public static void AddWorkLog(Guid workLogId, Guid userId, Nullable <int> jiraIssueId, DateTime workDate, decimal hours, string remarks, Guid taskId, Nullable <int> remainingEstimate)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@WorkLogId", workLogId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@UserId", userId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@JiraIssueId", jiraIssueId, SqlDbType.Int);
            qb.SetInParam("@WorkDate", workDate, SqlDbType.DateTime);
            qb.SetInParam("@Hours", hours, SqlDbType.Decimal);
            qb.SetInParam("@Remarks", remarks, SqlDbType.NVarChar);
            qb.SetInParam("@TaskId", taskId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@RemainingEstimate", remainingEstimate, SqlDbType.Int);
            qb.ExecuteNonQuery("spInsertWorkLog");
        }
        public static long InsertVersionChangeCommit(VersionCommitDetails versionCommitDetails)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@VersionChangeId", versionCommitDetails.VersionChangeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@GitCommitId", versionCommitDetails.GitCommitId, SqlDbType.NVarChar);
            qb.SetInParam("@CommittedBy", versionCommitDetails.CommittedBy, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@CommittedOn", versionCommitDetails.CommittedOn, SqlDbType.DateTime);
            qb.SetInParam("@CommittedFiles", versionCommitDetails.CommittedFiles, SqlDbType.NVarChar);
            qb.SetInParam("@CommitDescription", versionCommitDetails.CommittedDescription, SqlDbType.NVarChar);
            result = qb.ExecuteNonQuery("spInsertVersionChangeCommit");
            return(result);
        }
Beispiel #3
0
        public static void UpdateEmailTemplate(EmailTemplateModel updated)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EmailTemplateId", updated.EmailTemplateId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@TemplateName", updated.TemplateName, SqlDbType.VarChar);
            qb.SetInParam("@FromEmailId", updated.FromEmailId, SqlDbType.VarChar);
            qb.SetInParam("@ToEmailId", updated.ToEmailId, SqlDbType.VarChar);
            qb.SetInParam("@CCEmailId", updated.CCEmailId, SqlDbType.VarChar);
            qb.SetInParam("@Subject", updated.Subject, SqlDbType.VarChar);
            qb.SetInParam("@Body", updated.Body, SqlDbType.VarChar);
            qb.SetInParam("@ModifiedBy", updated.ModifiedBy, SqlDbType.UniqueIdentifier);
            long returnValue = qb.ExecuteNonQuery("spUpdateEmailTepmlate", CommandType.StoredProcedure);
        }
        public static long InsertReleaseNote(Guid?versionId, string reference, int?type, string title, string remarks, bool?isPublic, Guid?releaseNoteSummaryId)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@VersionId", versionId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Reference", reference, SqlDbType.NVarChar);
            qb.SetInParam("@Type", type, SqlDbType.Int);
            qb.SetInParam("@Title", title, SqlDbType.NVarChar);
            qb.SetInParam("@Remarks", remarks, SqlDbType.NVarChar);
            qb.SetInParam("@IsPublic", isPublic, SqlDbType.Bit);
            qb.SetInParam("@ReleaseNoteSummaryId", releaseNoteSummaryId, SqlDbType.UniqueIdentifier);
            result = qb.ExecuteNonQuery("spInsertReleaseNote");
            return(result);
        }
Beispiel #5
0
        public static int InsertProject(Project project, string userId)
        {
            int retStatus = 0;

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

            qb.SetInParam("@ClientId", project.ClientId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Name", project.Name, SqlDbType.NVarChar);
            qb.SetInParam("@Code", project.Code, SqlDbType.NVarChar);
            qb.SetInParam("@Status", project.Status == true ? "1" : "0", SqlDbType.NVarChar);
            qb.SetInParam("@Description", project.Description, SqlDbType.NVarChar);
            qb.SetInParam("@CreatedBy", Guid.Parse(userId), SqlDbType.UniqueIdentifier);
            retStatus = Convert.ToInt32(qb.ExecuteNonQuery("spInsertProject"));
            return(retStatus);
        }
Beispiel #6
0
        public static long UpdateLeave(Guid?leaveId, DateTime?leaveDate, string leaveType, decimal?leaveCount, string remarks, bool?isApproved, bool?IsSecondHalf)
        {
            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);
            qb.SetInParam("@IsSecondHalf", IsSecondHalf, SqlDbType.Bit);
            var result = qb.ExecuteNonQuery("spUpdateLeave");

            return(result);
        }
Beispiel #7
0
 public static long DeleteHoliday(DateTime holidaydate)
 {
     try
     {
         long       result;
         BuildQuery bq = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());
         bq.ClearParameters();
         bq.SetInParam("@HolidayDate", holidaydate, SqlDbType.DateTime);
         result = bq.ExecuteNonQuery("spDeleteHoliday");
         return(result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #8
0
        public static int InsertComponent(ProjectComponent component, string projectId, string userId)
        {
            int retStatus = 0;

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

            qb.SetInParam("@ProjectId", Guid.Parse(projectId), SqlDbType.UniqueIdentifier);
            qb.SetInParam("@ComponentName", component.Name, SqlDbType.NVarChar);
            qb.SetInParam("@CreatedBy", Guid.Parse(userId), SqlDbType.UniqueIdentifier);
            qb.SetInParam("@IsDBComponent", component.IsDBComponent, SqlDbType.Bit);
            qb.SetInParam("@IsVersionComponent", component.IsVersionComponent, SqlDbType.Bit);
            qb.SetInParam("@GitUrl", component.GitUrl, SqlDbType.NVarChar);
            qb.SetInParam("@BuildPrefixForConfig", component.BuildPrefixForConfig, SqlDbType.NVarChar);
            retStatus = Convert.ToInt32(qb.ExecuteNonQuery("spInsertComponents"));
            return(retStatus);
        }
        public static long AddVersion(Guid?componentId, string version, string buildBy, DateTime?buildOn, string dBBuilds, bool?isLocked, Guid?createdBy, Guid?modifiedBy)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ComponentId", componentId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Version", version, SqlDbType.NVarChar);
            qb.SetInParam("@BuildBy", buildBy, SqlDbType.NVarChar);
            qb.SetInParam("@BuildOn", buildOn, SqlDbType.DateTime);
            qb.SetInParam("@DBBuilds", dBBuilds, SqlDbType.NVarChar);
            qb.SetInParam("@IsLocked", isLocked, SqlDbType.Bit);
            qb.SetInParam("@CreatedBy", createdBy, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@ModifiedBy", modifiedBy, SqlDbType.UniqueIdentifier);
            result = qb.ExecuteNonQuery("spInsertVersionData");
            return(result);
        }
        public static long UpdateVersionDetail(Guid?versionChangeId, string reference, string fileChanges, string dBChanges, string description, string changedBy, DateTime?changedOn, int qAStatus)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@VersionChangeId", versionChangeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Reference", reference, SqlDbType.NVarChar);
            qb.SetInParam("@FileChanges", fileChanges, SqlDbType.NVarChar);
            qb.SetInParam("@DBChanges", dBChanges, SqlDbType.NVarChar);
            qb.SetInParam("@Description", description, SqlDbType.NVarChar);
            qb.SetInParam("@ChangedBy", changedBy, SqlDbType.NVarChar);
            qb.SetInParam("@ChangedOn", changedOn, SqlDbType.DateTime);
            qb.SetInParam("@QAStatus", qAStatus, SqlDbType.Int);
            result = qb.ExecuteNonQuery("spUpdateDetailVersionData");
            return(result);
        }
        public static long InsertAttendance(Guid?employeeId, DateTime?attendanceDate, DateTime?inTime, DateTime?outTime, decimal?attendance, bool?isWorkFromHome, int?totalMinute, string remarks)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@EmployeeId", employeeId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@AttendanceDate", attendanceDate, SqlDbType.DateTime);
            qb.SetInParam("@InTime", inTime, SqlDbType.DateTime);
            qb.SetInParam("@OutTime", outTime, SqlDbType.DateTime);
            qb.SetInParam("@Attendance", attendance, SqlDbType.Decimal);
            qb.SetInParam("@IsWorkFromHome", isWorkFromHome, SqlDbType.Bit);
            qb.SetInParam("@TotalMinute", totalMinute, SqlDbType.Int);
            qb.SetInParam("@Remarks", remarks, SqlDbType.NVarChar);
            var result = qb.ExecuteNonQuery("spInsertAttendance");

            return(result);
        }
Beispiel #12
0
        public static long InsertTaxSavingReceipt(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("@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("spInsertTaxSavingReceipt");

            return(result);
        }
Beispiel #13
0
 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;
     }
 }
Beispiel #14
0
        //public static int Update(TaskListModel task)
        //{
        //    int retStatus = 0;
        //    BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());
        //    qb.SetInParam("@TaskId", task.TaskId, SqlDbType.UniqueIdentifier);
        //    qb.SetInParam("@Summary", task.Summary, SqlDbType.NVarChar);
        //    qb.SetInParam("@TaskType", task.TaskType, SqlDbType.Int);
        //    qb.SetInParam("@Status", task.StatusId, SqlDbType.Int);
        //    qb.SetInParam("@PriorityType", task.PriorityType, SqlDbType.Int);
        //    qb.SetInParam("@ResolutionType", task.ResolutionType, SqlDbType.Int);
        //    qb.SetInParam("@Assignee", task.Assignee, SqlDbType.NVarChar);
        //    qb.SetInParam("@Reporter", task.Reporter, SqlDbType.NVarChar);
        //    qb.SetInParam("@ComponentId", task.ComponentId, SqlDbType.UniqueIdentifier);
        //    qb.SetInParam("@DueDate", task.DueDate, SqlDbType.DateTime);
        //    qb.SetInParam("@OriginalEstimate", task.OriginalEstimate, SqlDbType.Int);
        //    qb.SetInParam("@TimeSpent", task.TimeSpent, SqlDbType.Int);
        //    qb.SetInParam("@RemainingEstimate", task.RemainingEstimate, SqlDbType.Int);
        //    qb.SetInParam("@Description", task.Description, SqlDbType.NVarChar);
        //    qb.SetInParam("@Area", task.Area, SqlDbType.NVarChar);
        //    qb.SetInParam("@ModifiedBy", task.ModifiedBy, SqlDbType.UniqueIdentifier);
        //    retStatus = Convert.ToInt32(qb.ExecuteNonQuery("spUpdateTask"));
        //    return retStatus;
        //}

        public static int Insert(TaskListModel task)
        {
            int        retStatus = 0;
            BuildQuery qb        = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@ProjectId", task.ProjectId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Summary", task.Summary, SqlDbType.NVarChar);
            qb.SetInParam("@TaskType", task.TaskType, SqlDbType.Int);
            qb.SetInParam("@Status", task.StatusId, SqlDbType.Int);
            qb.SetInParam("@PriorityType", task.PriorityType, SqlDbType.Int);
            qb.SetInParam("@ResolutionType", task.ResolutionType, SqlDbType.Int);
            qb.SetInParam("@Assignee", task.Assignee, SqlDbType.NVarChar);
            qb.SetInParam("@Reporter", task.Reporter, SqlDbType.NVarChar);
            qb.SetInParam("@ComponentId", task.ComponentId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@DueDate", task.DueDate, SqlDbType.DateTime);
            qb.SetInParam("@OriginalEstimate", task.OriginalEstimate, SqlDbType.Int);
            qb.SetInParam("@TimeSpent", task.TimeSpent, SqlDbType.Int);
            qb.SetInParam("@RemainingEstimate", task.RemainingEstimate, SqlDbType.Int);
            qb.SetInParam("@Description", task.Description, SqlDbType.NVarChar);
            qb.SetInParam("@Area", task.Area, SqlDbType.NVarChar);
            qb.SetInParam("@CreatedBy", task.CreatedBy, SqlDbType.UniqueIdentifier);
            retStatus = Convert.ToInt32(qb.ExecuteNonQuery("spInsertTask"));
            return(retStatus);
        }
Beispiel #15
0
        public static long CreateEmployee(Employees employeeDetails)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.ClearParameters();
            qb.SetInParam("@FirstName ", employeeDetails.FirstName, SqlDbType.NVarChar);
            qb.SetInParam("@MiddleName", employeeDetails.MiddleName, SqlDbType.NVarChar);
            qb.SetInParam("@LastName", employeeDetails.LastName, SqlDbType.NVarChar);
            qb.SetInParam("@Designation", employeeDetails.Designation, SqlDbType.NVarChar);
            qb.SetInParam("@Gender", employeeDetails.Gender, SqlDbType.NVarChar);
            qb.SetInParam("@DateOfBirth", employeeDetails.DateOfBirth, SqlDbType.DateTime);
            qb.SetInParam("@Anniversary", "1901-01-01", SqlDbType.DateTime);
            qb.SetInParam("@Remarks", employeeDetails.Remarks, SqlDbType.NVarChar);
            qb.SetInParam("@DateOfJoining", employeeDetails.DateOfJoining, SqlDbType.DateTime);
            qb.SetInParam("@DateOfRelieving", employeeDetails.DateOfRelieving, SqlDbType.DateTime);
            qb.SetInParam("@PanNo", employeeDetails.PanNo, SqlDbType.NVarChar);
            qb.SetInParam("@FatherName", employeeDetails.FatherName, SqlDbType.NVarChar);
            qb.SetInParam("@EmployeeType", employeeDetails.EmployeeType, SqlDbType.NVarChar);
            qb.SetInParam("@BankDetail", employeeDetails.BankDetail, SqlDbType.NVarChar);
            qb.SetInParam("@OrignalDateOfBirth", employeeDetails.OrignalDateOfBirth, SqlDbType.DateTime);
            var result = qb.ExecuteNonQuery("spInsertEmployee");

            return(result);
        }