Exemplo n.º 1
0
        protected void gvFSource_Sorting(object sender, GridViewSortEventArgs e)
        {
            SortExpression = e.SortExpression;
            DataTable dt = FundingSourceData.GetFundingSource();

            SortDireaction = CommonHelper.GridSorting(gvFSource, dt, SortExpression, SortDireaction);
        }
Exemplo n.º 2
0
 protected void BindFundingSource()
 {
     try
     {
         gvFSource.DataSource = FundingSourceData.GetFundingSource();
         gvFSource.DataBind();
     }
     catch (Exception ex)
     {
         lblErrorMsg.Text = ex.Message;
     }
 }
Exemplo n.º 3
0
 protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         FundingSourceData.AddFSName(txtFName.Text);
         BindFundingSource();
     }
     catch (Exception ex)
     {
         lblErrorMsg.Text = ex.Message;
     }
 }
Exemplo n.º 4
0
        protected void gvFSource_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            try
            {
                int    rowIndex    = e.RowIndex;
                int    nameId      = Convert.ToInt32(((Label)gvFSource.Rows[rowIndex].FindControl("lblFundId")).Text);
                string fSourceName = ((TextBox)gvFSource.Rows[rowIndex].FindControl("txtName")).Text;
                FundingSourceData.UpdateFSource(fSourceName, nameId);
                gvFSource.EditIndex = -1;

                lblErrorMsg.Text    = "Name updated successfully";
                txtFName.Text       = "";
                gvFSource.PageIndex = 0;
                BindFundingSource();;
            }
            catch (Exception ex)
            {
                lblErrorMsg.Text = ex.Message;
            }
        }
Exemplo n.º 5
0
        protected void BindGridWithSort()
        {
            DataTable dt = FundingSourceData.GetFundingSource();

            SortDireaction = CommonHelper.GridSorting(gvFSource, dt, SortExpression, SortDireaction != "" ? ViewState["SortDireaction"].ToString() : SortDireaction);
        }