Exemplo n.º 1
0
    private void BindDataPriorityText()
    {
        DataTable dtbBanner = new DataTable();
        Banners objBanner = new Banners();

        dtbBanner = objBanner.GetAll();
        int nCount = dtbBanner.Rows.Count;
        string sAction = GetQuerryString(Constants.ACTION);//Lay Thong tin Edit, Insert
        int nRealValue = 0;
        if (sAction == Constants.ACTION_EDIT)//Kiem tra dieu kien
        {
            nRealValue = nCount;

            eBanners eBannerEntity = this.BannerEntity();
            string sPriority = ConvertData.ConvertToString(eBannerEntity.Priority);

            txtPriority.Text = sPriority;
        }
        else
        {
            nRealValue = nCount + 1;

            txtPriority.Text = ConvertData.ConvertToString(nRealValue);
        }
    }
Exemplo n.º 2
0
 private void BindDataToGrid(int CurrentPageIndex)
 {
     DataTable dtbBanner = new DataTable();
     Banners objBanner = new Banners();
     dtbBanner = objBanner.GetAll();
     RpBanner.DataSource = dtbBanner;
     RpBanner.DataBind();
 }