private void BindPayGroup()
        {
            try
            {
                objEWA.OrgId = Convert.ToInt32(Session["OrgId"].ToString());
                DataSet ds = objBL.BL_BindPayGroup(objEWA);


                DDL_PayGroup.DataSource     = ds;
                DDL_PayGroup.DataTextField  = "PayGrpName";
                DDL_PayGroup.DataValueField = "PayGrpID";
                DDL_PayGroup.DataBind();
                DDL_PayGroup.Items.Insert(0, "Select");
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
Exemplo n.º 2
0
        // Bind Pay Group

        #region [Bind Pay Group]

        private void BindPayGroup()
        {
            try
            {
                objEWA.OrgId = Convert.ToInt32(Session["OrgId"].ToString());
                DataSet ds = objBL.BL_BindPayGroup(objEWA);



                if (ds.Tables[0].Rows.Count == 0 || ds == null)
                {
                    ds.Tables[0].Rows.Add(ds.Tables[0].NewRow());
                    GrdPayGroupName.DataSource = ds;
                    GrdPayGroupName.DataBind();
                    int columncount = GrdPayGroupName.Rows[0].Cells.Count;
                    GrdPayGroupName.Rows[0].Cells.Clear();
                    GrdPayGroupName.Rows[0].Cells.Add(new TableCell());
                    GrdPayGroupName.Rows[0].Cells[0].ColumnSpan = columncount;
                    GrdPayGroupName.Rows[0].Cells[0].Text       = "No Records Found";
                }
                else
                {
                    DDL_PayGroup.DataSource     = ds.Tables[0];
                    DDL_PayGroup.DataTextField  = "PayGrpName";
                    DDL_PayGroup.DataValueField = "PayGrpID";
                    DDL_PayGroup.DataBind();
                    DDL_PayGroup.Items.Insert(0, "Select");


                    GrdPayGroupName.DataSource = ds;
                    GrdPayGroupName.DataBind();
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }