Exemple #1
0
 protected void txtTaNumber_TextChanged(object sender, EventArgs e)
 {
     objTADetails = new TADetails();
     objEnt       = new clsEntTADetails();
     objEnt       = objTADetails.readerForAAADetails(0, txtAAANumber.Text);
     fillText();
 }
Exemple #2
0
    public clsEntTADetails readerForPipelineDetailsForPortfolio(int iPipelineID = 0)
    {
        clsEntTADetails objEnt = new clsEntTADetails();
        SqlDataReader   reader = null;

        try
        {
            if (objConnection.Connection.State == ConnectionState.Closed)
            {
                objConnection.Connection.Open();
            }

            SqlParameter[] pram = new SqlParameter[] { new SqlParameter("@iPipelineID", iPipelineID) };
            reader = objConnection.ExecuteReaderQuery(clsConstant.SP_SELECT_PipelineDetailsForPortfolio, CommandType.StoredProcedure, pram);

            while (reader.Read())
            {
                //iAAAID, vsAAANumber, vsAAAName, cAmount, dtClosingDate, dtRevisedClosingDate ,vsDEAFileNo,iFundingAgencyID ,iUserID
                if (!reader.IsDBNull(0))
                {
                    objEnt.iTeamLead = Convert.ToInt32(reader.GetValue(0));
                }
            }
            reader.Close();
            return(objEnt);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
        protected void txtTaNumber_TextChanged(object sender, EventArgs e)
        {
            //commented by me discuss with bhavana why use textchagned method
            //objTADetails = new TADetails();
            //objEnt = new clsEntTADetails();
            //objEnt = objTADetails.readerForTADetails(0, txtPortfolioNumber.Text);
            //fillText();

            objTADetails = new TADetails();
            objEnt       = new clsEntTADetails();
            objEnt       = objTADetails.readerForPortfolioDetails(0, txtPortfolioNumber.Text);
            fillText();
        }
 protected void txtTaNumber_TextChanged(object sender, EventArgs e)
 {
     objTADetails = new TADetails();
     objEnt       = new clsEntTADetails();
     objEnt       = objTADetails.readerForTADetails(0, txtTaNumber.Text);
     if (objEnt.TAActive == 0)
     {
         ChkactiveTA.Checked = false;
     }
     else
     {
         ChkactiveTA.Checked = true;
     }
     fillText();
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                objTADetails = new TADetails();
                objEnt       = new clsEntTADetails();
                objComm      = new CommonFunction();

                iTADetailsID = Request.QueryString["iPortfolioID"];

                if (!this.IsPostBack)
                {
                    btnSubmit.Visible = true;
                    btnUpdate.Visible = false;
                    //txtClosingDate.Text = DateTime.Today.ToString(clsConstant.DATE_FORMAT);

                    if (Utility.CheckAccess("PortfolioAddEdit") == false)
                    {
                        UrlParameterPasser urlWrapper = new UrlParameterPasser();
                        urlWrapper["pageaccesserr"] = "1";
                        urlWrapper.Url = "../DocumentLogSystem/DashBoard.aspx";
                        urlWrapper.PassParameters();
                    }


                    if (!Convert.ToBoolean(Session[clsConstant.SESS_VIEWTYPE]))
                    {
                        this.MakeReadOnly(this.Controls);
                    }

                    bindddlWBSector();
                    bindSector();
                    bindPipeline();
                    bindAgency();
                    BindTTl();
                    if (iTADetailsID != null)
                    {
                        fillText();
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                objTADetails = new TADetails();
                objEnt       = new clsEntTADetails();
                objComm      = new CommonFunction();


                iTADetailsID = Request.QueryString["TAID"];
                if (!this.IsPostBack)
                {
                    ChkactiveTA.Checked = true;
                    ChkactiveTA.Text    = "OnGoing";
                    btnSubmit.Visible   = true;
                    btnUpdate.Visible   = false;
                    txtStartDate.Text   = DateTime.Today.ToString(clsConstant.DATE_FORMAT);

                    if (Utility.CheckAccess("TechnicalAssistanceDetailsAddEdit") == false)
                    {
                        UrlParameterPasser urlWrapper = new UrlParameterPasser();
                        urlWrapper["pageaccesserr"] = "1";
                        urlWrapper.Url = "../DocumentLogSystem/DashBoard.aspx";
                        urlWrapper.PassParameters();
                    }
                    if (!Convert.ToBoolean(Session[clsConstant.SESS_VIEWTYPE]))
                    {
                        this.MakeReadOnly(this.Controls);
                    }

                    bindddlProject();


                    if (iTADetailsID != null)
                    {
                        fillText();
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }
        }
        private void fillText()
        {
            objEnt = new clsEntTADetails();
            if (iTADetailsID != null)
            {
                // objEnt = objTADetails.readerForTADetails(int.Parse(iTADetailsID),txtPortfolioNumber.Text);
                objEnt = objTADetails.readerForPortfolioDetails(int.Parse(iTADetailsID), txtCreditID.Text);
            }

            else
            {
                // objEnt = objTADetails.readerForTADetails(0, txtPortfolioNumber.Text);
                objEnt = objTADetails.readerForPortfolioDetails(0, txtCreditID.Text);
            }


            if (objEnt.iCreditID != null)
            {
                lblPortfolioID.Text       = objEnt.iPortfolioID.ToString();
                txtPortfolioName.Text     = objEnt.vsPortfolioName;
                txtPortfolioNumber.Text   = objEnt.vsPortfolioNumber;
                txtPortfolioAmount.Text   = Math.Round(Convert.ToDecimal(objEnt.cAmount), 2).ToString();
                txtClosingDate.Text       = objEnt.dtClosingDate;
                txtReviseClosingDate.Text = objEnt.dtRevisedClosingDate;
                txtPortfolioFileNo.Text   = objEnt.vsDEAFileNo;
                ddlWSSector.SelectedValue = objEnt.iDocCatFAID.ToString();
                ddlSector.SelectedValue   = objEnt.iDocCatID.ToString();
                txtCreditID.Text          = objEnt.iCreditID.ToString();
                ddlPipeline.SelectedValue = objEnt.iPipelineID.ToString();
                ddlWBAgency.SelectedValue = objEnt.iFundingAgencyID.ToString();
                ddlStatus.SelectedValue   = objEnt.iStatusID.ToString();
                txtSigningDate.Text       = objEnt.SignindDate;
                txtApprovalDate.Text      = objEnt.ApprovalDate;
                txtNegotiationDate.Text   = objEnt.NegotiationDate;
                ddlIDType.SelectedValue   = objEnt.IDType.ToString();
                ddlTTl.SelectedValue      = objEnt.TTlID.ToString();
                //string projectID = objEnt.ProjectID.ToString();
                //drpProjectNameNumber.SelectedValue = projectID;
                btnSubmit.Visible = false;
                btnUpdate.Visible = true;
            }
        }
        private void fillText()
        {
            objEnt = new clsEntTADetails();
            if (iTADetailsID != null)
            {
                objEnt = objTADetails.readerForTADetails(int.Parse(iTADetailsID), txtTaNumber.Text);
            }
            else
            {
                objEnt = objTADetails.readerForTADetails(0, txtTaNumber.Text);
            }

            if (objEnt.TAName != null)
            {
                lblTAID.Text      = objEnt.TAID.ToString();
                txtTaName.Text    = objEnt.TAName;
                txtTaNumber.Text  = objEnt.TANumber;
                txtTAAmount.Text  = Math.Round(Convert.ToDecimal(objEnt.TAAmount), 2).ToString();
                txtStartDate.Text = objEnt.StartDate;
                txtEndDate.Text   = objEnt.EndDate;
                string projectID = objEnt.ProjectID.ToString();
                if (drpProjectNameNumber.Items.FindByValue(projectID) != null)
                {
                    drpProjectNameNumber.SelectedValue = projectID;
                }
                btnSubmit.Visible = false;
                btnUpdate.Visible = true;
                if (objEnt.TAActive == 1)
                {
                    ChkactiveTA.Text    = "OnGoing";
                    ChkactiveTA.Checked = true;
                }
                else
                {
                    ChkactiveTA.Text    = "Close";
                    ChkactiveTA.Checked = false;
                }
            }
        }
Exemple #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                objTADetails = new TADetails();
                objEnt       = new clsEntTADetails();
                objComm      = new CommonFunction();

                iTADetailsID = Request.QueryString["iAAAID"];

                if (!this.IsPostBack)
                {
                    btnSubmit.Visible = true;
                    btnUpdate.Visible = false;
                    if (Utility.CheckAccess("AAAAddEdit") == false)
                    {
                        pnlInvalid.Visible = true;
                        MainDiv.Visible    = false;
                    }
                    if (!Convert.ToBoolean(Session[clsConstant.SESS_VIEWTYPE]))
                    {
                        this.MakeReadOnly(this.Controls);
                    }
                    bindddlWBSector();
                    bindSector();
                    bindAgency();
                    this.bindTeamLeader();
                    if (iTADetailsID != null)
                    {
                        fillText();
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }
        }
Exemple #10
0
        private void fillText()
        {
            objEnt = new clsEntTADetails();
            if (iTADetailsID != null)
            {
                // objEnt = objTADetails.readerForTADetails(int.Parse(iTADetailsID),txtAAANumber.Text);
                objEnt = objTADetails.readerForAAADetails(int.Parse(iTADetailsID), txtAAANumber.Text);
            }

            else
            {
                // objEnt = objTADetails.readerForTADetails(0, txtAAANumber.Text);
                objEnt = objTADetails.readerForAAADetails(0, txtAAANumber.Text);
            }


            if (objEnt.vsAAAName != null)
            {
                lblAAAID.Text             = objEnt.iAAAID.ToString();
                txtAAAName.Text           = objEnt.vsAAAName;
                txtAAANumber.Text         = objEnt.vsAAANumber;
                txtAAAAmount.Text         = Math.Round(Convert.ToDecimal(objEnt.cAmount), 2).ToString();
                txtClosingDate.Text       = objEnt.dtClosingDate;
                txtReviseClosingDate.Text = objEnt.dtRevisedClosingDate;
                txtAAAFileNo.Text         = objEnt.vsDEAFileNo;
                ddlWSSector.SelectedValue = objEnt.iDocCatFAID.ToString();
                ddlSector.SelectedValue   = objEnt.iDocCatID.ToString();
                ddlStatus.SelectedValue   = objEnt.iStatusID.ToString();
                ddlWBAgency.SelectedValue = objEnt.iFundingAgencyID.ToString();

                txtSigningDate.Text         = objEnt.SignindDate;
                txtApprovalDate.Text        = objEnt.ApprovalDate;
                txtNegotiationDate.Text     = objEnt.NegotiationDate;
                ddlTeamLeader.SelectedValue = objEnt.iTeamLead.ToString();
                btnSubmit.Visible           = false;
                btnUpdate.Visible           = true;
            }
        }
Exemple #11
0
    //----------------------------------------------------------------------
    // Method: Delete Ta details
    // Author: Sanchit Gupta
    // Description: Add new designation entry to the database
    // Creation Date: 17-5-11
    //
    // Inputs: designationName - user designation, description - define the details of designation authorities
    // Outputs: return a boolean value True if successfully executed else false
    // Throws: Throw a proper exception message
    //



    public clsEntTADetails readerForTADetails(int iTAID = 0, string taNumber = "")
    {
        clsEntTADetails objEnt = new clsEntTADetails();
        SqlDataReader   reader = null;

        try
        {
            if (objConnection.Connection.State == ConnectionState.Closed)
            {
                objConnection.Connection.Open();
            }

            SqlParameter[] pram = new SqlParameter[] { new SqlParameter("@taID", iTAID), new SqlParameter("@taNumber", taNumber) };
            reader = objConnection.ExecuteReaderQuery(clsConstant.SP_SELECT_TA_DETAILS_CHECK, CommandType.StoredProcedure, pram);

            while (reader.Read())
            {
                if (!reader.IsDBNull(0))
                {
                    objEnt.TAID = Convert.ToInt32(reader.GetValue(0));
                }

                if (!reader.IsDBNull(1))
                {
                    objEnt.TANumber = reader.GetValue(1).ToString();
                }
                if (!reader.IsDBNull(2))
                {
                    objEnt.TAName = reader.GetValue(2).ToString();
                }
                if (!reader.IsDBNull(3))
                {
                    objEnt.TAAmount = reader.GetValue(3).ToString();
                }



                //Convert.ToDateTime(reader.GetValue(3)).ToString(clsConstant.DATE_FORMAT);

                if (!reader.IsDBNull(4))
                {
                    objEnt.StartDate = Convert.ToDateTime(reader.GetValue(4)).ToString(clsConstant.DATE_FORMAT);
                }
                if (!reader.IsDBNull(5))
                {
                    objEnt.EndDate = Convert.ToDateTime(reader.GetValue(5)).ToString(clsConstant.DATE_FORMAT);
                }
                if (!reader.IsDBNull(6))
                {
                    objEnt.ProjectID = Convert.ToInt32(reader.GetValue(6));
                }
                if (!reader.IsDBNull(7))
                {
                    objEnt.TAActive = Convert.ToInt32(reader.GetValue(7));
                }
            }
            reader.Close();
            return(objEnt);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Exemple #12
0
    public clsEntTADetails readerForPortfolioDetails(int iPortfolioID = 0, string vsPortfolioNumber = "")
    {
        clsEntTADetails objEnt = new clsEntTADetails();
        SqlDataReader   reader = null;

        try
        {
            if (objConnection.Connection.State == ConnectionState.Closed)
            {
                objConnection.Connection.Open();
            }

            SqlParameter[] pram = new SqlParameter[] { new SqlParameter("@iPortfolioID", iPortfolioID), new SqlParameter("@vsPortfolioNumber", vsPortfolioNumber) };
            reader = objConnection.ExecuteReaderQuery(clsConstant.SP_SELECT_Portfolio_DETAILS_CHECK, CommandType.StoredProcedure, pram);

            while (reader.Read())
            {
                //iAAAID, vsAAANumber, vsAAAName, cAmount, dtClosingDate, dtRevisedClosingDate ,vsDEAFileNo,iFundingAgencyID ,iUserID
                if (!reader.IsDBNull(0))
                {
                    objEnt.iPortfolioID = Convert.ToInt32(reader.GetValue(0));
                }
                if (!reader.IsDBNull(1))
                {
                    objEnt.vsPortfolioNumber = reader.GetValue(1).ToString();
                }
                if (!reader.IsDBNull(2))
                {
                    objEnt.vsPortfolioName = reader.GetValue(2).ToString();
                }
                if (!reader.IsDBNull(3))
                {
                    objEnt.cAmount = Convert.ToDouble(reader.GetValue(3).ToString());
                }
                //Convert.ToDateTime(reader.GetValue(3)).ToString(clsConstant.DATE_FORMAT);
                if (!reader.IsDBNull(4))
                {
                    objEnt.dtClosingDate = Convert.ToDateTime(reader.GetValue(4)).ToString(clsConstant.DATE_FORMAT);
                }
                if (!reader.IsDBNull(5))
                {
                    objEnt.dtRevisedClosingDate = Convert.ToDateTime(reader.GetValue(5)).ToString(clsConstant.DATE_FORMAT);
                }
                if (!reader.IsDBNull(6))
                {
                    objEnt.vsDEAFileNo = reader.GetValue(6).ToString();
                }
                if (!reader.IsDBNull(7))
                {
                    objEnt.iDocCatFAID = Convert.ToInt32(reader.GetValue(7));
                }
                if (!reader.IsDBNull(8))
                {
                    objEnt.iDocCatID = Convert.ToInt32(reader.GetValue(8));
                }
                if (!reader.IsDBNull(9))
                {
                    objEnt.iCreditID = reader.GetValue(9).ToString();
                }
                if (!reader.IsDBNull(10))
                {
                    objEnt.iPipelineID = reader.GetValue(10).ToString();
                }
                if (!reader.IsDBNull(11))
                {
                    objEnt.iFundingAgencyID = Convert.ToInt32(reader.GetValue(11).ToString());
                }
                if (!reader.IsDBNull(12))
                {
                    objEnt.iStatusID = Convert.ToInt32(reader.GetValue(12).ToString());
                }
                if (!reader.IsDBNull(13))
                {
                    objEnt.SignindDate = Convert.ToDateTime(reader.GetValue(13)).ToString(clsConstant.DATE_FORMAT);
                }
                if (!reader.IsDBNull(14))
                {
                    objEnt.ApprovalDate = Convert.ToDateTime(reader.GetValue(14)).ToString(clsConstant.DATE_FORMAT);
                }
                if (!reader.IsDBNull(15))
                {
                    objEnt.NegotiationDate = Convert.ToDateTime(reader.GetValue(15)).ToString(clsConstant.DATE_FORMAT);
                }
                if (!reader.IsDBNull(17))
                {
                    objEnt.IDType = Convert.ToInt32(reader.GetValue(17).ToString());
                }
                if (!reader.IsDBNull(18))
                {
                    objEnt.TTlID = reader.GetValue(18).ToString();
                }
            }
            reader.Close();
            return(objEnt);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }