Ejemplo n.º 1
0
        /// <summary>
        /// Select all details of JournalVoucherM for selected JournalID from tbl_JournalVoucher_M table
        /// Created By : Viral, 10/13/2014
        /// Modified By :
        /// </summary>
        /// <param name="intJournalID"></param>
        /// <returns></returns>
        public ApplicationResult JournalVoucherM_Select(string strVoucherCode, int intTrustMID, int intSchoolMID)
        {
            try
            {
                pSqlParameter = new SqlParameter[3];

                pSqlParameter[0]           = new SqlParameter("@VoucherCode", SqlDbType.NVarChar);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = strVoucherCode;

                pSqlParameter[1]           = new SqlParameter("@TrustMID", SqlDbType.Int);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = intTrustMID;

                pSqlParameter[2]           = new SqlParameter("@SchoolMID", SqlDbType.Int);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = intSchoolMID;

                strStoredProcName = "usp_tbl_JournalVoucher_M_Select";

                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, strStoredProcName, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// To Insert details of JournalVoucherT in tbl_JournalVoucher_T table
        /// Created By : Viral, 10/13/2014
        /// Modified By :
        /// </summary>
        /// <param name="objJournalVoucherTBO"></param>
        /// <returns></returns>
        public ApplicationResult JournalVoucherT_Insert(JournalVoucherTBO objJournalVoucherTBO)
        {
            try
            {
                pSqlParameter = new SqlParameter[8];


                pSqlParameter[0]           = new SqlParameter("@JournalID", SqlDbType.Int);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = objJournalVoucherTBO.JournalID;

                pSqlParameter[1]           = new SqlParameter("@OppositeJournalID", SqlDbType.Int);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = objJournalVoucherTBO.OppositeJournalID;

                pSqlParameter[2]           = new SqlParameter("@Amount", SqlDbType.Float);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = objJournalVoucherTBO.Amount;

                pSqlParameter[3]           = new SqlParameter("@CreatedDate", SqlDbType.NVarChar);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = objJournalVoucherTBO.CreatedDate;

                pSqlParameter[4]           = new SqlParameter("@CreatedUserID", SqlDbType.Int);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = objJournalVoucherTBO.CreatedUserID;

                pSqlParameter[5]           = new SqlParameter("@IsDeleted", SqlDbType.Int);
                pSqlParameter[5].Direction = ParameterDirection.Input;
                pSqlParameter[5].Value     = objJournalVoucherTBO.IsDeleted;

                pSqlParameter[6]           = new SqlParameter("@LastModifideUserID", SqlDbType.Int);
                pSqlParameter[6].Direction = ParameterDirection.Input;
                pSqlParameter[6].Value     = objJournalVoucherTBO.LastModifideUserID;

                pSqlParameter[7]           = new SqlParameter("@LastModifideDate", SqlDbType.NVarChar);
                pSqlParameter[7].Direction = ParameterDirection.Input;
                pSqlParameter[7].Value     = objJournalVoucherTBO.LastModifideDate;


                sSql = "usp_tbl_JournalVoucher_T_Insert";
                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objJournalVoucherTBO = null;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// To Insert details of Section in tbl_Section_M table
        /// Created By : NafisaMulla, 4/7/2014
        /// Modified By :
        /// </summary>
        /// <param name="objSectionBO"></param>
        /// <returns></returns>
        public ApplicationResult Section_Insert(SectionBO objSectionBO)
        {
            try
            {
                pSqlParameter = new SqlParameter[6];


                pSqlParameter[0]           = new SqlParameter("@SectionName", SqlDbType.VarChar);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = objSectionBO.SectionName;

                pSqlParameter[1]           = new SqlParameter("@SectionAvbbreviation", SqlDbType.VarChar);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = objSectionBO.SectionAvbbreviation;

                pSqlParameter[2]           = new SqlParameter("@Description", SqlDbType.VarChar);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = objSectionBO.Description;

                pSqlParameter[3]           = new SqlParameter("@LastModifiedUserID", SqlDbType.Int);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = objSectionBO.LastModifiedUserID;

                pSqlParameter[4]           = new SqlParameter("@LastModifiedDate", SqlDbType.VarChar);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = objSectionBO.LastModifiedDate;

                pSqlParameter[5]           = new SqlParameter("@IsDeleted", SqlDbType.Int);
                pSqlParameter[5].Direction = ParameterDirection.Input;
                pSqlParameter[5].Value     = objSectionBO.IsDeleted;

                sSql = "usp_tbl_Section_M_Insert";
                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objSectionBO = null;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// To Select All data from the tbl_ClassWiseFeesTemplate_T table
        /// Created By : NafisaMulla, 2/7/2014
        /// Modified By :
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public ApplicationResult ClassWiseFeesTemplateT_Select_FeesCategory_M(int intFeesCategoryMID, int intClassMID, int intDivisionTID, string strAcademicYear, int intSchoolMID, int intStrudentMID)
        {
            try
            {
                pSqlParameter = new SqlParameter[6];

                pSqlParameter[0]           = new SqlParameter("@FeesCategoryMID", SqlDbType.Int);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = intFeesCategoryMID;

                pSqlParameter[1]           = new SqlParameter("@ClassMID", SqlDbType.Int);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = intClassMID;

                pSqlParameter[2]           = new SqlParameter("@DivisionTID", SqlDbType.Int);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = intDivisionTID;

                pSqlParameter[3]           = new SqlParameter("@AcademicYear", SqlDbType.VarChar);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = strAcademicYear;

                pSqlParameter[4]           = new SqlParameter("@SchoolMID", SqlDbType.Int);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = intSchoolMID;

                pSqlParameter[5]           = new SqlParameter("@StudentMID", SqlDbType.Int);
                pSqlParameter[5].Direction = ParameterDirection.Input;
                pSqlParameter[5].Value     = intStrudentMID;



                sSql = "usp_tbl_ClassWiseTemplate_T_FeeCategory_M";
                DataTable dtClassWiseFeesTemplateT = new DataTable();
                dtClassWiseFeesTemplateT = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);

                ApplicationResult objResults = new ApplicationResult(dtClassWiseFeesTemplateT);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// To Delete details of ReceiptPayment for selected ReceiptPaymentID from tbl_ReceiptPaymentDetail_M table
        /// Created By : Viral, 10/22/2014
        /// Modified By :
        /// </summary>
        /// <param name="intReceiptPaymentID"></param>
        /// <returns></returns>
        public ApplicationResult ReceiptPayment_Delete_Transaction(string strReceiptCode, string strOprationType)
        {
            try
            {
                pSqlParameter = new SqlParameter[2];

                pSqlParameter[0]           = new SqlParameter("@ReceiptCode", SqlDbType.VarChar);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = strReceiptCode;

                pSqlParameter[1]           = new SqlParameter("@OperationType", SqlDbType.VarChar);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = strOprationType;

                strStoredProcName = "usp_tbl_ReceiptPaymentDetail_M_Delete";

                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, strStoredProcName, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);

                //int iResult = DatabaseTransaction.ExecuteNonQuery(CommandType.StoredProcedure, strStoredProcName, pSqlParameter);
                //if (iResult > 0)
                //{
                //    ApplicationResult objResults = new ApplicationResult();
                //    objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                //    return objResults;
                //}
                //else
                //{
                //    ApplicationResult objResults = new ApplicationResult();
                //    objResults.status = ApplicationResult.CommonStatusType.FAILURE;
                //    return objResults;
                //}
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        ///
        /// Created By : Nafisa, 10/3/2015
        /// Modified By :
        /// </summary>
        /// <param name="intJournalID"></param>
        /// <returns></returns>
        public ApplicationResult Select_DayBookReport(int intTrustMID, int intSchoolMID, string strFromDate, string strToDate, int intIsNarration)
        {
            try
            {
                pSqlParameter = new SqlParameter[5];

                pSqlParameter[0]           = new SqlParameter("@TrustMID", SqlDbType.Int);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = intTrustMID;

                pSqlParameter[1]           = new SqlParameter("@SchoolMID", SqlDbType.Int);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = intSchoolMID;

                pSqlParameter[2]           = new SqlParameter("@FromDate", SqlDbType.NVarChar);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = strFromDate;

                pSqlParameter[3]           = new SqlParameter("@ToDate", SqlDbType.NVarChar);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = strToDate;

                pSqlParameter[4]           = new SqlParameter("@IsNarration", SqlDbType.Int);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = intIsNarration;

                strStoredProcName = "usp_Rpt_DayBookNew";

                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, strStoredProcName, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// To Delete details of PaySlip for selected PayslipID from tbl_Payslip_M table
        /// Created By : NafisaMulla, 17-04-2015
        /// Modified By :
        /// </summary>
        /// <param name="intPayslipID"></param>
        /// <returns></returns>
        public ApplicationResult PaySlip_Delete(int intPayslipID)
        {
            try
            {
                pSqlParameter = new SqlParameter[1];

                pSqlParameter[0]           = new SqlParameter("@PayslipID", SqlDbType.Int);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = intPayslipID;

                strStoredProcName = "usp_tbl_Payslip_M_Delete";

                sSql = "usp_tbl_Employee_M_Insert";
                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// To Insert details of UserTemplateT in tbl_UserTemplate_M table
        /// Created By : NafisaMulla, 14-04-2015
        /// Modified By :
        /// </summary>
        /// <param name="objUserTemplateTBO"></param>
        /// <returns></returns>
        public ApplicationResult UserTemplateT_Insert(UserTemplateTBo objUserTemplateTBO)
        {
            try
            {
                pSqlParameter = new SqlParameter[13];


                pSqlParameter[0]           = new SqlParameter("@UserID", SqlDbType.Int);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = objUserTemplateTBO.UserID;

                pSqlParameter[1]           = new SqlParameter("@TrustMID", SqlDbType.Int);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = objUserTemplateTBO.TrustMID;

                pSqlParameter[2]           = new SqlParameter("@SchoolMID", SqlDbType.Int);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = objUserTemplateTBO.SchoolMID;

                pSqlParameter[3]           = new SqlParameter("@TrustTemplateID", SqlDbType.Int);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = objUserTemplateTBO.TrustTemplateID;

                pSqlParameter[4]           = new SqlParameter("@Annual", SqlDbType.Float);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = objUserTemplateTBO.Annual;

                pSqlParameter[5]           = new SqlParameter("@Monthly", SqlDbType.Float);
                pSqlParameter[5].Direction = ParameterDirection.Input;
                pSqlParameter[5].Value     = objUserTemplateTBO.Monthly;

                pSqlParameter[6]           = new SqlParameter("@Gross", SqlDbType.Float);
                pSqlParameter[6].Direction = ParameterDirection.Input;
                pSqlParameter[6].Value     = objUserTemplateTBO.Gross;

                pSqlParameter[7]           = new SqlParameter("@LastPaySlipGenerated", SqlDbType.Int);
                pSqlParameter[7].Direction = ParameterDirection.Input;
                pSqlParameter[7].Value     = objUserTemplateTBO.LastPaySlipGenerated;

                pSqlParameter[8]           = new SqlParameter("@IsDeleted", SqlDbType.Int);
                pSqlParameter[8].Direction = ParameterDirection.Input;
                pSqlParameter[8].Value     = objUserTemplateTBO.IsDeleted;

                pSqlParameter[9]           = new SqlParameter("@CreatedUserID", SqlDbType.Int);
                pSqlParameter[9].Direction = ParameterDirection.Input;
                pSqlParameter[9].Value     = objUserTemplateTBO.CreatedUserID;

                pSqlParameter[10]           = new SqlParameter("@CreatedDate", SqlDbType.VarChar);
                pSqlParameter[10].Direction = ParameterDirection.Input;
                pSqlParameter[10].Value     = objUserTemplateTBO.CreatedDate;

                pSqlParameter[11]           = new SqlParameter("@LastModifiedUserID", SqlDbType.Int);
                pSqlParameter[11].Direction = ParameterDirection.Input;
                pSqlParameter[11].Value     = objUserTemplateTBO.LastModifiedUserID;

                pSqlParameter[12]           = new SqlParameter("@LastModifiedDate", SqlDbType.VarChar);
                pSqlParameter[12].Direction = ParameterDirection.Input;
                pSqlParameter[12].Value     = objUserTemplateTBO.LastModifiedDate;


                sSql = "usp_tbl_UserTemplate_M_Insert";
                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objUserTemplateTBO = null;
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// To Insert details of ExamClassAssociation in tbl_ExaminationClassDivisionAssociation_T table
        /// Created By : NafisaMULLA, 8/6/2015
        /// Modified By :
        /// </summary>
        /// <param name="objExamClassAssociationBo"></param>
        /// <returns></returns>
        public ApplicationResult ExamClassAssociation_Insert(ExamClassAssociationBo objExamClassAssociationBo)
        {
            try
            {
                pSqlParameter = new SqlParameter[13];


                pSqlParameter[0]           = new SqlParameter("@ExaminationID", SqlDbType.NChar);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = objExamClassAssociationBo.ExaminationID;

                pSqlParameter[1]           = new SqlParameter("@TrustMID", SqlDbType.Int);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = objExamClassAssociationBo.TrustMID;

                pSqlParameter[2]           = new SqlParameter("@SchoolMID", SqlDbType.Int);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = objExamClassAssociationBo.SchoolMID;

                pSqlParameter[3]           = new SqlParameter("@ClassMID", SqlDbType.Int);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = objExamClassAssociationBo.ClassMID;

                pSqlParameter[4]           = new SqlParameter("@DivisionTID", SqlDbType.Int);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = objExamClassAssociationBo.DivisionTID;

                pSqlParameter[5]           = new SqlParameter("@AcademicYear", SqlDbType.VarChar);
                pSqlParameter[5].Direction = ParameterDirection.Input;
                pSqlParameter[5].Value     = objExamClassAssociationBo.AcademicYear;

                pSqlParameter[6]           = new SqlParameter("@FromDate", SqlDbType.VarChar);
                pSqlParameter[6].Direction = ParameterDirection.Input;
                pSqlParameter[6].Value     = objExamClassAssociationBo.FromDate;

                pSqlParameter[7]           = new SqlParameter("@ToDate", SqlDbType.VarChar);
                pSqlParameter[7].Direction = ParameterDirection.Input;
                pSqlParameter[7].Value     = objExamClassAssociationBo.ToDate;

                pSqlParameter[8]           = new SqlParameter("@CreatedUserID", SqlDbType.Int);
                pSqlParameter[8].Direction = ParameterDirection.Input;
                pSqlParameter[8].Value     = objExamClassAssociationBo.CreatedUserID;

                pSqlParameter[9]           = new SqlParameter("@CreatedDate", SqlDbType.VarChar);
                pSqlParameter[9].Direction = ParameterDirection.Input;
                pSqlParameter[9].Value     = objExamClassAssociationBo.CreatedDate;

                pSqlParameter[10]           = new SqlParameter("@LastModifideDate", SqlDbType.VarChar);
                pSqlParameter[10].Direction = ParameterDirection.Input;
                pSqlParameter[10].Value     = objExamClassAssociationBo.LastModifideDate;

                pSqlParameter[11]           = new SqlParameter("@LastModifideUserID", SqlDbType.Int);
                pSqlParameter[11].Direction = ParameterDirection.Input;
                pSqlParameter[11].Value     = objExamClassAssociationBo.LastModifideUserID;

                pSqlParameter[12]           = new SqlParameter("@IsDeleted", SqlDbType.Int);
                pSqlParameter[12].Direction = ParameterDirection.Input;
                pSqlParameter[12].Value     = objExamClassAssociationBo.IsDeleted;


                sSql = "usp_tbl_ExaminationClassDivisionAssociation_T_Insert";
                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objExamClassAssociationBo = null;
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// To Update details of JournalVoucherM in tbl_JournalVoucher_M table
        /// Created By : Viral, 10/13/2014
        /// Modified By :
        /// </summary>
        /// <param name="objJournalVoucherMBO"></param>
        /// <returns></returns>
        public ApplicationResult JournalVoucherM_Update(JournalVoucherMBO objJournalVoucherMBO, string strFromDate)
        {
            try
            {
                pSqlParameter = new SqlParameter[16];

                pSqlParameter[0]           = new SqlParameter("@JournalID", SqlDbType.Int);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = objJournalVoucherMBO.JournalID;

                pSqlParameter[1]           = new SqlParameter("@TrustMID", SqlDbType.Int);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = objJournalVoucherMBO.TrustMID;

                pSqlParameter[2]           = new SqlParameter("@SchoolMID", SqlDbType.Int);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = objJournalVoucherMBO.SchoolMID;

                pSqlParameter[3]           = new SqlParameter("@LedgerID", SqlDbType.Int);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = objJournalVoucherMBO.LedgerID;

                pSqlParameter[4]           = new SqlParameter("@VoucherNo", SqlDbType.Int);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = objJournalVoucherMBO.VoucherNo;

                pSqlParameter[5]           = new SqlParameter("@VoucherCode", SqlDbType.NVarChar);
                pSqlParameter[5].Direction = ParameterDirection.Input;
                pSqlParameter[5].Value     = objJournalVoucherMBO.VoucherCode;

                pSqlParameter[6]           = new SqlParameter("@VoucherDate", SqlDbType.NVarChar);
                pSqlParameter[6].Direction = ParameterDirection.Input;
                pSqlParameter[6].Value     = objJournalVoucherMBO.VoucherDate;

                pSqlParameter[7]           = new SqlParameter("@Amount", SqlDbType.Float);
                pSqlParameter[7].Direction = ParameterDirection.Input;
                pSqlParameter[7].Value     = objJournalVoucherMBO.Amount;

                pSqlParameter[8]           = new SqlParameter("@TransactionType", SqlDbType.NVarChar);
                pSqlParameter[8].Direction = ParameterDirection.Input;
                pSqlParameter[8].Value     = objJournalVoucherMBO.TransactionType;

                pSqlParameter[9]           = new SqlParameter("@OperationType", SqlDbType.NVarChar);
                pSqlParameter[9].Direction = ParameterDirection.Input;
                pSqlParameter[9].Value     = objJournalVoucherMBO.OperationType;

                pSqlParameter[10]           = new SqlParameter("@ChequeNumber", SqlDbType.Int);
                pSqlParameter[10].Direction = ParameterDirection.Input;
                pSqlParameter[10].Value     = objJournalVoucherMBO.ChequeNumber;

                pSqlParameter[11]           = new SqlParameter("@Description", SqlDbType.NVarChar);
                pSqlParameter[11].Direction = ParameterDirection.Input;
                pSqlParameter[11].Value     = objJournalVoucherMBO.Description;

                //pSqlParameter[12] = new SqlParameter("@CreatedDate", SqlDbType.NVarChar);
                //pSqlParameter[12].Direction = ParameterDirection.Input;
                //pSqlParameter[12].Value = objJournalVoucherMBO.CreatedDate;

                //pSqlParameter[13] = new SqlParameter("@CreatedBy", SqlDbType.Int);
                //pSqlParameter[13].Direction = ParameterDirection.Input;
                //pSqlParameter[13].Value = objJournalVoucherMBO.CreatedBy;

                //pSqlParameter[14] = new SqlParameter("@IsDeleted", SqlDbType.Int);
                //pSqlParameter[14].Direction = ParameterDirection.Input;
                //pSqlParameter[14].Value = objJournalVoucherMBO.IsDeleted;

                pSqlParameter[12]           = new SqlParameter("@LastModifideUserID", SqlDbType.Int);
                pSqlParameter[12].Direction = ParameterDirection.Input;
                pSqlParameter[12].Value     = objJournalVoucherMBO.LastModifideUserID;

                pSqlParameter[13]           = new SqlParameter("@LastModifideDate", SqlDbType.NVarChar);
                pSqlParameter[13].Direction = ParameterDirection.Input;
                pSqlParameter[13].Value     = objJournalVoucherMBO.LastModifideDate;

                pSqlParameter[14]           = new SqlParameter("@Year", SqlDbType.Int);
                pSqlParameter[14].Direction = ParameterDirection.Input;
                pSqlParameter[14].Value     = objJournalVoucherMBO.Year;

                pSqlParameter[15]           = new SqlParameter("@FromDate", SqlDbType.VarChar);
                pSqlParameter[15].Direction = ParameterDirection.Input;
                pSqlParameter[15].Value     = strFromDate;

                sSql = "usp_tbl_JournalVoucher_M_Update";

                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objJournalVoucherMBO = null;
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// To Insert details of PaySlip in tbl_Payslip_M table
        /// Created By : NafisaMulla, 17-04-2015
        /// Modified By :
        /// </summary>
        /// <param name="objPaySlipBO"></param>
        /// <returns></returns>
        public ApplicationResult PaySlip_Insert(PaySlipBo objPaySlipBO)
        {
            try
            {
                pSqlParameter = new SqlParameter[14];


                pSqlParameter[0]           = new SqlParameter("@TrustMID", SqlDbType.Int);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = objPaySlipBO.TrustMID;

                pSqlParameter[1]           = new SqlParameter("@UserID", SqlDbType.Int);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = objPaySlipBO.UserID;

                pSqlParameter[2]           = new SqlParameter("@Month", SqlDbType.Int);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = objPaySlipBO.Month;

                pSqlParameter[3]           = new SqlParameter("@Year", SqlDbType.Int);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = objPaySlipBO.Year;

                pSqlParameter[4]           = new SqlParameter("@TotalDaysofMonth", SqlDbType.Int);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = objPaySlipBO.TotalDaysofMonth;

                pSqlParameter[5]           = new SqlParameter("@EarnedDaysofMonth", SqlDbType.Float);
                pSqlParameter[5].Direction = ParameterDirection.Input;
                pSqlParameter[5].Value     = objPaySlipBO.EarnedDaysofMonth;

                pSqlParameter[6]           = new SqlParameter("@PaySlipSendforApproval", SqlDbType.Int);
                pSqlParameter[6].Direction = ParameterDirection.Input;
                pSqlParameter[6].Value     = objPaySlipBO.PaySlipSendforApproval;

                pSqlParameter[7]           = new SqlParameter("@PayslipApproved", SqlDbType.Int);
                pSqlParameter[7].Direction = ParameterDirection.Input;
                pSqlParameter[7].Value     = objPaySlipBO.PayslipApproved;

                pSqlParameter[8]           = new SqlParameter("@Excemption", SqlDbType.Int);
                pSqlParameter[8].Direction = ParameterDirection.Input;
                pSqlParameter[8].Value     = objPaySlipBO.Excemption;

                pSqlParameter[9]           = new SqlParameter("@IsDeleted", SqlDbType.Int);
                pSqlParameter[9].Direction = ParameterDirection.Input;
                pSqlParameter[9].Value     = objPaySlipBO.IsDeleted;

                pSqlParameter[10]           = new SqlParameter("@CreatedUserID", SqlDbType.Int);
                pSqlParameter[10].Direction = ParameterDirection.Input;
                pSqlParameter[10].Value     = objPaySlipBO.CreatedUserID;

                pSqlParameter[11]           = new SqlParameter("@CreatedDate", SqlDbType.VarChar);
                pSqlParameter[11].Direction = ParameterDirection.Input;
                pSqlParameter[11].Value     = objPaySlipBO.CreatedDate;

                pSqlParameter[12]           = new SqlParameter("@LastModifiedUserID", SqlDbType.Int);
                pSqlParameter[12].Direction = ParameterDirection.Input;
                pSqlParameter[12].Value     = objPaySlipBO.LastModifiedUserID;

                pSqlParameter[13]           = new SqlParameter("@LastModifiedDate", SqlDbType.VarChar);
                pSqlParameter[13].Direction = ParameterDirection.Input;
                pSqlParameter[13].Value     = objPaySlipBO.LastModifiedDate;


                sSql = "usp_tbl_Payslip_M_Insert";
                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objPaySlipBO = null;
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// To Insert details of LeaveApply in tbl_LeaveApply table
        /// Created By : Nirmal, 11-02-2016
        /// Modified By :
        /// </summary>
        public ApplicationResult LeaveApply_Insert(LeaveApplyBo objLeaveApplyBo)
        {
            try
            {
                pSqlParameter = new SqlParameter[9];


                pSqlParameter[0]           = new SqlParameter("@EmployeeMID", SqlDbType.Int);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = objLeaveApplyBo.EmployeeMID;

                pSqlParameter[1]           = new SqlParameter("@FromDate", SqlDbType.VarChar);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = objLeaveApplyBo.FromDate;

                pSqlParameter[2]           = new SqlParameter("@ToDate", SqlDbType.VarChar);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = objLeaveApplyBo.ToDate;

                pSqlParameter[3]           = new SqlParameter("@Reason", SqlDbType.VarChar);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = objLeaveApplyBo.Reason;

                pSqlParameter[4]           = new SqlParameter("@TotalDays", SqlDbType.Float);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = objLeaveApplyBo.TotalDays;

                pSqlParameter[5]           = new SqlParameter("@CreatedBy", SqlDbType.Int);
                pSqlParameter[5].Direction = ParameterDirection.Input;
                pSqlParameter[5].Value     = objLeaveApplyBo.CreatedBy;

                pSqlParameter[6]           = new SqlParameter("@CreatedDate", SqlDbType.VarChar);
                pSqlParameter[6].Direction = ParameterDirection.Input;
                pSqlParameter[6].Value     = objLeaveApplyBo.CreatedDate;

                pSqlParameter[7]           = new SqlParameter("@LastModifiedBy", SqlDbType.Int);
                pSqlParameter[7].Direction = ParameterDirection.Input;
                pSqlParameter[7].Value     = objLeaveApplyBo.LastModifiedBy;

                pSqlParameter[8]           = new SqlParameter("@LastModifiedDate", SqlDbType.VarChar);
                pSqlParameter[8].Direction = ParameterDirection.Input;
                pSqlParameter[8].Value     = objLeaveApplyBo.LastModifiedDate;



                sSql = "usp_tbl_LeaveApply_Insert";

                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
                //int iResult = Database.ExecuteNonQuery(CommandType.StoredProcedure, sSql, pSqlParameter);

                //if (iResult > 0)
                //{
                //    ApplicationResult objResults = new ApplicationResult();
                //    objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                //    return objResults;
                //}
                //else
                //{
                //    ApplicationResult objResults = new ApplicationResult();
                //    objResults.status = ApplicationResult.CommonStatusType.FAILURE;
                //    return objResults;
                //}
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objLeaveApplyBo = null;
            }
        }
Ejemplo n.º 13
0
        /// <summary>
        /// To Insert details of Purchase in tbl_Purchase_T table
        /// Created By : Chintan, 10/31/2014
        /// Modified By :
        /// </summary>
        /// <param name="objPurchaseTBO"></param>
        /// <returns></returns>
        public ApplicationResult Purchase_T_Insert(PurchaseTBO objPurchaseTBO, int intTrustMID, int intSchoolMID)
        {
            try
            {
                pSqlParameter = new SqlParameter[14];


                pSqlParameter[0]           = new SqlParameter("@PurchaseID", SqlDbType.Int);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = objPurchaseTBO.PurchaseID;

                pSqlParameter[1]           = new SqlParameter("@UOMID", SqlDbType.Int);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = objPurchaseTBO.UOMID;

                pSqlParameter[2]           = new SqlParameter("@MaterialID", SqlDbType.Int);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = objPurchaseTBO.MaterialID;

                pSqlParameter[3]           = new SqlParameter("@Quantity", SqlDbType.Int);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = objPurchaseTBO.Quantity;

                pSqlParameter[4]           = new SqlParameter("@Rate", SqlDbType.Float);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = objPurchaseTBO.Rate;

                pSqlParameter[5]           = new SqlParameter("@TotalAmount", SqlDbType.Float);
                pSqlParameter[5].Direction = ParameterDirection.Input;
                pSqlParameter[5].Value     = objPurchaseTBO.TotalAmount;

                pSqlParameter[6]           = new SqlParameter("@DeliveryNote", SqlDbType.VarChar);
                pSqlParameter[6].Direction = ParameterDirection.Input;
                pSqlParameter[6].Value     = objPurchaseTBO.DeliveryNote;

                pSqlParameter[7]           = new SqlParameter("@IsDeleted", SqlDbType.Int);
                pSqlParameter[7].Direction = ParameterDirection.Input;
                pSqlParameter[7].Value     = objPurchaseTBO.IsDeleted;

                pSqlParameter[8]           = new SqlParameter("@CreatedDate", SqlDbType.VarChar);
                pSqlParameter[8].Direction = ParameterDirection.Input;
                pSqlParameter[8].Value     = objPurchaseTBO.CreatedDate;

                pSqlParameter[9]           = new SqlParameter("@CreatedUserID", SqlDbType.Int);
                pSqlParameter[9].Direction = ParameterDirection.Input;
                pSqlParameter[9].Value     = objPurchaseTBO.CreatedUserID;

                pSqlParameter[10]           = new SqlParameter("@LastModifiedDate", SqlDbType.VarChar);
                pSqlParameter[10].Direction = ParameterDirection.Input;
                pSqlParameter[10].Value     = objPurchaseTBO.LastModifiedDate;

                pSqlParameter[11]           = new SqlParameter("@LastModifiedUserID", SqlDbType.Int);
                pSqlParameter[11].Direction = ParameterDirection.Input;
                pSqlParameter[11].Value     = objPurchaseTBO.LastModifiedUserID;

                pSqlParameter[12]           = new SqlParameter("@TrustMID", SqlDbType.Int);
                pSqlParameter[12].Direction = ParameterDirection.Input;
                pSqlParameter[12].Value     = intTrustMID;

                pSqlParameter[13]           = new SqlParameter("@SchoolMID", SqlDbType.Int);
                pSqlParameter[13].Direction = ParameterDirection.Input;
                pSqlParameter[13].Value     = intSchoolMID;

                sSql = "usp_tbl_Purchase_T_Insert";

                //int iResult = DatabaseTransaction.ExecuteNonQuery(CommandType.StoredProcedure, sSql, pSqlParameter);

                //if (iResult > 0)
                //{
                //    ApplicationResult objResults = new ApplicationResult();
                //    objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                //    return objResults;
                //}
                //else
                //{
                //    ApplicationResult objResults = new ApplicationResult();
                //    objResults.status = ApplicationResult.CommonStatusType.FAILURE;
                //    return objResults;
                //}

                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                if (dtResult.Rows.Count > 0)
                {
                    int intStatus = Convert.ToInt32(dtResult.Rows[0]["Status"].ToString());
                    if (intStatus == 1)
                    {
                        objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                    }
                    else
                    {
                        objResults.status = ApplicationResult.CommonStatusType.FAILURE;
                    }
                }
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objPurchaseTBO = null;
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// To Insert details of Purchase in tbl_Purchase_M table
        /// Created By : Chintan, 10/31/2014
        /// Modified By :
        /// </summary>
        /// <param name="objPurchaseBO"></param>
        /// <returns></returns>
        public ApplicationResult Purchase_Insert(PurchaseBO objPurchaseBO)
        {
            try
            {
                pSqlParameter = new SqlParameter[21];


                pSqlParameter[0]           = new SqlParameter("@TrustMID", SqlDbType.Int);
                pSqlParameter[0].Direction = ParameterDirection.Input;
                pSqlParameter[0].Value     = objPurchaseBO.TrustMID;

                pSqlParameter[1]           = new SqlParameter("@SchoolMID", SqlDbType.Int);
                pSqlParameter[1].Direction = ParameterDirection.Input;
                pSqlParameter[1].Value     = objPurchaseBO.SchoolMID;

                pSqlParameter[2]           = new SqlParameter("@VendorID", SqlDbType.Int);
                pSqlParameter[2].Direction = ParameterDirection.Input;
                pSqlParameter[2].Value     = objPurchaseBO.VendorID;

                pSqlParameter[3]           = new SqlParameter("@PONO", SqlDbType.VarChar);
                pSqlParameter[3].Direction = ParameterDirection.Input;
                pSqlParameter[3].Value     = objPurchaseBO.PONO;

                pSqlParameter[4]           = new SqlParameter("@PODate", SqlDbType.VarChar);
                pSqlParameter[4].Direction = ParameterDirection.Input;
                pSqlParameter[4].Value     = objPurchaseBO.PODate;

                pSqlParameter[5]           = new SqlParameter("@BillNO", SqlDbType.VarChar);
                pSqlParameter[5].Direction = ParameterDirection.Input;
                pSqlParameter[5].Value     = objPurchaseBO.BillNO;

                pSqlParameter[6]           = new SqlParameter("@BillDate", SqlDbType.VarChar);
                pSqlParameter[6].Direction = ParameterDirection.Input;
                pSqlParameter[6].Value     = objPurchaseBO.BillDate;

                pSqlParameter[7]           = new SqlParameter("@VoucharNO", SqlDbType.VarChar);
                pSqlParameter[7].Direction = ParameterDirection.Input;
                pSqlParameter[7].Value     = objPurchaseBO.VoucharNO;

                pSqlParameter[8]           = new SqlParameter("@VoucharDate", SqlDbType.VarChar);
                pSqlParameter[8].Direction = ParameterDirection.Input;
                pSqlParameter[8].Value     = objPurchaseBO.VoucharDate;

                pSqlParameter[9]           = new SqlParameter("@PaymentType", SqlDbType.Char);
                pSqlParameter[9].Direction = ParameterDirection.Input;
                pSqlParameter[9].Value     = objPurchaseBO.PaymentType;

                pSqlParameter[10]           = new SqlParameter("@PaymentMode", SqlDbType.VarChar);
                pSqlParameter[10].Direction = ParameterDirection.Input;
                pSqlParameter[10].Value     = objPurchaseBO.PaymentMode;

                pSqlParameter[11]           = new SqlParameter("@VAT", SqlDbType.Float);
                pSqlParameter[11].Direction = ParameterDirection.Input;
                pSqlParameter[11].Value     = objPurchaseBO.VAT;

                pSqlParameter[12]           = new SqlParameter("@AddVAT", SqlDbType.Float);
                pSqlParameter[12].Direction = ParameterDirection.Input;
                pSqlParameter[12].Value     = objPurchaseBO.AddVAT;

                pSqlParameter[13]           = new SqlParameter("@CST", SqlDbType.Float);
                pSqlParameter[13].Direction = ParameterDirection.Input;
                pSqlParameter[13].Value     = objPurchaseBO.CST;

                pSqlParameter[14]           = new SqlParameter("@TotalAmount", SqlDbType.Float);
                pSqlParameter[14].Direction = ParameterDirection.Input;
                pSqlParameter[14].Value     = objPurchaseBO.TotalAmount;

                pSqlParameter[15]           = new SqlParameter("@Discount", SqlDbType.Float);
                pSqlParameter[15].Direction = ParameterDirection.Input;
                pSqlParameter[15].Value     = objPurchaseBO.Discount;

                pSqlParameter[16]           = new SqlParameter("@IsDeleted", SqlDbType.Int);
                pSqlParameter[16].Direction = ParameterDirection.Input;
                pSqlParameter[16].Value     = objPurchaseBO.IsDeleted;

                pSqlParameter[17]           = new SqlParameter("@CreatedDate", SqlDbType.VarChar);
                pSqlParameter[17].Direction = ParameterDirection.Input;
                pSqlParameter[17].Value     = objPurchaseBO.CreatedDate;

                pSqlParameter[18]           = new SqlParameter("@CreatedUserID", SqlDbType.Int);
                pSqlParameter[18].Direction = ParameterDirection.Input;
                pSqlParameter[18].Value     = objPurchaseBO.CreatedUserID;

                pSqlParameter[19]           = new SqlParameter("@LastModifiedDate", SqlDbType.VarChar);
                pSqlParameter[19].Direction = ParameterDirection.Input;
                pSqlParameter[19].Value     = objPurchaseBO.LastModifiedDate;

                pSqlParameter[20]           = new SqlParameter("@LastModifiedUserID", SqlDbType.Int);
                pSqlParameter[20].Direction = ParameterDirection.Input;
                pSqlParameter[20].Value     = objPurchaseBO.LastModifiedUserID;

                sSql = "usp_tbl_Purchase_M_Insert";

                DataTable dtResult = new DataTable();
                dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter);
                ApplicationResult objResults = new ApplicationResult(dtResult);
                objResults.status = ApplicationResult.CommonStatusType.SUCCESS;
                return(objResults);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objPurchaseBO = null;
            }
        }