Example #1
0
    protected void popSelected(Object sender, EventArgs e)
    {
        txtboxMemberId.Text   = "";
        txtcurbal.Text        = "";
        txtadjustment.Text    = "";
        txtRemarks.Text       = "";
        btnUpdate.Enabled     = true;
        popGridSearch.Visible = true;
        GridViewRow row      = popGridSearch.SelectedRow;
        string      memberid = row.Cells[1].Text;

        txtboxMemberId.Text = row.Cells[1].Text;
        IncentiveBusiness B   = new IncentiveBusiness();
        IncentivePoint    obj = new IncentivePoint();

        obj            = B.SelectMemberCurBalance(memberid);
        txtcurbal.Text = obj.CurrentBalance.ToString();
    }
Example #2
0
    protected void popSelected(Object sender, EventArgs e)
    {
        txtOldBalance.Text     = "";
        txtID.Text             = "";
        txtCurrentBalance.Text = "";
        txtUtilization.Text    = "";
        txtRemarks.Text        = "";
        btnSave.Enabled        = true;
        popGridSearch.Visible  = true;
        GridViewRow row      = popGridSearch.SelectedRow;
        string      memberid = row.Cells[1].Text;

        txtID.Text = row.Cells[1].Text;

        txtMembername.Text = HttpUtility.HtmlDecode(row.Cells[2].Text);
        //string inst = row.Cells[3].Text;
        IncentiveBusiness B   = new IncentiveBusiness();
        IncentivePoint    obj = new IncentivePoint();

        obj = B.SelectMemberCurBalance(memberid);
        txtCurrentBalance.Text  = obj.CurrentBalance.ToString();
        txtOldBalance.Text      = obj.OpeningBalance.ToString();
        txtUtilizationDate.Text = DateTime.Now.ToShortDateString();
        //string inst = Session["InstituteId"].ToString();
        string UserId     = Session["UserId"].ToString();
        string member     = row.Cells[1].Text;
        string membername = row.Cells[2].Text;
        string inst       = row.Cells[3].Text;
        string role       = Session["Role"].ToString();

        if (role == "7")
        {
            DataSet ds = B.SelectMembersInstitutewise(inst, member, membername);
            Panel1.Visible           = true;
            popGridSearch.DataSource = ds;
            popGridSearch.DataBind();
            popGridSearch.Visible = true;
        }
        else if (role == "17")
        {
            DataSet ds1 = B.SelectFacultyInstitutewise(inst, member, membername);
            Panel1.Visible           = true;
            popGridSearch.DataSource = ds1;
            popGridSearch.DataBind();
            popGridSearch.Visible = true;
        }
        else
        {
            DataSet ds2 = B.SelectStudentInstitutewise(inst, member, membername);
            Panel1.Visible           = true;
            popGridSearch.DataSource = ds2;
            popGridSearch.DataBind();
            popGridSearch.Visible = true;
        }
        Panel4.Visible    = true;
        GridView2.Visible = true;
        Label1.Visible    = true;

        DataTable dt = new DataTable();

        dt = B.CountUtilizationPoints(memberid);
        if (dt.Rows.Count > 0)
        {
            GridView2.Columns[2].FooterText = "Total";
            GridView2.Columns[3].FooterText = dt.Rows[0]["count1"].ToString();
            GridView2.Columns[4].FooterText = dt.Rows[0]["count2"].ToString();
            GridView2.DataSource            = dt;
            GridView2.DataBind();
        }
        {
            GridView2.DataBind();
        }
    }
    protected void popSelected(Object sender, EventArgs e)
    {
        txtboxMemberId.Text  = "";
        txtcurbal.Text       = "";
        txtRemarks.Text      = "";
        txtBasePoint.Text    = "";
        txtSNIPSJRPoint.Text = "";
        //txtThresholdPoint.Text = "";
        txtTotalPoint.Text    = "";
        txtReferenceId.Text   = "";
        btnUpdate.Enabled     = true;
        popGridSearch.Visible = true;
        GridViewRow row      = popGridSearch.SelectedRow;
        string      memberid = row.Cells[1].Text;

        txtboxMemberId.Text = row.Cells[1].Text;
        txtReferenceId.Text = row.Cells[3].Text;

        IncentiveBusiness busobj = new IncentiveBusiness();
        PublishData       obj    = new PublishData();

        obj = busobj.SelectPublicationData(memberid, row.Cells[3].Text.Trim());
        int ThresholdPublicationNo = Convert.ToInt16(ConfigurationManager.AppSettings["ThresholdPublicationNo"]);
        int count = busobj.CountThresholdPublicationPoint(obj);

        obj = busobj.getIsStudentAuthor(txtReferenceId.Text);
        //point 3 (crosses 6 publication) is awarded once in a year
        //if (count > ThresholdPublicationNo)
        //{
        //    if (obj.MUNonMU == "M")
        //    {
        //        txtThresholdPoint.Enabled = true;
        //    }
        //    else
        //    {
        //        txtThresholdPoint.Enabled = false;
        //    }
        //}
        //else
        //{
        //    txtThresholdPoint.Enabled = false;
        //    txtThresholdPoint.Text = "";
        //}

        if (obj.AuthorType == "P" || obj.isCorrAuth == "Y")
        {
            txtSNIPSJRPoint.Enabled = true;
        }
        else
        {
            txtSNIPSJRPoint.Enabled = true;
            txtSNIPSJRPoint.Text    = "";
        }

        IncentivePoint obj1 = new IncentivePoint();

        obj1                 = busobj.SelectMemberCurBalance(memberid);
        txtcurbal.Text       = obj1.CurrentBalance.ToString();
        Session["IsStudent"] = obj.IsStudentAuthor;
        Session["Title"]     = obj.TitleWorkItem;
    }