Ejemplo n.º 1
0
        public DataSet GetMonthfromNTodate(ref PropertyRentCard Entity_PC, out string StrError)
        {
            StrError = string.Empty;

            DataSet DS = new DataSet();

            try
            {
                SqlParameter pAction   = new SqlParameter(PropertyRentCard._Action, SqlDbType.BigInt);
                SqlParameter pFromDate = new SqlParameter(PropertyRentCard._FromDate, SqlDbType.DateTime);
                SqlParameter pToDate   = new SqlParameter(PropertyRentCard._ToDate, SqlDbType.DateTime);

                pAction.Value   = 16;
                pFromDate.Value = Entity_PC.FromDate;
                pToDate.Value   = Entity_PC.ToDate;

                SqlParameter[] ParamArray = new SqlParameter[] { pAction, pFromDate, pToDate };

                Open(CONNECTION_STRING);

                DS = SQLHelper.GetDataSet(_Connection, _Transaction, CommandType.StoredProcedure, "SP_PropertyRentalCard", ParamArray);
            }
            catch (Exception ex)
            {
                StrError = ex.Message;
            }
            finally
            {
                Close();
            }
            return(DS);
        }
Ejemplo n.º 2
0
        public int InsertProjectMonth(ref PropertyRentCard Entity_PC, out string StrError)
        {
            int iInsert = 0;

            StrError = string.Empty;
            try
            {
                SqlParameter pAction = new SqlParameter(PropertyRentCard._Action, SqlDbType.BigInt);

                SqlParameter pPropertyId         = new SqlParameter(PropertyRentCard._PropertyId, SqlDbType.BigInt);
                SqlParameter pPartyId            = new SqlParameter(PropertyRentCard._PartyId, SqlDbType.BigInt);
                SqlParameter pFortheMonthYear    = new SqlParameter(PropertyRentCard._FortheMonthYear, SqlDbType.NVarChar);
                SqlParameter pReceiptVoucherId   = new SqlParameter(PropertyRentCard._ReceiptVoucherId, SqlDbType.BigInt);
                SqlParameter pIsGenerated        = new SqlParameter(PropertyRentCard._IsGenerated, SqlDbType.Bit);
                SqlParameter pRentalAmount       = new SqlParameter(PropertyRentCard._RentalAmount, SqlDbType.Decimal);
                SqlParameter pPropertyRentCardId = new SqlParameter(PropertyRentCard._PropertyRentCardId, SqlDbType.BigInt);
                SqlParameter pProRentDtlsId      = new SqlParameter(PropertyRentCard._ProRentDtlsId, SqlDbType.BigInt);
                SqlParameter pRemaingAmount      = new SqlParameter(PropertyRentCard._RemaingAmount, SqlDbType.Decimal);

                pAction.Value             = 17;
                pPropertyId.Value         = Entity_PC.PropertyId;
                pPartyId.Value            = Entity_PC.PartyId;
                pFortheMonthYear.Value    = Entity_PC.FortheMonthYear;
                pReceiptVoucherId.Value   = Entity_PC.ReceiptVoucherId;
                pIsGenerated.Value        = Entity_PC.IsGenerated;
                pRentalAmount.Value       = Entity_PC.RentalAmount;
                pPropertyRentCardId.Value = Entity_PC.PropertyRentCardId;
                pProRentDtlsId.Value      = Entity_PC.ProRentDtlsId;
                pRemaingAmount.Value      = Entity_PC.RemaingAmount;

                SqlParameter[] param = new SqlParameter[] { pAction, pPropertyId, pPartyId, pFortheMonthYear, pReceiptVoucherId, pIsGenerated, pRentalAmount, pPropertyRentCardId, pProRentDtlsId, pRemaingAmount };

                Open(CONNECTION_STRING);
                BeginTransaction();

                iInsert = SQLHelper.ExecuteScalar(_Connection, _Transaction, CommandType.StoredProcedure, PropertyRentCard.SP_PropertyRentalCard, param);

                if (iInsert > 0)
                {
                    CommitTransaction();
                }
                else
                {
                    RollBackTransaction();
                }
            }
            catch (Exception ex)
            {
                RollBackTransaction();
                StrError = ex.Message;
            }
            finally
            {
                Close();
            }
            return(iInsert);
        }
Ejemplo n.º 3
0
        public int DeleteProjectRent(ref PropertyRentCard Entity_PC, out string strerror)
        {
            strerror = string.Empty;
            int insertrow = 0;

            try
            {
                SqlParameter pAction = new SqlParameter(PropertyRentCard._Action, SqlDbType.BigInt);
                pAction.Value = 8;

                SqlParameter pPropertyId = new SqlParameter(PropertyRentCard._PropertyRentCardId, SqlDbType.BigInt);
                pPropertyId.Value = Entity_PC.PropertyRentCardId;

                SqlParameter pCreatedby = new SqlParameter(PropertyRentCard._UserId, SqlDbType.BigInt);
                pCreatedby.Value = Entity_PC.UserId;

                SqlParameter pCreatedDate = new SqlParameter(PropertyRentCard._LoginDate, SqlDbType.DateTime);
                pCreatedDate.Value = Entity_PC.LoginDate;

                SqlParameter[] ParamArray = new SqlParameter[] { pAction, pPropertyId, pCreatedby, pCreatedDate };

                Open(CONNECTION_STRING);
                BeginTransaction();

                insertrow = SQLHelper.ExecuteNonQuery(_Connection, _Transaction, CommandType.StoredProcedure, PropertyRentCard.SP_PropertyRentalCard, ParamArray);

                if (insertrow > 0)
                {
                    CommitTransaction();
                }
                else
                {
                    RollBackTransaction();
                }
            }
            catch (Exception ex)
            {
                strerror = ex.Message;
                RollBackTransaction();
            }
            finally
            {
                Close();
            }
            return(insertrow);
        }
Ejemplo n.º 4
0
        public int DeletePropertyMonth(ref PropertyRentCard Entity_PC, out string StrError)
        {
            StrError = string.Empty;
            int insertrow = 0;

            try
            {
                SqlParameter pAction = new SqlParameter(PropertyRentCard._Action, SqlDbType.BigInt);
                pAction.Value = 19;

                SqlParameter pProRentDtlsId = new SqlParameter(PropertyRentCard._ProRentDtlsId, SqlDbType.BigInt);
                pProRentDtlsId.Value = Entity_PC.ProRentDtlsId;


                SqlParameter[] ParamArray = new SqlParameter[] { pAction, pProRentDtlsId };

                Open(CONNECTION_STRING);
                BeginTransaction();

                insertrow = SQLHelper.ExecuteNonQuery(_Connection, _Transaction, CommandType.StoredProcedure, PropertyRentCard.SP_PropertyRentalCard, ParamArray);

                if (insertrow > 0)
                {
                    CommitTransaction();
                }
                else
                {
                    RollBackTransaction();
                }
            }
            catch (Exception ex)
            {
                StrError = ex.Message;
                RollBackTransaction();
            }
            finally
            {
                Close();
            }
            return(insertrow);
        }
Ejemplo n.º 5
0
        public int InsertPCDetail(ref PropertyRentCard Entity_PC, out string StrError)
        {
            int iInsert = 0;

            StrError = string.Empty;
            try
            {
                SqlParameter pAction             = new SqlParameter(PropertyRentCard._Action, SqlDbType.BigInt);
                SqlParameter pPropertyRentCardId = new SqlParameter(PropertyRentCard._PropertyRentCardId, SqlDbType.BigInt);
                SqlParameter pFromDate           = new SqlParameter(PropertyRentCard._FromDate, SqlDbType.DateTime);
                SqlParameter pToDate             = new SqlParameter(PropertyRentCard._ToDate, SqlDbType.DateTime);
                SqlParameter pCompanyId          = new SqlParameter(PropertyRentCard._CompanyId, SqlDbType.BigInt);
                SqlParameter pRentalAmt          = new SqlParameter(PropertyRentCard._RentalAmt, SqlDbType.Decimal);

                SqlParameter pPropertyTaxAmt       = new SqlParameter(PropertyRentCard._PropertyTaxAmt, SqlDbType.Decimal);
                SqlParameter pSocietyMaintenaceAmt = new SqlParameter(PropertyRentCard._SocietyMaintenaceAmt, SqlDbType.Decimal);
                SqlParameter pDepositAmt           = new SqlParameter(PropertyRentCard._DepositAmt, SqlDbType.Decimal);
                SqlParameter pCollectedDate        = new SqlParameter(PropertyRentCard._CollectedDate, SqlDbType.DateTime);
                SqlParameter pRemark          = new SqlParameter(PropertyRentCard._Remark, SqlDbType.NVarChar);
                SqlParameter pFlagCheck       = new SqlParameter(PropertyRentCard._FlagCheck, SqlDbType.Bit);
                SqlParameter pStatus          = new SqlParameter(PropertyRentCard._Status, SqlDbType.NVarChar);
                SqlParameter pFlagReceiptType = new SqlParameter(PropertyRentCard._FlagReceiptType, SqlDbType.Bit);
                SqlParameter pGSTPerDetails   = new SqlParameter(PropertyRentCard._GSTPerDetails, SqlDbType.Decimal);
                SqlParameter pGSTAmt          = new SqlParameter(PropertyRentCard._GSTAmt, SqlDbType.Decimal);
                SqlParameter pAmount          = new SqlParameter(PropertyRentCard._Amount, SqlDbType.Decimal);
                SqlParameter pTaxTemplateID   = new SqlParameter(PropertyRentCard._TaxTemplateID, SqlDbType.BigInt);

                pAction.Value               = 4;
                pPropertyRentCardId.Value   = Entity_PC.PropertyRentCardId;
                pFromDate.Value             = Entity_PC.FromDate;
                pToDate.Value               = Entity_PC.ToDate;
                pCompanyId.Value            = Entity_PC.CompanyId;
                pRentalAmt.Value            = Entity_PC.RentalAmt;
                pPropertyTaxAmt.Value       = Entity_PC.PropertyTaxAmt;
                pSocietyMaintenaceAmt.Value = Entity_PC.SocietyMaintenaceAmt;
                pDepositAmt.Value           = Entity_PC.DepositAmt;
                pCollectedDate.Value        = Entity_PC.CollectedDate;
                pRemark.Value               = Entity_PC.Remark;
                pFlagCheck.Value            = Entity_PC.FlagCheck;
                pStatus.Value               = Entity_PC.Status;
                pGSTPerDetails.Value        = Entity_PC.GSTPerDetails;
                pGSTAmt.Value               = Entity_PC.GSTAmt;
                pAmount.Value               = Entity_PC.Amount;
                pFlagReceiptType.Value      = Entity_PC.FlagReceiptType;
                pTaxTemplateID.Value        = Entity_PC.TaxTemplateID;

                SqlParameter[] param = new SqlParameter[] { pAction, pPropertyRentCardId, pFromDate, pToDate, pCompanyId, pRentalAmt, pPropertyTaxAmt, pSocietyMaintenaceAmt, pDepositAmt, pCollectedDate,
                                                            pRemark, pFlagCheck, pStatus, pGSTPerDetails, pGSTAmt, pAmount, pFlagReceiptType, pTaxTemplateID };

                Open(CONNECTION_STRING);
                BeginTransaction();

                iInsert = SQLHelper.ExecuteScalar(_Connection, _Transaction, CommandType.StoredProcedure, PropertyRentCard.SP_PropertyRentalCard, param);

                if (iInsert > 0)
                {
                    CommitTransaction();
                }
                else
                {
                    RollBackTransaction();
                }
            }
            catch (Exception ex)
            {
                RollBackTransaction();
                StrError = ex.Message;
            }
            finally
            {
                Close();
            }
            return(iInsert);
        }
Ejemplo n.º 6
0
        public int InsertPC(ref PropertyRentCard Entity_PC, out string StrError)
        {
            int iInsert = 0;

            StrError = string.Empty;
            try
            {
                SqlParameter pAction = new SqlParameter(PropertyRentCard._Action, SqlDbType.BigInt);
                SqlParameter pPCNo   = new SqlParameter(PropertyRentCard._PCNo, SqlDbType.NVarChar);
                //SqlParameter pPropertyName = new SqlParameter(PropertyRentCard._PropertyName, SqlDbType.NVarChar);
                SqlParameter pPropertyId      = new SqlParameter(PropertyRentCard._PropertyId, SqlDbType.BigInt);
                SqlParameter pPartyId         = new SqlParameter(PropertyRentCard._PartyId, SqlDbType.BigInt);
                SqlParameter pFlatTypeId      = new SqlParameter(PropertyRentCard._FlatTypeId, SqlDbType.BigInt);
                SqlParameter pPropertyAddress = new SqlParameter(PropertyRentCard._PropertyAddress, SqlDbType.NVarChar);
                SqlParameter pUnitNo          = new SqlParameter(PropertyRentCard._UnitNo, SqlDbType.NVarChar);
                SqlParameter pUnitArea        = new SqlParameter(PropertyRentCard._UnitArea, SqlDbType.Decimal);
                SqlParameter pSqFt            = new SqlParameter(PropertyRentCard._SqFt, SqlDbType.Decimal);
                SqlParameter pRent            = new SqlParameter(PropertyRentCard._Rent, SqlDbType.Decimal);
                SqlParameter pCreatedBy       = new SqlParameter(PropertyRentCard._UserId, SqlDbType.BigInt);
                SqlParameter pCreatedDate     = new SqlParameter(PropertyRentCard._LoginDate, SqlDbType.DateTime);

                pAction.Value          = 3;
                pPCNo.Value            = Entity_PC.PCNo;
                pPropertyId.Value      = Entity_PC.PropertyId;
                pPartyId.Value         = Entity_PC.PartyId;
                pFlatTypeId.Value      = Entity_PC.FlatTypeId;
                pPropertyAddress.Value = Entity_PC.PropertyAddress;
                pUnitNo.Value          = Entity_PC.UnitNo;
                pUnitArea.Value        = Entity_PC.UnitArea;
                pSqFt.Value            = Entity_PC.SqFt;
                pRent.Value            = Entity_PC.Rent;
                pCreatedBy.Value       = Entity_PC.UserId;
                pCreatedDate.Value     = Entity_PC.LoginDate;

                SqlParameter[] param = new SqlParameter[] { pAction, pPCNo, pPropertyId, pPartyId, pFlatTypeId, pPropertyAddress, pUnitNo, pUnitArea, pSqFt, pRent,
                                                            pCreatedBy, pCreatedDate };

                Open(CONNECTION_STRING);
                BeginTransaction();
                iInsert = SQLHelper.ExecuteScalar(_Connection, _Transaction, CommandType.StoredProcedure, PropertyRentCard.SP_PropertyRentalCard, param);

                if (iInsert > 0)
                {
                    CommitTransaction();
                }
                else
                {
                    RollBackTransaction();
                }
            }
            catch (Exception ex)
            {
                RollBackTransaction();
                StrError = ex.Message;
            }
            finally
            {
                Close();
            }
            return(iInsert);
        }
Ejemplo n.º 7
0
        public int UpdatetPropertyRentCard(ref PropertyRentCard Entity_PC, out string strerror)
        {
            strerror = string.Empty;
            int insertrow = 0;

            try
            {
                SqlParameter pAction             = new SqlParameter(PropertyRentCard._Action, SqlDbType.BigInt);
                SqlParameter pPropertyId         = new SqlParameter(PropertyRentCard._PropertyId, SqlDbType.BigInt);
                SqlParameter pPropertyRentCardId = new SqlParameter(PropertyRentCard._PropertyRentCardId, SqlDbType.BigInt);
                SqlParameter pPartyId            = new SqlParameter(PropertyRentCard._PartyId, SqlDbType.BigInt);
                SqlParameter pPCNo            = new SqlParameter(PropertyRentCard._PCNo, SqlDbType.NVarChar);
                SqlParameter pPropertyName    = new SqlParameter(PropertyRentCard._PropertyName, SqlDbType.NVarChar);
                SqlParameter pFlatTypeId      = new SqlParameter(PropertyRentCard._FlatTypeId, SqlDbType.BigInt);
                SqlParameter pPropertyAddress = new SqlParameter(PropertyRentCard._PropertyAddress, SqlDbType.NVarChar);
                SqlParameter pUnitNo          = new SqlParameter(PropertyRentCard._UnitNo, SqlDbType.NVarChar);
                SqlParameter pUnitArea        = new SqlParameter(PropertyRentCard._UnitArea, SqlDbType.Decimal);
                SqlParameter pSqFt            = new SqlParameter(PropertyRentCard._SqFt, SqlDbType.Decimal);
                SqlParameter pRent            = new SqlParameter(PropertyRentCard._Rent, SqlDbType.Decimal);
                SqlParameter pCreatedby       = new SqlParameter(PropertyRentCard._UserId, SqlDbType.BigInt);
                SqlParameter pCreatedDate     = new SqlParameter(PropertyRentCard._LoginDate, SqlDbType.DateTime);

                pAction.Value             = 7;
                pPCNo.Value               = Entity_PC.PCNo;
                pPropertyId.Value         = Entity_PC.PropertyId;
                pPartyId.Value            = Entity_PC.PartyId;
                pPropertyRentCardId.Value = Entity_PC.PropertyRentCardId;
                pPropertyName.Value       = Entity_PC.PropertyName;
                pFlatTypeId.Value         = Entity_PC.FlatTypeId;
                pPropertyAddress.Value    = Entity_PC.PropertyAddress;
                pUnitNo.Value             = Entity_PC.UnitNo;
                pUnitArea.Value           = Entity_PC.UnitArea;
                pSqFt.Value               = Entity_PC.SqFt;
                pRent.Value               = Entity_PC.Rent;
                pCreatedby.Value          = Entity_PC.UserId;
                pCreatedDate.Value        = Entity_PC.LoginDate;

                SqlParameter[] ParamArray = new SqlParameter[] { pAction, pPCNo, pPropertyId, pPartyId, pPropertyRentCardId, pPropertyName, pFlatTypeId, pPropertyAddress, pUnitNo, pUnitArea, pSqFt, pRent, pCreatedby, pCreatedDate };

                Open(CONNECTION_STRING);
                BeginTransaction();
                insertrow = SQLHelper.ExecuteNonQuery(_Connection, _Transaction, CommandType.StoredProcedure, PropertyRentCard.SP_PropertyRentalCard, ParamArray);

                if (insertrow > 0)
                {
                    CommitTransaction();
                }
                else
                {
                    RollBackTransaction();
                }
            }
            catch (Exception ex)
            {
                strerror = ex.Message;
                RollBackTransaction();
            }
            finally
            {
                Close();
            }
            return(insertrow);
        }