Ejemplo n.º 1
0
 protected void bindRetPartRecord(RetPartRecord pRec1)
 {
     lblEmpHeading.Text = "Employee - " + pRec1.EmpNo.ToString() + "/"
                          + pRec1.LastName + ", " + pRec1.FirstName;
     txtSSNo.Text         = pRec1.SSN.ToString();
     txtEmpNo.Text        = pRec1.EmpNo.ToString();
     txtFirstName.Text    = pRec1.FirstName;
     txtLastName.Text     = pRec1.LastName;
     txtPType.Text        = pRec1.PType;
     txtEStatus.Text      = pRec1.EStatus;
     txtDedAuthDate.Text  = (pRec1.DedAuthDate.ToShortDateString() == "1/1/0001" ? "" : pRec1.DedAuthDate.ToShortDateString());
     txtFormRecDate.Text  = (pRec1.FormRecDate.ToShortDateString() == "1/1/0001" ? "" : pRec1.FormRecDate.ToShortDateString());
     txtPathCd.Text       = pRec1.PathCd;
     txtPathDate.Text     = (pRec1.PathDt.ToShortDateString() == "1/1/0001" ? "" : pRec1.PathDt.ToShortDateString());
     txtPathUserId.Text   = pRec1.PathUserID;
     txtPathUserDate.Text = (pRec1.PathUserDate.ToShortDateString() == "1/1/0001" ? "" : pRec1.PathUserDate.ToShortDateString());
 }
Ejemplo n.º 2
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Select")
        {
            int         index = Convert.ToInt32(e.CommandArgument);
            GridViewRow gvr   = GridView1.Rows[index];
            string      dssn  = Server.HtmlDecode(gvr.Cells[4].Text);
            txtSSNo.Text = dssn;

            DsktpData DtopData = new DsktpData();
            if (!string.IsNullOrEmpty(txtSSNo.Text))
            {
                if (DtopData.checkExistRetRecord(txtSSNo.Text))
                {
                    string ssn = txtSSNo.Text;

                    clearPage();
                    RetPartRecord dRec = new RetPartRecord();
                    dRec = DtopData.getRetPartData(ssn);
                    bindRetPartRecord(dRec);
                    DataSet ds = DtopData.searchRetElects(ssn);
                    grvElections.DataSource = ds;
                    grvElections.DataBind();

                    int     empno = Convert.ToInt32(txtEmpNo.Text);
                    DataSet ds2   = DtopData.searchRetPayHist(ssn);
                    grvPayments.DataSource = ds2;
                    grvPayments.DataBind();

                    DataSet ds3 = DtopData.searchRetPayrollHist(ssn);
                    grvDeductions.DataSource = ds3;
                    grvDeductions.DataBind();
                }
                else
                {
                    infoDiv1.Visible = true;
                    lblInfo.Text     = "There were no records returned for the search criteria.";
                }
            }
        }
    }
Ejemplo n.º 3
0
    protected void btnRetrieve_Click(object sender, EventArgs e)
    {
        DsktpData DtopData = new DsktpData();

        if (!string.IsNullOrEmpty(txtSSNo.Text))
        {
            if (DtopData.checkExistRetRecord(txtSSNo.Text))
            {
                string ssn = txtSSNo.Text;

                clearPage();
                RetPartRecord rRec = new RetPartRecord();
                rRec = DtopData.getRetPartData(ssn);
                bindRetPartRecord(rRec);

                DataSet ds = DtopData.searchRetElects(ssn);
                grvElections.DataSource = ds;
                grvElections.DataBind();

                int     empno = Convert.ToInt32(txtEmpNo.Text);
                DataSet ds2   = DtopData.searchRetPayHist(ssn);
                grvPayments.DataSource = ds2;
                grvPayments.DataBind();

                DataSet ds3 = DtopData.searchRetPayrollHist(ssn);
                grvDeductions.DataSource = ds3;
                grvDeductions.DataBind();
            }
            else
            {
                clearPage();
                infoDiv1.Visible = true;
                lblInfo.Text     = "There were no records returned for the search criteria.";
            }
        }
    }