コード例 #1
0
    protected void btnVWEmployeeReport_Click(object sender, EventArgs e)
    {
        ModalPopupTree.Show();
        DataTable dtDesc = objMgr.GetSchemaDescription("VW_EmpInfo");

        if (dtDesc.Rows.Count > 0)
        {
            grColumns.DataSource = dtDesc;
            grColumns.DataBind();
            lblSchema.Text = btnVWEmployeeReport.Text.Trim();
        }
    }
コード例 #2
0
    protected void grPayslipMst_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        GridView _gridView = (GridView)sender;
        // Get the selected index and the command name
        int    _selectedIndex = int.Parse(e.CommandArgument.ToString());
        string _commandName   = e.CommandName;

        _gridView.SelectedIndex = _selectedIndex;

        switch (_commandName)
        {
        case ("DoubleClick"):
            ModalPopupTree.Show();

            hfPSBID.Value = grPayslipMst.DataKeys[_gridView.SelectedIndex].Values[0].ToString().Trim();
            hfPayID.Value = grPayslipMst.DataKeys[_gridView.SelectedIndex].Values[1].ToString().Trim();
            hfEmpID.Value = grPayslipMst.DataKeys[_gridView.SelectedIndex].Values[2].ToString().Trim();

            lblEmpID.Text      = grPayslipMst.SelectedRow.Cells[2].Text.Trim();
            lblEmpName.Text    = grPayslipMst.SelectedRow.Cells[3].Text.Trim();
            lblLeaveTitle.Text = grPayslipMst.SelectedRow.Cells[11].Text.Trim();
            //lblFromTo.Text = lblFrom.Text;
            DataTable dtPaySlipDets = new DataTable();
            dtPaySlipDets             = objPSAppMgr.GetPayslipDetailsData(hfPSBID.Value.ToString(), hfEmpID.Value.ToString());
            grPaySlipDetls.DataSource = dtPaySlipDets;
            grPaySlipDetls.DataBind();

            int     i     = 1;
            decimal total = 0;
            foreach (GridViewRow gRow in grPaySlipDetls.Rows)
            {
                gRow.Cells[0].Text = i.ToString();
                i++;

                TextBox txtPayAmnt = (TextBox)gRow.FindControl("txtPayAmnt");
                if (string.IsNullOrEmpty(txtPayAmnt.Text.Trim()) == false)
                {
                    total = total + Convert.ToDecimal(txtPayAmnt.Text.Trim());
                }
            }

            grPaySlipDetls.FooterRow.Cells[1].Text = "Total Amount :";
            grPaySlipDetls.FooterRow.Cells[2].Text = total.ToString();
            break;
        }
    }
コード例 #3
0
    protected void grLeaveMaster_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        GridView _gridView = (GridView)sender;
        // Get the selected index and the command name
        int    _selectedIndex = int.Parse(e.CommandArgument.ToString());
        string _commandName   = e.CommandName;

        _gridView.SelectedIndex = _selectedIndex;
        string[] arInfo = new string[3];
        switch (_commandName)
        {
        case ("DoubleClick"):
            ModalPopupTree.Show();
            lblEmpID.Text      = grLeaveMaster.SelectedRow.Cells[1].Text.Trim();
            lblEmpName.Text    = grLeaveMaster.SelectedRow.Cells[2].Text.Trim();
            lblLeaveTitle.Text = grLeaveMaster.HeaderRow.Cells[4].Text;
            lblFromTo.Text     = lblFrom.Text;
            DataTable dtDays = new DataTable();
            dtDays = objLevProMgr.SelectEnjoyedLeaveRecordsDays(lblEmpID.Text.Trim(), hfLType.Value.ToString(), hfFrom.Value.ToString(), hfTo.Value.ToString());
            grLeaveDetls.DataSource = dtDays;
            grLeaveDetls.DataBind();
            if (dtDays != null)
            {
                dtDays.Rows.Clear();
                dtDays.Dispose();
            }

            foreach (GridViewRow gRow in grLeaveDetls.Rows)
            {
                if (Common.CheckNullString(gRow.Cells[0].Text) != "")
                {
                    gRow.Cells[0].Text = Common.DisplayDate(gRow.Cells[0].Text);
                }
                if (Common.CheckNullString(gRow.Cells[1].Text) != "")
                {
                    gRow.Cells[1].Text = Common.DisplayDate(gRow.Cells[1].Text);
                }
                if (Common.CheckNullString(gRow.Cells[5].Text) != "")
                {
                    gRow.Cells[5].Text = Common.DisplayDate(gRow.Cells[5].Text);
                }
            }

            break;
        }
    }
コード例 #4
0
 protected void btnBCC_Click(object sender, EventArgs e)
 {
     ModalPopupTree.TargetControlID = "btnBCC";
     ModalPopupExtenderSelected     = "BCC";
     ModalPopupTree.Show();
 }