示例#1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        BBAddress    oBBAddress    = new BBAddress();
        BBAddressDAL oBBAddressDAL = new BBAddressDAL();

        if (!string.IsNullOrEmpty(ddlSPType.SelectedItem.Value))
        {
            oBBAddress.SPType.SPTypeID = ddlSPType.SelectedItem.Value;
        }
        oBBAddress.SalesStatemetAddress   = txtSaleStatementAddress.Text;
        oBBAddress.CommissionClaimAddress = txtCommClaimAddress.Text;
        oBBAddress.InterestClaimAddress   = txtInrestClaimAddress.Text;
        oBBAddress.EncashmentClaimAddress = txtEncashClaimAddress.Text;
        oBBAddress.ReinvestmentAddress    = txtReinAddress.Text;

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

        Result oResult = (Result)oBBAddressDAL.Save(oBBAddress);

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

            ucMessage.OpenMessage(Constants.MSG_SUCCESS_SAVE, Constants.MSG_TYPE_SUCCESS);
        }
        else
        {
            ucMessage.OpenMessage(Constants.MSG_ERROR_SAVE, Constants.MSG_TYPE_ERROR);
        }
    }
示例#2
0
    public void LoadList()
    {
        Config oConfig = (Config)Session[Constants.SES_USER_CONFIG];

        if (oConfig != null)
        {
            BBAddress    oBBAddress    = new BBAddress();
            BBAddressDAL oBBAddressDAL = new BBAddressDAL();

            Result oResult = oBBAddressDAL.LoadUnapprovedList(oConfig.UserName, false);

            if (oResult.Status)
            {
                DataTable dtTmpDataList = (DataTable)oResult.Return;
                if (dtTmpDataList.Rows.Count > 0)
                {
                    dtTmpDataList.Columns.Remove("MakerID");

                    gvList.DataSource = dtTmpDataList;
                    gvList.DataBind();

                    Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtTmpDataList;

                    this.gvList.HeaderRow.Cells[1].Text = "SP Type";
                    this.gvList.HeaderRow.Cells[2].Text = "Sales Statemet Address";
                    this.gvList.HeaderRow.Cells[3].Text = "Commission Claim Address";
                    this.gvList.HeaderRow.Cells[4].Text = "Interest Claim Address";
                    this.gvList.HeaderRow.Cells[5].Text = "Encashment Claim Address";
                    this.gvList.HeaderRow.Cells[6].Text = "Reinvestment Address";
                    this.gvList.HeaderRow.Cells[7].Text = "Make Date";
                }
                else
                {
                    gvList.DataSource = null;
                    gvList.DataBind();
                }
            }
            else
            {
                ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND, Constants.MSG_TYPE_ERROR);
            }
        }
        else
        {
            ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND, Constants.MSG_TYPE_ERROR);
        }
    }
示例#3
0
    private void LoadDataByID(string sSPTypeID)
    {
        BBAddress    oBBAddress    = new BBAddress(sSPTypeID);
        BBAddressDAL oBBAddressDAL = new BBAddressDAL();
        Result       oResult       = new Result();

        oResult = oBBAddressDAL.LoadByID(oBBAddress);
        if (oResult.Status)
        {
            oBBAddress = (BBAddress)oResult.Return;

            DDListUtil.Assign(ddlSPType, oBBAddress.SPType.SPTypeID);
            ddlSPType.Enabled            = false;
            txtSaleStatementAddress.Text = oBBAddress.SalesStatemetAddress;
            txtCommClaimAddress.Text     = oBBAddress.CommissionClaimAddress;
            txtInrestClaimAddress.Text   = oBBAddress.InterestClaimAddress;
            txtEncashClaimAddress.Text   = oBBAddress.EncashmentClaimAddress;
            txtReinAddress.Text          = oBBAddress.ReinvestmentAddress;

            if (string.IsNullOrEmpty(hdDataType.Value))
            {
                //When Loading from Approver End
                UserDetails userDetails = ucUserDet.UserDetail;
                userDetails.MakerID  = oBBAddress.UserDetails.MakerID;
                userDetails.MakeDate = oBBAddress.UserDetails.MakeDate;
                ucUserDet.UserDetail = userDetails;
            }
            else if (hdDataType.Value.Equals("T"))
            {
                //When loading from temp table
                UserDetails userDetails = ucUserDet.UserDetail;
                userDetails.CheckerID      = oBBAddress.UserDetails.CheckerID;
                userDetails.CheckDate      = oBBAddress.UserDetails.CheckDate;
                userDetails.CheckerComment = oBBAddress.UserDetails.CheckerComment;
                ucUserDet.UserDetail       = userDetails;
            }

            hdSPTypeID.Value = sSPTypeID;
        }
        else
        {
            ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND, Constants.MSG_TYPE_ERROR);
        }
    }
示例#4
0
    protected void btnApprove_Click(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(hdSPTypeID.Value))
        {
            BBAddress    oBBAddress    = new BBAddress(hdSPTypeID.Value);
            BBAddressDAL oBBAddressDAL = new BBAddressDAL();
            oBBAddress.UserDetails = ucUserDet.UserDetail;

            Result oResult = (Result)oBBAddressDAL.Approve(oBBAddress);
            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);
        }
    }