Exemple #1
0
 public void NewReceipientGroup(string strMemoGroupCode, string strDescription, int nEmployeeID)
 {
     SqlHelperUtils.ExecuteNonQuerySP("pr_tblMemoGroup_InsertReceipientGroup",
                                      new SqlParameter("@sstrMemoGroupCode", strMemoGroupCode),
                                      new SqlParameter("@sstrDescription", strDescription),
                                      new SqlParameter("@inEmployeeID", nEmployeeID));
 }
Exemple #2
0
 public void ApplyPH(int nEmployeeID, DateTime dtDate, string sstrReason)
 {
     SqlHelperUtils.ExecuteNonQuerySP("dw_tblLeavePH_Insert",
                                      new SqlParameter("@inEmployeeID", nEmployeeID),
                                      new SqlParameter("@dadtDate", SqlDbType.DateTime, 8, ParameterDirection.Input, true, 23, 3, "", DataRowVersion.Proposed, dtDate),
                                      new SqlParameter("@sstrReason", sstrReason));
 }
Exemple #3
0
 public void UpdateNewReceipientGroup(string strMemoGroupCode, string strDescription, int nMemoGroupID)
 {
     SqlHelperUtils.ExecuteNonQuerySP("pr_tblMemoGroup_Update",
                                      new SqlParameter("@inMemoGroupID", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, nMemoGroupID),
                                      new SqlParameter("@sstrMemoGroupCode", SqlDbType.VarChar, 50, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Proposed, strMemoGroupCode),
                                      new SqlParameter("@sstrDescription", SqlDbType.VarChar, 50, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Proposed, strDescription));
 }
Exemple #4
0
 public void ConvertLeavetoTimeOff(int nEmployeeID, int nYearID, int nQuantity)
 {
     SqlHelperUtils.ExecuteNonQuerySP("pr_tblLeave_ConvertLeavetoTimeOff",
                                      new SqlParameter("@inEmployeeID", nEmployeeID),
                                      new SqlParameter("@inYearID", (nYearID)),
                                      new SqlParameter("@nQuantity", nQuantity));
 }
Exemple #5
0
 public void CancelPH(int nEmployeeID, DateTime dtDate)
 {
     SqlHelperUtils.ExecuteNonQuerySP("dw_tblLeavePH_UpdateCancel",
                                      new SqlParameter("@Employee", nEmployeeID),
                                      new SqlParameter("@dtDate", dtDate),
                                      new SqlParameter("@ManagerID", 0)
                                      );
 }
Exemple #6
0
 public void ManualUpdatePreviousBal(int nEmployeeID, int nYearID, decimal TotalBal)
 {
     SqlHelperUtils.ExecuteNonQuerySP("pr_tblLeaveAdjust_InUp",
                                      new SqlParameter("@inEmployeeID", nEmployeeID),
                                      new SqlParameter("@inYearID", (nYearID)),
                                      new SqlParameter("@LeaveEarned", TotalBal),
                                      new SqlParameter("@Type", "M"));
 }
Exemple #7
0
 public bool DeleteReceipientGroup(int nMemoGroupID)
 {
     try
     {
         SqlHelperUtils.ExecuteNonQuerySP("pr_tblMemoGroup_Delete", new SqlParameter("@inMemoGroupID", nMemoGroupID));
     }
     catch
     {
         throw;
     }
     return(true);
 }
Exemple #8
0
 public bool DeleteAppointment(int nAppointmentId)
 {
     try
     {
         SqlHelperUtils.ExecuteNonQuerySP("sp_tblAppointment_Delete", new SqlParameter("@inAppointmentId", nAppointmentId),
                                          SqlHelperUtils.paramErrorCode);
     }
     catch
     {
         throw;
     }
     return(true);
 }
Exemple #9
0
 public bool CancelLeave(int nEmployeeID, int nLeaveID)
 {
     try
     {
         SqlHelperUtils.ExecuteNonQuerySP("pr_tblLeave_CancelLeave",
                                          new SqlParameter("@inLeaveID", nLeaveID),
                                          new SqlParameter("@inEmployeeID", nEmployeeID));
     }
     catch
     {
         throw;
     }
     return(true);
 }
Exemple #10
0
 public bool DeleteOvertime(int nOvertimeID, int nEmployeeID)
 {
     try
     {
         SqlHelperUtils.ExecuteNonQuerySP("pr_tblOvertime_Delete",
                                          new SqlParameter("@inOvertimeID", nOvertimeID),
                                          new SqlParameter("@inEmployeeID", nEmployeeID));
     }
     catch
     {
         throw;
     }
     return(true);
 }
Exemple #11
0
 public void NewAppoinment(int nEmployeeID, DateTime dtDate, DateTime dtStartTime, DateTime dtEndTime,
                           string strOrganization, string strBranchCode, int nContactID, string strRemarks, string strMembershipID, int nServedBy)
 {
     SqlHelperUtils.ExecuteNonQuerySP("pr_tblAppointment_Insert",
                                      new SqlParameter("@inEmployeeID", nEmployeeID),
                                      new SqlParameter("@dadtDate", SqlDbType.DateTime, 8, ParameterDirection.Input, true, 23, 3, "", DataRowVersion.Proposed, dtDate),
                                      new SqlParameter("@dadtStartTime", SqlDbType.DateTime, 8, ParameterDirection.Input, true, 23, 3, "", DataRowVersion.Proposed, dtStartTime),
                                      new SqlParameter("@dadtEndTime", SqlDbType.DateTime, 8, ParameterDirection.Input, true, 23, 3, "", DataRowVersion.Proposed, dtEndTime),
                                      new SqlParameter("@sstrOrganization", strOrganization),
                                      new SqlParameter("@sstrBranchCode", strBranchCode),
                                      new SqlParameter("@inContactId", nContactID),
                                      new SqlParameter("@sstrRemarks", strRemarks),
                                      new SqlParameter("@sstrMembershipID", strMembershipID),
                                      new SqlParameter("@inServedBy", nServedBy));
 }
Exemple #12
0
 private void EditLeave(int nLeaveID, int nEmployeeID, int nYearID, string strRemarks, double nLeaveQty,
                        double nUnpaidLeaveQty, double nTimeOffQty, double nUnpaidTimeOff, bool isFullDay, DateTime startDate, DateTime endDate)
 {
     SqlHelperUtils.ExecuteNonQuerySP("pr_tblLeave_Update",
                                      new SqlParameter("@inLeaveID", nLeaveID),
                                      new SqlParameter("@inEmployeeID", nEmployeeID),
                                      new SqlParameter("@inYearID", nYearID),
                                      new SqlParameter("@sstrRemarks", strRemarks),
                                      new SqlParameter("@dadtStartTime", SqlDbType.DateTime, 8, ParameterDirection.Input, true, 23, 3, "", DataRowVersion.Proposed, startDate),
                                      new SqlParameter("@dadtEndTime", SqlDbType.DateTime, 8, ParameterDirection.Input, true, 23, 3, "", DataRowVersion.Proposed, endDate),
                                      new SqlParameter("@fnLeaveQuantity", nLeaveQty),
                                      new SqlParameter("@fnUnpaidLeave", nUnpaidLeaveQty),
                                      new SqlParameter("@fnTimeOffQuantity", nTimeOffQty),
                                      new SqlParameter("@fnUnpaidTimeOff", nUnpaidTimeOff),
                                      new SqlParameter("@bfFullDay", isFullDay));
 }
Exemple #13
0
        public void ApplyOvertime(int nEmployeeID, DateTime dtDate, DateTime dtStartDate, DateTime dtEndDate, double nMins,
                                  string sstrReason)
        {
            if (nMins >= 6)
            {
                nMins = nMins - 1;
            }

            SqlHelperUtils.ExecuteNonQuerySP("pr_tblOvertime_Insert",
                                             new SqlParameter("@inEmployeeID", nEmployeeID),
                                             new SqlParameter("@dadtDate", SqlDbType.DateTime, 8, ParameterDirection.Input, true, 23, 3, "", DataRowVersion.Proposed, dtDate),
                                             new SqlParameter("@dadtStartTime", SqlDbType.DateTime, 8, ParameterDirection.Input, true, 23, 3, "", DataRowVersion.Proposed, dtStartDate),
                                             new SqlParameter("@dadtEndTime", SqlDbType.DateTime, 8, ParameterDirection.Input, true, 23, 3, "", DataRowVersion.Proposed, dtEndDate),
                                             new SqlParameter("@inHours", SqlDbType.Float, 8, ParameterDirection.Input, true, 23, 3, "", DataRowVersion.Proposed, nMins),
                                             new SqlParameter("@sstrReason", sstrReason));
        }
Exemple #14
0
 //DEREK DNC New Contact Insert Function
 //DEREK DNC New Contact Update Function
 public void NewContact(int nEmployeeID, string strContactName, string strNric, string strBranchCode, string strEmail,
                        string strGender, DateTime dob, int nMediaSourceID, string strMediaSource, string strMobileNo, string strRemarks, int nStatus)
 {
     SqlHelperUtils.ExecuteNonQuerySP("sp_tblContactsNew_Insert",
                                      new SqlParameter("@inEmployeeID", nEmployeeID),
                                      new SqlParameter("@sstrContactName", strContactName),
                                      new SqlParameter("@sstrNRICFIN", strNric),
                                      new SqlParameter("@sstrBranchCode", strBranchCode),
                                      new SqlParameter("@sstrEmail", strEmail),
                                      new SqlParameter("@sstrGender", strGender),
                                      new SqlParameter("@dadtDOB", dob == DateTime.Now.Date ? System.Data.SqlTypes.SqlDateTime.Null : dob),
                                      new SqlParameter("@inMediaSourceID", nMediaSourceID),
                                      new SqlParameter("@sstrMediaSource", strMediaSource),
                                      new SqlParameter("@sstrMobileNo", strMobileNo),
                                      new SqlParameter("@sstrRemarks", strRemarks),
                                      new SqlParameter("@inStatus", nStatus),
                                      new SqlParameter("@inContactId", SqlDbType.Int, 4, ParameterDirection.Output, true, 10, 0, "", DataRowVersion.Proposed, new Int32()),
                                      SqlHelperUtils.paramErrorCode);
 }
Exemple #15
0
 public void EditContact(int nContactID, int nEmployeeID, string strContactName, string strNric, string strBranchCode, string strEmail,
                         string strGender, DateTime dob, int nMediaSourceID, string strMediaSource, string strMobileNo, string strRemarks, int nStatus)
 {
     SqlHelperUtils.ExecuteNonQuerySP("sp_tblContactsNew_Update",
                                      new SqlParameter("@inContactId", nContactID),
                                      new SqlParameter("@inEmployeeID", nEmployeeID),
                                      new SqlParameter("@sstrContactName", strContactName),
                                      new SqlParameter("@sstrNRICFIN", strNric),
                                      new SqlParameter("@sstrBranchCode", strBranchCode),
                                      new SqlParameter("@sstrEmail", strEmail),
                                      new SqlParameter("@sstrGender", strGender),
                                      new SqlParameter("@dadtDOB", dob.Date == DateTime.Now.Date ? System.Data.SqlTypes.SqlDateTime.Null : dob),
                                      new SqlParameter("@inMediaSourceID", nMediaSourceID),
                                      new SqlParameter("@sstrMediaSource", strMediaSource),
                                      new SqlParameter("@sstrMobileNo", strMobileNo),
                                      new SqlParameter("@sstrRemarks", strRemarks),
                                      new SqlParameter("@inStatus", nStatus),
                                      SqlHelperUtils.paramErrorCode);
 }
Exemple #16
0
 public bool NewReceipientGroupEntries(int nMemoGroupID, int nEmployeeID)
 {
     try
     {
         SqlHelperUtils.ExecuteNonQuerySP("sp_tblMemoGroupEntries_Insert",
                                          new SqlParameter("@inMemoGroupID", nMemoGroupID),
                                          new SqlParameter("@inEmployeeID", nEmployeeID),
                                          SqlHelperUtils.paramErrorCode);
     }
     catch (SqlException ex)
     {
         if (ex.Message.IndexOf("PK_tblMemoGroupEntries") >= 0)
         {
             UI.ShowErrorMessage("Please don't insert duplicate employee.");
             return(false);
         }
         else
         {
             throw;
         }
     }
     return(true);
 }
Exemple #17
0
 public bool DeleteContact(int nContactId)
 {
     SqlHelperUtils.ExecuteNonQuerySP("sp_tblContacts_Delete", new SqlParameter("@inContactId", nContactId),
                                      SqlHelperUtils.paramErrorCode);
     return(true);
 }
Exemple #18
0
 public static void ChangePassword(int nEmployeeID, string strPassword)
 {
     SqlHelperUtils.ExecuteNonQuerySP("pr_tblEmployee_ChangePassword",
                                      new SqlParameter("@inEmployeeID", nEmployeeID), new SqlParameter("@sstrPassword", strPassword));
 }