Esempio n. 1
0
    private void LoadDataByID(string sSPTypeID)
    {
        SPTypeWiseAccountMapping    oSPTypeWiseAccountMapping = new SPTypeWiseAccountMapping(sSPTypeID);
        SPTypeWiseAccountMappingDAL oSPWiseAccountMappingDAL  = new SPTypeWiseAccountMappingDAL();
        Result oResult = new Result();

        oResult = oSPWiseAccountMappingDAL.LoadByID(oSPTypeWiseAccountMapping);
        if (oResult.Status)
        {
            oSPTypeWiseAccountMapping = (SPTypeWiseAccountMapping)oResult.Return;

            DDListUtil.Assign(ddlSPTypeID, oSPTypeWiseAccountMapping.SPType.SPTypeID.Trim());
            ddlSPTypeID.Enabled   = false;
            txtStoInHandAcc.Text  = SBM_BLC1.Common.String.AddSeperator(oSPTypeWiseAccountMapping.StockInHandAcc);
            txtStoInHandName.Text = oSPTypeWiseAccountMapping.StockInHandAccName;
            txtLibOnStoAcc.Text   = SBM_BLC1.Common.String.AddSeperator(oSPTypeWiseAccountMapping.LiabilityOnStockAcc);
            txtLibOnStoName.Text  = oSPTypeWiseAccountMapping.LiabilityOnStockAccName;
            txtHolAcc.Text        = SBM_BLC1.Common.String.AddSeperator(oSPTypeWiseAccountMapping.HoldingAcc);
            txtHolName.Text       = oSPTypeWiseAccountMapping.HoldingAccName;
            txtAccComAcc.Text     = SBM_BLC1.Common.String.AddSeperator(oSPTypeWiseAccountMapping.AccruedInterestAcc);
            txtComName.Text       = oSPTypeWiseAccountMapping.AccruedInterestAccName;
            txtAdvAgiIntAcc.Text  = SBM_BLC1.Common.String.AddSeperator(oSPTypeWiseAccountMapping.AdvAgainstInterestAcc);
            txtAdvAgiIntName.Text = oSPTypeWiseAccountMapping.AdvAgainstInterestAccName;
            txtAdvAgiPriAcc.Text  = SBM_BLC1.Common.String.AddSeperator(oSPTypeWiseAccountMapping.AdvAgainstPrincipalAcc);
            txtAdvAgiPriName.Text = oSPTypeWiseAccountMapping.AdvAgainstPrincipalAccName;
            if (string.IsNullOrEmpty(hdDataType.Value))
            {
                //When Loading from Approver End
                UserDetails userDetails = ucUserDet.UserDetail;
                userDetails.MakerID  = oSPTypeWiseAccountMapping.UserDetails.MakerID;
                userDetails.MakeDate = oSPTypeWiseAccountMapping.UserDetails.MakeDate;
                ucUserDet.UserDetail = userDetails;
            }
            else if (hdDataType.Value.Equals("T"))
            {
                //When loading from temp table
                UserDetails userDetails = ucUserDet.UserDetail;
                userDetails.CheckDate      = oSPTypeWiseAccountMapping.UserDetails.CheckDate;
                userDetails.CheckerID      = oSPTypeWiseAccountMapping.UserDetails.CheckerID;
                userDetails.CheckDate      = oSPTypeWiseAccountMapping.UserDetails.CheckDate;
                userDetails.CheckerComment = oSPTypeWiseAccountMapping.UserDetails.CheckerComment;
                ucUserDet.UserDetail       = userDetails;
            }

            hdSPTypeID.Value = sSPTypeID;
        }
        else
        {
            ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND, Constants.MSG_TYPE_ERROR);
        }
    }
Esempio n. 2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        SPTypeWiseAccountMapping    oSPTypeWiseAccountMapping    = new SPTypeWiseAccountMapping();
        SPTypeWiseAccountMappingDAL oSPTypeWiseAccountMappingDAL = new SPTypeWiseAccountMappingDAL();

        if (!string.IsNullOrEmpty(ddlSPTypeID.SelectedItem.Value))
        {
            oSPTypeWiseAccountMapping.SPType.SPTypeID = ddlSPTypeID.SelectedItem.Value;
        }
        oSPTypeWiseAccountMapping.StockInHandAcc          = SBM_BLC1.Common.String.RemoveSeperator(txtStoInHandAcc.Text);
        oSPTypeWiseAccountMapping.StockInHandAccName      = txtStoInHandName.Text.Trim();
        oSPTypeWiseAccountMapping.LiabilityOnStockAcc     = SBM_BLC1.Common.String.RemoveSeperator(txtLibOnStoAcc.Text);
        oSPTypeWiseAccountMapping.LiabilityOnStockAccName = txtLibOnStoName.Text.Trim();
        oSPTypeWiseAccountMapping.HoldingAcc                 = SBM_BLC1.Common.String.RemoveSeperator(txtHolAcc.Text);
        oSPTypeWiseAccountMapping.HoldingAccName             = txtHolName.Text.Trim();
        oSPTypeWiseAccountMapping.AccruedInterestAcc         = SBM_BLC1.Common.String.RemoveSeperator(txtAccComAcc.Text);
        oSPTypeWiseAccountMapping.AccruedInterestAccName     = txtComName.Text.Trim();
        oSPTypeWiseAccountMapping.AdvAgainstInterestAcc      = SBM_BLC1.Common.String.RemoveSeperator(txtAdvAgiIntAcc.Text);
        oSPTypeWiseAccountMapping.AdvAgainstInterestAccName  = txtAdvAgiIntName.Text.Trim();
        oSPTypeWiseAccountMapping.AdvAgainstPrincipalAcc     = SBM_BLC1.Common.String.RemoveSeperator(txtAdvAgiPriAcc.Text);
        oSPTypeWiseAccountMapping.AdvAgainstPrincipalAccName = txtAdvAgiPriName.Text.Trim();

        oSPTypeWiseAccountMapping.UserDetails          = ucUserDet.UserDetail;
        oSPTypeWiseAccountMapping.UserDetails.MakeDate = DateTime.Now;
        ucUserDet.ResetData();

        Result oResult = (Result)oSPTypeWiseAccountMappingDAL.Save(oSPTypeWiseAccountMapping);

        if (oResult.Status)
        {
            ClearTextValue();
            this.LoadList();
            hdSPTypeID.Value = "";

            ucMessage.OpenMessage(Constants.MSG_SUCCESS_SAVE, Constants.MSG_TYPE_SUCCESS);
        }
        else
        {
            ucMessage.OpenMessage(Constants.MSG_ERROR_SAVE, Constants.MSG_TYPE_ERROR);
        }
    }
Esempio n. 3
0
    protected void btnApprove_Click(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(hdSPTypeID.Value))
        {
            SPTypeWiseAccountMapping    oSPTypeWiseAccountMapping    = new SPTypeWiseAccountMapping(hdSPTypeID.Value);
            SPTypeWiseAccountMappingDAL oSPTypeWiseAccountMappingDAL = new SPTypeWiseAccountMappingDAL();

            oSPTypeWiseAccountMapping.UserDetails = ucUserDet.UserDetail;

            Result oResult = (Result)oSPTypeWiseAccountMappingDAL.Approve(oSPTypeWiseAccountMapping);
            if (oResult.Status)
            {
                ucMessage.OpenMessage(Constants.MSG_SUCCESS_APPROVE, Constants.MSG_TYPE_SUCCESS);
            }
            else
            {
                ucMessage.OpenMessage(Constants.MSG_ERROR_APPROVE, Constants.MSG_TYPE_ERROR);
            }
        }
        else
        {
            ucMessage.OpenMessage(Constants.MSG_ERROR_APPROVE, Constants.MSG_TYPE_ERROR);
        }
    }