Example #1
0
        public static long InsertTaxSavingReceipt(Guid?employeeId, int?financialYear, int?taxSavingType, int?recurringFrequency, DateTime?savingDate, string accountNumber, float?amount, string remarks, int eligibleCount)
        {
            long       result;
            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);
            result = qb.ExecuteNonQuery("spInsertTaxSavingReceipt");
            return(result);
        }
        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);
        }
Example #3
0
        public static long InsertVersionDetail(Guid?versionId, string reference, string fileChanges, string dBChanges, string description, string changedBy, DateTime?changedOn, int qAStatus, Guid?createdBy)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@VersionId", versionId, 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);
            qb.SetInParam("@CreatedBy", createdBy, SqlDbType.UniqueIdentifier);
            result = qb.ExecuteNonQuery("spInsertDetailVersionData");
            return(result);
        }
        public static long InsertDBScript(Guid?dBBuildId, string name, string description, int?dBScriptType, int?dBChangeType, string reference, string script, DateTime?changedOn, Guid?changedBy, Guid?createdBy)
        {
            long       result;
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@DBBuildId", dBBuildId, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@Name", name, SqlDbType.NVarChar);
            qb.SetInParam("@Description", description, SqlDbType.NVarChar);
            qb.SetInParam("@DBScriptType", dBScriptType, SqlDbType.Int);
            qb.SetInParam("@DBChangeType", dBChangeType, SqlDbType.Int);
            qb.SetInParam("@Reference", reference, SqlDbType.NVarChar);
            qb.SetInParam("@Script", script, SqlDbType.NVarChar);
            qb.SetInParam("@ChangedOn", changedOn, SqlDbType.DateTime);
            qb.SetInParam("@ChangedBy", changedBy, SqlDbType.UniqueIdentifier);
            qb.SetInParam("@CreatedBy", createdBy, SqlDbType.UniqueIdentifier);
            result = qb.ExecuteNonQuery("spInsertDBScript");
            return(result);
        }
        public static IEnumerable <DataRow> 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);

            DataSet ds = qb.ExecuteDataset("spMapEmployee", CommandType.StoredProcedure);

            if (ds.Tables.Count > 0)
            {
                return(ds.Tables[0].AsEnumerable());
            }
            else
            {
                return(null);
            }
        }
Example #6
0
 public static long UpdateHoliday(HolidayModel holiday)
 {
     try
     {
         long       result;
         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);
         result = qb.ExecuteNonQuery("spUpdateHoliday", CommandType.StoredProcedure);
         return(result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public static void BulkUpdateTask(string taskIds, int operationType, string param1, string param2, string loginUserId)
        {
            BuildQuery qb = new BuildQuery(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());

            qb.SetInParam("@TaskIds", taskIds, SqlDbType.VarChar);
            qb.SetInParam("@OperationType", operationType, SqlDbType.Int);
            if (!string.IsNullOrEmpty(param1))
            {
                qb.SetInParam("@Param1", param1.Trim(), SqlDbType.NVarChar);
            }
            if (!string.IsNullOrEmpty(param2))
            {
                qb.SetInParam("@Param2", param2.Trim(), SqlDbType.NVarChar);
            }
            qb.SetInParam("@ModifiedBy", new Guid(loginUserId), SqlDbType.UniqueIdentifier);

            qb.ExecuteScalar("spUpdateTaskBulk", CommandType.StoredProcedure);
        }
        public static void CreateEmployee(Employee 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);
            qb.ExecuteScalar("spInsertEmployee", CommandType.StoredProcedure);
        }
        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);
        }