Exemplo n.º 1
0
    /// <summary>
    /// 产值销售汇总表
    /// </summary>
    private void Bindscxshzb()
    {
        string  strsql = "select * from tunnel_newstype where IsDel=0 and parentid=24";
        DataSet das    = Tunnel.Data.DbHelperSQL.Query(strsql);

        if (das.Tables[0].Rows.Count > 0)
        {
            Repeater13.DataSource = das;
            Repeater13.DataBind();
            Repeater13.Visible = true;
            string  strsql2 = "select top " + gettop(8 - das.Tables[0].Rows.Count) + " * from tunnel_index where typeid=24 and del=0 and IsDel=0 order by setdate desc ";
            DataSet das2    = Tunnel.Data.DbHelperSQL.Query(strsql2);
            Repeater6.DataSource = das2;
            Repeater6.DataBind();
        }
        else
        {
            string  strsql2 = "select top 8 * from tunnel_index where typeid=24 and del=0 and IsDel=0 order by setdate desc";
            DataSet das2    = Tunnel.Data.DbHelperSQL.Query(strsql2);
            Repeater6.DataSource = das2;
            Repeater6.DataBind();
            Repeater6.Visible  = true;
            Repeater13.Visible = false;
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet1TableAdapters.HAKKIMDATableAdapter dt = new DataSet1TableAdapters.HAKKIMDATableAdapter();
            Repeater1.DataSource = dt.HakkımdaListele();
            Repeater1.DataBind();


            DataSet1TableAdapters.DENEYIMTableAdapter dt1 = new DataSet1TableAdapters.DENEYIMTableAdapter();
            Repeater2.DataSource = dt1.DeneyimListele();
            Repeater2.DataBind();

            DataSet1TableAdapters.EGITIMTableAdapter dt2 = new DataSet1TableAdapters.EGITIMTableAdapter();
            Repeater3.DataSource = dt2.EgitimListesi();
            Repeater3.DataBind();

            DataSet1TableAdapters.YETENEKLERTableAdapter dt3 = new DataSet1TableAdapters.YETENEKLERTableAdapter();
            Repeater4.DataSource = dt3.YetenekListele();
            Repeater4.DataBind();

            DataSet1TableAdapters.HOBILERTableAdapter dt4 = new DataSet1TableAdapters.HOBILERTableAdapter();
            Repeater5.DataSource = dt4.HobiListesi();
            Repeater5.DataBind();

            DataSet1TableAdapters.KONFERANSTableAdapter dt5 = new DataSet1TableAdapters.KONFERANSTableAdapter();
            Repeater6.DataSource = dt5.KonferansListele();
            Repeater6.DataBind();
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSetTableAdapters.TBLHAKKIMDATableAdapter dt = new DataSetTableAdapters.TBLHAKKIMDATableAdapter();
            Repeater1.DataSource = dt.HakkimdaListele();
            Repeater1.DataBind();

            DataSetTableAdapters.TBLDENEYIMTableAdapter dtDeneyim = new DataSetTableAdapters.TBLDENEYIMTableAdapter();
            Repeater2.DataSource = dtDeneyim.DeneyimListesi();
            Repeater2.DataBind();

            DataSetTableAdapters.TBLEGITIMTableAdapter dtEgitim = new DataSetTableAdapters.TBLEGITIMTableAdapter();
            Repeater3.DataSource = dtEgitim.EgitimListesi();
            Repeater3.DataBind();

            DataSetTableAdapters.TBLHOBILERTableAdapter dtHobiler = new DataSetTableAdapters.TBLHOBILERTableAdapter();
            Repeater5.DataSource = dtHobiler.HobilerListele();
            Repeater5.DataBind();

            DataSetTableAdapters.TBLODULLERTableAdapter dtOdul = new DataSetTableAdapters.TBLODULLERTableAdapter();
            Repeater6.DataSource = dtOdul.OdulListesi();
            Repeater6.DataBind();

            DataSetTableAdapters.TBLYETENEKLERTableAdapter dtYetenek = new DataSetTableAdapters.TBLYETENEKLERTableAdapter();
            Repeater4.DataSource = dtYetenek.YetenekListesi();
            Repeater4.DataBind();

            DataSetTableAdapters.TBLHAKKIMDATableAdapter dtFotograf = new DataSetTableAdapters.TBLHAKKIMDATableAdapter();
            Repeater8.DataSource = dtFotograf.HakkimdaListele();
            Repeater8.DataBind();
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet1TableAdapters.HakkimdaTableAdapter dt = new DataSet1TableAdapters.HakkimdaTableAdapter();
            Repeater1.DataSource = dt.HakkimdaListele();
            Repeater1.DataBind();


            DataSet1TableAdapters.DeneyimlerTableAdapter dt2 = new DataSet1TableAdapters.DeneyimlerTableAdapter();
            Repeater2.DataSource = dt2.DeneyimListesi();
            Repeater2.DataBind();

            DataSet1TableAdapters.EgitimTableAdapter dt3 = new DataSet1TableAdapters.EgitimTableAdapter();
            Repeater3.DataSource = dt3.EgitimListele();
            Repeater3.DataBind();

            DataSet1TableAdapters.OdullerimTableAdapter dt4 = new DataSet1TableAdapters.OdullerimTableAdapter();
            Repeater4.DataSource = dt4.OdullerimListele();
            Repeater4.DataBind();

            DataSet1TableAdapters.HobilerimTableAdapter dt5 = new DataSet1TableAdapters.HobilerimTableAdapter();
            Repeater5.DataSource = dt5.HobilerListele();
            Repeater5.DataBind();

            DataSet1TableAdapters.YeteneklerimTableAdapter dt6 = new DataSet1TableAdapters.YeteneklerimTableAdapter();
            Repeater6.DataSource = dt6.YeteneklerimDoldur();
            Repeater6.DataBind();
        }
Exemplo n.º 5
0
        protected void OnUpdate(object sender, EventArgs e)
        {
            //Find the reference of the Repeater Item.
            RepeaterItem item          = (sender as LinkButton).Parent as RepeaterItem;
            int          ID            = int.Parse((item.FindControl("lblID") as Label).Text);
            string       subject       = (item.FindControl("txtSubj") as TextBox).Text.Trim();
            string       homework      = (item.FindControl("txtHomework") as TextBox).Text.Trim();
            var          checkHomework = (from c in db.Homeworks where c.ID.Equals(ID) select c).FirstOrDefault();

            checkHomework.Subject   = subject;
            checkHomework.Homework1 = homework;
            db.SubmitChanges();
            Repeater1.DataBind();
            Repeater2.DataBind();
            Repeater3.DataBind();
            Repeater4.DataBind();
            Repeater5.DataBind();
            Repeater6.DataBind();
            Repeater7.DataBind();
            Repeater8.DataBind();
            Repeater8.DataBind();
            Repeater9.DataBind();
            Repeater10.DataBind();
            Repeater11.DataBind();
            Repeater12.DataBind();
            Repeater13.DataBind();
            Repeater14.DataBind();
            Repeater15.DataBind();
        }
Exemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string strQuery = "";

        if (Request.QueryString["Id"] != null)
        {
            strQuery = Request.QueryString["Id"].ToString();
        }

        Call_Database ChapelDB = new Call_Database();

        Repeater1.DataSource = ChapelDB.dbChapelBuilding;
        Repeater1.DataBind();

        Repeater2.DataSource = ChapelDB.dbHarmonyWall;
        Repeater2.DataBind();

        Repeater3.DataSource = ChapelDB.dbHopeWall;
        Repeater3.DataBind();

        Repeater4.DataSource = ChapelDB.dbFaithWall;
        Repeater4.DataBind();

        Repeater5.DataSource = ChapelDB.dbGraceWall;
        Repeater5.DataBind();

        Repeater6.DataSource = ChapelDB.dbPeaceWall;
        Repeater6.DataBind();

        Repeater7.DataSource = ChapelDB.dbChairsBenches;
        Repeater7.DataBind();
    }
Exemplo n.º 7
0
    protected void bindlatest()
    {
        DataTable dtss = b_Ask.Sel("Status=2", "AddTime desc", null);

        Repeater6.DataSource = dtss;
        Repeater6.DataBind();
    }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet1TableAdapters.TBLHAKKIMDATableAdapter dt = new DataSet1TableAdapters.TBLHAKKIMDATableAdapter();
            Repeater1.DataSource = dt.HakkımdaListele();
            Repeater1.DataBind();

            DataSet1TableAdapters.TBLDENEYIMTableAdapter dt2 = new DataSet1TableAdapters.TBLDENEYIMTableAdapter();
            Repeater2.DataSource = dt2.DeneyimListesi();
            Repeater2.DataBind();

            DataSet1TableAdapters.TBLEGITIMTableAdapter dt3 = new DataSet1TableAdapters.TBLEGITIMTableAdapter();
            Repeater3.DataSource = dt3.EgitimListesi();
            Repeater3.DataBind();

            DataSet1TableAdapters.TBLYETENEKLERTableAdapter dt4 = new DataSet1TableAdapters.TBLYETENEKLERTableAdapter();
            Repeater4.DataSource = dt4.YetenekListesi();
            Repeater4.DataBind();

            DataSet1TableAdapters.TBLHOBILERTableAdapter dt5 = new DataSet1TableAdapters.TBLHOBILERTableAdapter();
            Repeater5.DataSource = dt5.HobiListesi();
            Repeater5.DataBind();

            DataSet1TableAdapters.TBLKULUPLERTableAdapter dt6 = new DataSet1TableAdapters.TBLKULUPLERTableAdapter();
            Repeater6.DataSource = dt6.KuluplerListesi();
            Repeater6.DataBind();

            DataSet1TableAdapters.TBLHAKKIMDATableAdapter dt7 = new DataSet1TableAdapters.TBLHAKKIMDATableAdapter();
            Repeater7.DataSource = dt7.HakkımdaListele();
            Repeater7.DataBind();
        }
Exemplo n.º 9
0
        protected void OnDelete(object sender, EventArgs e)
        {
            //Find the reference of the Repeater Item.
            RepeaterItem item = (sender as LinkButton).Parent as RepeaterItem;
            int          ID   = int.Parse((item.FindControl("lblID") as Label).Text);

            var checkHomework = (from c in db.Homeworks where c.ID.Equals(ID) select c).FirstOrDefault();

            db.Homeworks.DeleteOnSubmit(checkHomework);
            db.SubmitChanges();
            Repeater1.DataBind();
            Repeater2.DataBind();
            Repeater3.DataBind();
            Repeater4.DataBind();
            Repeater5.DataBind();
            Repeater6.DataBind();
            Repeater7.DataBind();
            Repeater8.DataBind();
            Repeater8.DataBind();
            Repeater9.DataBind();
            Repeater10.DataBind();
            Repeater11.DataBind();
            Repeater12.DataBind();
            Repeater13.DataBind();
            Repeater14.DataBind();
            Repeater15.DataBind();
        }
Exemplo n.º 10
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            //last week

            SqlDataSource2.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource3.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource4.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource5.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource6.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            //this week


            SqlDataSource7.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource8.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource9.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource10.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource11.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            //next week


            SqlDataSource12.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource13.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource14.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource15.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            SqlDataSource16.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue;

            Repeater1.DataBind();
            Repeater2.DataBind();
            Repeater3.DataBind();
            Repeater4.DataBind();
            Repeater5.DataBind();
            Repeater6.DataBind();
            Repeater7.DataBind();
            Repeater8.DataBind();
            Repeater8.DataBind();
            Repeater9.DataBind();
            Repeater10.DataBind();
            Repeater11.DataBind();
            Repeater12.DataBind();
            Repeater13.DataBind();
            Repeater14.DataBind();
            Repeater15.DataBind();
        }
Exemplo n.º 11
0
    public void exclusive()
    {
        DataTable dt = ad.gettop6exclusive();

        if (dt.Rows.Count != 0)
        {
            Repeater6.DataSource = dt;
            Repeater6.DataBind();
        }
    }
Exemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(6313);

        if (!IsPostBack && Request.QueryString["action"] == null)
        {
            Repeater1.DataSource = WTreeBLL.GetWLTField("1", "0");
            Repeater1.DataBind();
            Repeater4.DataSource = WTreeBLL.GetWLTField("1", "1");
            Repeater4.DataBind();

            Repeater2.DataSource = WTreeBLL.GetWLTField("2", "0");
            Repeater2.DataBind();
            Repeater5.DataSource = WTreeBLL.GetWLTField("2", "1");
            Repeater5.DataBind();

            Repeater3.DataSource = WTreeBLL.GetWLTField("3", "0");
            Repeater3.DataBind();
            Repeater6.DataSource = WTreeBLL.GetWLTField("3", "1");
            Repeater6.DataBind();
        }

        if (Request.QueryString["action"] == "save")
        {
            string f  = Request.QueryString["field"];
            string v  = Request.QueryString["visible"];
            string id = Request.QueryString["id"];

            //if (id == "1")
            //{
            //    if (f.IndexOf("|") == -1)
            //    {
            //        Response.Write(GetTran("007953", "修改失败,必须要有“|”符号!"));
            //        Response.End();
            //        return;
            //    }
            //}

            int hs = WTreeBLL.UpdWLTField(f, v, id);

            if (hs == 2)
            {
                Response.Write(GetTran("000222", "修改成功!"));
            }
            else
            {
                Response.Write(GetTran("000225", "修改失败!"));
            }

            Response.End();
        }
    }
Exemplo n.º 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Database db  = new Database();
            Lang     lan = new Lang();

            string showcaseSql       = "select * from Showcase where lang=@lang order by showorder";
            string aboutHomeSql      = "select * from Pages where PageKey=@homeAbout and lang=@lang";
            string partnerSql        = "select * from Partners where lang=@lang Order By ShowOrder";
            string PublicationsSql   = "select top(2) * from Publications where lang=@lang Order By id desc";
            string newsSql           = "select top(2) * from News where lang=@lang Order By id desc";
            string publicResearchSql = "select top(5) * from Library where lang=@lang Order By Id Desc";

            db.AddParameter("@lang", lan.getCurrentLang());
            db.AddParameter("@homeAbout", "HomeAbout");

            DataSet ds = db.ExecuteDataSet(showcaseSql + ";" + aboutHomeSql + ";" + partnerSql + ";" + PublicationsSql + ";" + newsSql + ";" + publicResearchSql);
            Repeater1.DataSource = ds.Tables[0];

            if (ds.Tables[0].Rows.Count < 1)
            {
                myCarousel.Visible = false;
            }
            else
            {
                myCarousel.Visible = true;
            }
            Repeater1.DataBind();



            Repeater2.DataSource = ds.Tables[1];
            Repeater2.DataBind();

            Repeater3.DataSource = ds.Tables[2];
            Repeater3.DataBind();

            Repeater4.DataSource = ds.Tables[3];
            Repeater4.DataBind();

            Repeater5.DataSource = ds.Tables[4];
            Repeater5.DataBind();

            Repeater6.DataSource = ds.Tables[5];
            Repeater6.DataBind();
            LoadPoll();
        }
    }
Exemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["KullaniciAd"] == null)
            {
                Response.Redirect("LoginPanel.aspx");
            }
            else
            {
                Response.Write("Hoşgeldiniz...." + Session["KullaniciAd"].ToString());
            }

            DataSet1TableAdapters.TBLHakkimdaTableAdapter dr =
                new DataSet1TableAdapters.TBLHakkimdaTableAdapter();
            Repeater1.DataSource = dr.HakkimdaListele();
            Repeater1.DataBind();

            DataSet1TableAdapters.TBLDeneyimTableAdapter dr1 =
                new DataSet1TableAdapters.TBLDeneyimTableAdapter();
            Repeater2.DataSource = dr1.DeneyimListesi();
            Repeater2.DataBind();

            DataSet1TableAdapters.TBLEgitimHTableAdapter dr2 =
                new DataSet1TableAdapters.TBLEgitimHTableAdapter();
            Repeater3.DataSource = dr2.EgitimBilgi();
            Repeater3.DataBind();

            DataSet1TableAdapters.TBLHobiTableAdapter dr3 =
                new DataSet1TableAdapters.TBLHobiTableAdapter();
            Repeater4.DataSource = dr3.hobiBilgi();
            Repeater4.DataBind();


            DataSet1TableAdapters.TBLSertifikaTableAdapter dr4 =
                new DataSet1TableAdapters.TBLSertifikaTableAdapter();
            Repeater5.DataSource = dr4.SertifikaBilgi();
            Repeater5.DataBind();


            DataSet1TableAdapters.TBLYeteneklerTableAdapter dr5 =
                new DataSet1TableAdapters.TBLYeteneklerTableAdapter();
            Repeater6.DataSource = dr5.YetenekBilgi();
            Repeater6.DataBind();


            DataSet1TableAdapters.TBLHakkimdaTableAdapter dr7 =
                new DataSet1TableAdapters.TBLHakkimdaTableAdapter();
            Repeater7.DataSource = dr7.HakkimdaListele();
            Repeater7.DataBind();
        }
Exemplo n.º 15
0
 public void loaddata()
 {
     SiteGroupCms.Dal.AdminDal admindal = new Dal.AdminDal();
     Repeater1.DataSource = admindal.GetpersonDT("job like '%总顾问%'", " sort asc, id asc");
     Repeater1.DataBind();
     Repeater2.DataSource = admindal.GetpersonDT("job like '%主管%'", "sort asc, id asc");
     Repeater2.DataBind();
     Repeater3.DataSource = admindal.Getdepartdt("商务组", "sort asc, id asc");
     Repeater3.DataBind();
     Repeater4.DataSource = admindal.Getdepartdt("美工组", "sort asc, id asc");
     Repeater4.DataBind();
     Repeater5.DataSource = admindal.Getdepartdt("程序组", "sort asc, id asc");
     Repeater5.DataBind();
     Repeater6.DataSource = admindal.Getdepartdt("往期成员", "sort asc, id asc");
     Repeater6.DataBind();
 }
Exemplo n.º 16
0
        protected void RadioButtonList3_SelectedIndexChanged(object sender, EventArgs e)
        {
            string database  = Session["DatabaseName"].ToString();
            string SQLSelect = "Select * from EBudget_WBS where EWID=" + ViewState["EWID"].ToString();

            if (RadioButtonList3.SelectedValue == "2")
            {
                string ResourceCode = WebModel.SItemName(database, SQLSelect, "ResourceCode");
                SqlDataSource8.SelectCommand = "Select * from EBudget_WBS where ResourceCode='" + ResourceCode + "'";
            }
            else if (RadioButtonList3.SelectedValue == "1")
            {
                SqlDataSource8.SelectCommand = "";
                Repeater6.DataBind();
            }
        }
Exemplo n.º 17
0
        protected void BindNewConsult()
        {
            int       total = 0;
            DataTable dt    = new DataTable();

            if (HttpRuntime.Cache[AppConst.AllNewConsult] == null)
            {
                dt = QA_QuestionBll.GetInstance().GetList(6, 1, "", 17, "replytimedown", ref total);
                HttpRuntime.Cache.Insert(AppConst.AllNewConsult, dt,
                                         null, DateTime.Now.AddMinutes(0), TimeSpan.Zero,
                                         System.Web.Caching.CacheItemPriority.High, null);
            }
            dt = HttpRuntime.Cache[AppConst.AllNewConsult] as DataTable;
            Repeater6.DataSource = dt;
            Repeater6.DataBind();
        }
Exemplo n.º 18
0
        protected void btnAddHomework6_Click(object sender, EventArgs e)
        {
            Homework homework = new Homework();

            homework.Class     = Convert.ToInt32(RadioButtonList1.SelectedValue);
            homework.Subject   = txtAddSubj6.Text;
            homework.Homework1 = txtAddHomework6.Text;
            string[] test = date6.Text.Split('/');
            string   ss   = test[1] + "/" + test[0];

            homework.Date = Convert.ToDateTime(ss);
            db.Homeworks.InsertOnSubmit(homework);
            db.SubmitChanges();
            txtAddSubj6.Text     = "";
            txtAddHomework6.Text = "";
            Repeater6.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Repeater1.DataSource = db.TBLHAKKINDA.ToList();
            Repeater1.DataBind();
            Repeater2.DataSource = db.TBLHAKKINDA.ToList();
            Repeater2.DataBind();
            Repeater3.DataSource = db.TBLHAKKINDA.ToList();
            Repeater3.DataBind();
            Repeater4.DataSource = db.TBLADRES.ToList();
            Repeater4.DataBind();
            Repeater5.DataSource = db.TBLADRES.ToList();
            Repeater5.DataBind();
            Repeater6.DataSource = db.TBLYETENEKLER.ToList();
            Repeater6.DataBind();

            Timer1.Enabled  = true;
            Timer1.Interval = 1000;
            Timer1.Tick    += new EventHandler <EventArgs>(Timer1_Tick);
        }
Exemplo n.º 20
0
        protected void info_show()
        {
            #region 条件
            BsonDocument where = new BsonDocument();
            where.Add("RequestIdentity", infoid);
            #endregion

            #region 排序
            string[] orderby = { "Time" };
            #endregion

            #region 字段
            BsonDocument fields = new BsonDocument();
            #endregion

            //查询数据库

            List <ClientExceptionInfo> list1 = MongoDBUtil.GetPaged <ClientExceptionInfo>(dbName, "ClientExceptionInfo", where, orderby, fields, 1, 20);
            Repeater1.DataSource = list1;
            Repeater1.DataBind();


            List <ClientInvokeInfo> list2 = MongoDBUtil.GetPaged <ClientInvokeInfo>(dbName, "ClientInvokeInfo", where, orderby, fields, 1, 20);
            Repeater2.DataSource = list2;
            Repeater2.DataBind();


            List <ClientMessageInfo> list3 = MongoDBUtil.GetPaged <ClientMessageInfo>(dbName, "ClientMessageInfo", where, orderby, fields, 1, 20);
            Repeater3.DataSource = list3;
            Repeater3.DataBind();

            List <ServerExceptionInfo> list4 = MongoDBUtil.GetPaged <ServerExceptionInfo>(dbName, "ServerExceptionInfo", where, orderby, fields, 1, 20);
            Repeater4.DataSource = list4;
            Repeater4.DataBind();

            List <ServerInvokeInfo> list5 = MongoDBUtil.GetPaged <ServerInvokeInfo>(dbName, "ServerInvokeInfo", where, orderby, fields, 1, 20);
            Repeater5.DataSource = list5;
            Repeater5.DataBind();

            List <ServerMessageInfo> list6 = MongoDBUtil.GetPaged <ServerMessageInfo>(dbName, "ServerMessageInfo", where, orderby, fields, 1, 20);
            Repeater6.DataSource = list6;
            Repeater6.DataBind();
        }
Exemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Repeater1.DataSource = db.TBL_anasayfaVERILER.ToList();
            Repeater1.DataBind();

            Repeater2.DataSource = db.TBL_anasayfaVERILER.ToList();
            Repeater2.DataBind();

            Repeater3.DataSource = db.TBL_anasayfaVERILER.ToList();
            Repeater3.DataBind();

            Repeater4.DataSource = db.TBL_anasayfaVERILER.ToList();
            Repeater4.DataBind();

            Repeater5.DataSource = db.TBL_anasayfaVERILER.ToList();
            Repeater5.DataBind();

            Repeater6.DataSource = db.TBL_anasayfaVERILER.ToList();
            Repeater6.DataBind();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     DataSet1TableAdapters.TBLHAKKIMDATableAdapter dt = new DataSet1TableAdapters.TBLHAKKIMDATableAdapter();
     Repeater1.DataSource = dt.HakkimdaListele();
     Repeater1.DataBind();
     DataSet1TableAdapters.TBLDENEYIMTableAdapter dt2 = new DataSet1TableAdapters.TBLDENEYIMTableAdapter();
     Repeater2.DataSource = dt2.DeneyimListele();
     Repeater2.DataBind();
     DataSet1TableAdapters.TBLEGITIMTableAdapter dt3 = new DataSet1TableAdapters.TBLEGITIMTableAdapter();
     Repeater3.DataSource = dt3.EgitimListele();
     Repeater3.DataBind();
     DataSet1TableAdapters.TBLHOBILERTableAdapter dt4 = new DataSet1TableAdapters.TBLHOBILERTableAdapter();
     Repeater4.DataSource = dt4.HobiListele();
     Repeater4.DataBind();
     DataSet1TableAdapters.TBLSERTIFIKALARTableAdapter dt5 = new DataSet1TableAdapters.TBLSERTIFIKALARTableAdapter();
     Repeater5.DataSource = dt5.SertifikalarListele();
     Repeater5.DataBind();
     DataSet1TableAdapters.TBLYETENEKLERTableAdapter dt6 = new DataSet1TableAdapters.TBLYETENEKLERTableAdapter();
     Repeater6.DataSource = dt6.YeteneklerListele();
     Repeater6.DataBind();
 }
Exemplo n.º 23
0
    private void fill_latest_items()
    {
        try
        {
            var id = (from a in linq_obj.product_masters
                      orderby a.intGlCode descending
                      select new
            {
                code = a.intGlCode,
                p_img = "./upload/" + a.main_images,
                p_name = a.product_name,
                p_price = a.actual_price
            }).Take(10).ToList();

            Repeater6.DataSource = id;
            Repeater6.DataBind();
        }
        catch (Exception ex)
        {
        }
    }
Exemplo n.º 24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Repeater1.DataSource = db.TBLHAKKIMDA.ToList();
     Repeater1.DataBind();
     Repeater2.DataSource = db.TBLHAKKIMDA.ToList();
     Repeater2.DataBind();
     Repeater3.DataSource = db.TBLYETENEKLER.ToList();
     Repeater3.DataBind();
     Repeater4.DataSource = db.TBLHAKKIMDA.ToList();
     Repeater4.DataBind();
     Repeater5.DataSource = db.TBLHAKKIMDA.ToList();
     Repeater5.DataBind();
     Repeater6.DataSource = db.TBLHAKKIMDA.ToList();
     Repeater6.DataBind();
     Repeater7.DataSource = db.TBLHAKKIMDA.ToList();
     Repeater7.DataBind();
     Repeater8.DataSource = db.TBLHAKKIMDA.ToList();
     Repeater8.DataBind();
     Repeater9.DataSource = db.TBLHAKKIMDA.ToList();
     Repeater9.DataBind();
 }
Exemplo n.º 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Hakkımızda Kısmını Listeleme
            DataSet1TableAdapters.Tbl_HakkimdaTableAdapter db = new DataSet1TableAdapters.Tbl_HakkimdaTableAdapter();
            Repeater1.DataSource = db.HakkimdaListele();
            Repeater1.DataBind();

            //Deneyimlerim Kısmını Listeleme
            DataSet1TableAdapters.Tbl_DeneyimTableAdapter db2 = new DataSet1TableAdapters.Tbl_DeneyimTableAdapter();
            Repeater2.DataSource = db2.DeneyimListesi();
            Repeater2.DataBind();

            //Eğitim Kismını Listeleme
            DataSet1TableAdapters.Tbl_EgitimTableAdapter db3 = new DataSet1TableAdapters.Tbl_EgitimTableAdapter();
            Repeater3.DataSource = db3.EgitimListesi();
            Repeater3.DataBind();

            //Hobi Kısmını Listeleme
            DataSet1TableAdapters.Tbl_HobilerTableAdapter db4 = new DataSet1TableAdapters.Tbl_HobilerTableAdapter();
            Repeater4.DataSource = db4.HobiListesi();
            Repeater4.DataBind();

            //Konferans Kısmını Listeleme
            DataSet1TableAdapters.Tbl_KonferanslarTableAdapter db5 = new DataSet1TableAdapters.Tbl_KonferanslarTableAdapter();
            Repeater5.DataSource = db5.KonferansListesi();
            Repeater5.DataBind();

            //Yetenek Kısmını Listeleme
            DataSet1TableAdapters.Tbl_YeteneklerTableAdapter db6 = new DataSet1TableAdapters.Tbl_YeteneklerTableAdapter();
            Repeater6.DataSource = db6.YetenekListesi();
            Repeater6.DataBind();

            // Resim Ekleme
            DataSet1TableAdapters.Tbl_HakkimdaTableAdapter dt7 = new DataSet1TableAdapters.Tbl_HakkimdaTableAdapter();
            Repeater7.DataSource = dt7.HakkimdaListele();
            Repeater7.DataBind();
        }
Exemplo n.º 26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Hakkımda
            DataSet1TableAdapters.tblHakkimdaTableAdapter dt = new DataSet1TableAdapters.tblHakkimdaTableAdapter();
            Repeater1.DataSource = dt.hakkimdaListele();
            Repeater1.DataBind();

            //Deneyim
            DataSet1TableAdapters.tblDeneyimTableAdapter dt2 = new DataSet1TableAdapters.tblDeneyimTableAdapter();
            Repeater2.DataSource = dt2.DeneyimListele();
            Repeater2.DataBind();

            //Eğitim
            DataSet1TableAdapters.tblEgitmTableAdapter dt3 = new DataSet1TableAdapters.tblEgitmTableAdapter();
            Repeater3.DataSource = dt3.EgitimListele();
            Repeater3.DataBind();

            //Yetenek
            DataSet1TableAdapters.tblYetenekTableAdapter dt4 = new DataSet1TableAdapters.tblYetenekTableAdapter();
            Repeater4.DataSource = dt4.YetenekListesi();
            Repeater4.DataBind();

            //Hobi
            DataSet1TableAdapters.tblHobiTableAdapter dt5 = new DataSet1TableAdapters.tblHobiTableAdapter();
            Repeater5.DataSource = dt5.HobiListesi();
            Repeater5.DataBind();

            //Sertifika
            DataSet1TableAdapters.tblSertifikalarTableAdapter dt6 = new DataSet1TableAdapters.tblSertifikalarTableAdapter();
            Repeater6.DataSource = dt6.SertifikaListesi();
            Repeater6.DataBind();

            //Fotoğraf
            DataSet1TableAdapters.tblAdminTableAdapter dt7 = new DataSet1TableAdapters.tblAdminTableAdapter();
            Repeater7.DataSource = dt7.KullaniciListesi();
            Repeater7.DataBind();
        }
Exemplo n.º 27
0
    private void LoadSource()
    {
        int count = 0;

        DataSet   ds1 = m_IndexBLL.GetList("[typeId]=19 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dt1 = ds1.Tables[0].Clone();

        for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
        {
            if (count >= 8)
            {
                break;
            }
            if (m_UserLogin.LoginID.ToString().Trim() == ds1.Tables[0].Rows[i]["userId"].ToString().Trim())
            {
                dt1.Rows.Add(ds1.Tables[0].Rows[i].ItemArray);
                count++;
                continue;
            }
            if (null != ds1.Tables[0].Rows[i]["readUser"] && ds1.Tables[0].Rows[i]["readUser"] != DBNull.Value)
            {
                string[] str = ds1.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                for (int j = 0; j < str.Length; j++)
                {
                    if (m_UserLogin.LoginID.ToString().Trim() == str[j])
                    {
                        dt1.Rows.Add(ds1.Tables[0].Rows[i].ItemArray);
                        count++;
                        break;
                    }
                }
            }
        }
        Repeater1.DataSource = dt1;
        Repeater1.DataBind();

        count = 0;
        DataSet   ds2 = m_IndexBLL.GetList("[typeId]=20 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dt2 = ds2.Tables[0].Clone();

        for (int i = 0; i < ds2.Tables[0].Rows.Count; i++)
        {
            if (count >= 8)
            {
                break;
            }
            if (m_UserLogin.LoginID.ToString().Trim() == ds2.Tables[0].Rows[i]["userId"].ToString().Trim())
            {
                dt2.Rows.Add(ds2.Tables[0].Rows[i].ItemArray);
                count++;
                continue;
            }
            if (null != ds2.Tables[0].Rows[i]["readUser"] && ds2.Tables[0].Rows[i]["readUser"] != DBNull.Value)
            {
                string[] str = ds2.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                for (int j = 0; j < str.Length; j++)
                {
                    if (m_UserLogin.LoginID.ToString().Trim() == str[j])
                    {
                        dt2.Rows.Add(ds2.Tables[0].Rows[i].ItemArray);
                        count++;
                        break;
                    }
                }
            }
        }
        Repeater2.DataSource = dt2;
        Repeater2.DataBind();

        count = 0;
        DataSet   ds3 = m_IndexBLL.GetList("[typeId]=21 and del=0 and bum_ba=0 ORDER BY [setDate] DESC");
        DataTable dt3 = ds3.Tables[0].Clone();

        for (int i = 0; i < ds3.Tables[0].Rows.Count; i++)
        {
            if (count >= 8)
            {
                break;
            }
            if (m_UserLogin.LoginID.ToString().Trim() == ds3.Tables[0].Rows[i]["userId"].ToString().Trim())
            {
                dt3.Rows.Add(ds3.Tables[0].Rows[i].ItemArray);
                count++;
                continue;
            }
            if (null != ds3.Tables[0].Rows[i]["readUser"] && ds3.Tables[0].Rows[i]["readUser"] != DBNull.Value)
            {
                string[] str = ds3.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                for (int j = 0; j < str.Length; j++)
                {
                    if (m_UserLogin.LoginID.ToString().Trim() == str[j])
                    {
                        dt3.Rows.Add(ds3.Tables[0].Rows[i].ItemArray);
                        count++;
                        break;
                    }
                }
            }
        }
        Repeater3.DataSource = dt3;
        Repeater3.DataBind();

        count = 0;
        DataSet   ds4 = m_IndexBLL.GetList("[typeId]=22 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dt4 = ds4.Tables[0].Clone();

        for (int i = 0; i < ds4.Tables[0].Rows.Count; i++)
        {
            if (count >= 8)
            {
                break;
            }
            if (m_UserLogin.LoginID.ToString().Trim() == ds4.Tables[0].Rows[i]["userId"].ToString().Trim())
            {
                dt4.Rows.Add(ds4.Tables[0].Rows[i].ItemArray);
                count++;
                continue;
            }
            if (null != ds4.Tables[0].Rows[i]["readUser"] && ds4.Tables[0].Rows[i]["readUser"] != DBNull.Value)
            {
                string[] str = ds4.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                for (int j = 0; j < str.Length; j++)
                {
                    if (m_UserLogin.LoginID.ToString().Trim() == str[j])
                    {
                        dt4.Rows.Add(ds4.Tables[0].Rows[i].ItemArray);
                        count++;
                        break;
                    }
                }
            }
        }
        Repeater4.DataSource = dt4;
        Repeater4.DataBind();

        count = 0;
        DataSet   ds5 = m_IndexBLL.GetList("[typeId]=23 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dt5 = ds5.Tables[0].Clone();

        for (int i = 0; i < ds5.Tables[0].Rows.Count; i++)
        {
            if (count >= 8)
            {
                break;
            }
            if (m_UserLogin.LoginID.ToString().Trim() == ds5.Tables[0].Rows[i]["userId"].ToString().Trim())
            {
                dt5.Rows.Add(ds5.Tables[0].Rows[i].ItemArray);
                count++;
                continue;
            }
            if (null != ds5.Tables[0].Rows[i]["readUser"] && ds5.Tables[0].Rows[i]["readUser"] != DBNull.Value)
            {
                string[] str = ds5.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                for (int j = 0; j < str.Length; j++)
                {
                    if (m_UserLogin.LoginID.ToString().Trim() == str[j])
                    {
                        dt5.Rows.Add(ds5.Tables[0].Rows[i].ItemArray);
                        count++;
                        break;
                    }
                }
            }
        }
        Repeater5.DataSource = dt5;
        Repeater5.DataBind();

        count = 0;
        DataSet   ds6 = m_IndexBLL.GetList("[typeId]=24 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dt6 = ds6.Tables[0].Clone();

        for (int i = 0; i < ds6.Tables[0].Rows.Count; i++)
        {
            if (count >= 8)
            {
                break;
            }
            if (m_UserLogin.LoginID.ToString().Trim() == ds6.Tables[0].Rows[i]["userId"].ToString().Trim())
            {
                dt6.Rows.Add(ds6.Tables[0].Rows[i].ItemArray);
                count++;
                continue;
            }
            if (null != ds6.Tables[0].Rows[i]["readUser"] && ds6.Tables[0].Rows[i]["readUser"] != DBNull.Value)
            {
                string[] str = ds6.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                for (int j = 0; j < str.Length; j++)
                {
                    if (m_UserLogin.LoginID.ToString().Trim() == str[j])
                    {
                        dt6.Rows.Add(ds6.Tables[0].Rows[i].ItemArray);
                        count++;
                        break;
                    }
                }
            }
        }
        Repeater6.DataSource = dt6;
        Repeater6.DataBind();

        count = 0;
        DataSet   ds7 = m_IndexBLL.GetList("[typeId]=25 and del=0 and IsDel=0 ORDER BY [setDate] DESC");
        DataTable dt7 = ds7.Tables[0].Clone();

        for (int i = 0; i < ds6.Tables[0].Rows.Count; i++)
        {
            if (count >= 8)
            {
                break;
            }
            if (m_UserLogin.LoginID.ToString().Trim() == ds7.Tables[0].Rows[i]["userId"].ToString().Trim())
            {
                dt7.Rows.Add(ds7.Tables[0].Rows[i].ItemArray);
                count++;
                continue;
            }
            if (null != ds7.Tables[0].Rows[i]["readUser"] && ds7.Tables[0].Rows[i]["readUser"] != DBNull.Value)
            {
                string[] str = ds7.Tables[0].Rows[i]["readUser"].ToString().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                for (int j = 0; j < str.Length; j++)
                {
                    if (m_UserLogin.LoginID.ToString().Trim() == str[j])
                    {
                        dt7.Rows.Add(ds7.Tables[0].Rows[i].ItemArray);
                        count++;
                        break;
                    }
                }
            }
        }
        Repeater7.DataSource = dt7;
        Repeater7.DataBind();
    }
Exemplo n.º 28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            using (SqlConnection conn = new DB().GetConnection())
            {
                // 焦点图
                string     sql = "select * from Focuses where  Valid=1 order by orders desc";
                SqlCommand cmd = new SqlCommand(sql, conn);
                conn.Open();
                SqlDataReader rd = cmd.ExecuteReader();
                Repeater1.DataSource = rd;
                Repeater1.DataBind();
                rd.Close();

                // GridView1 教师通知
                cmd.CommandText = "select top 5 ID,Title,CDT from Articles where SubID = 6 and Status =1 and Finished = 1 Order by Orders Desc,CDT Desc,ID Desc";
                rd = cmd.ExecuteReader();
                Repeater4.DataSource = rd;
                Repeater4.DataBind();
                rd.Close();

                //cmd.CommandText = "select top 5 ID,Title,CDT from Articles where SubID = 6 and Status =1 and Finished = 1 Order by Orders Desc,CDT Desc,ID Desc";
                //rd = cmd.ExecuteReader();
                //GridView1.DataSource = rd;
                //GridView1.DataBind();
                //rd.Close();

                // GridView2 学生通知
                cmd.CommandText = "select top 5 ID,Title,CDT from Articles where SubID = 7 and Status =1 and Finished = 1 Order by Orders Desc,CDT Desc,ID Desc";
                rd = cmd.ExecuteReader();
                Repeater3.DataSource = rd;
                Repeater3.DataBind();
                rd.Close();

                //cmd.CommandText = "select top 5 ID,Title,CDT from Articles where SubID = 7 and Status =1 and Finished = 1 Order by Orders Desc,CDT Desc,ID Desc";
                //rd = cmd.ExecuteReader();
                //GridView2.DataSource = rd;
                //GridView2.DataBind();
                //rd.Close();

                // GridView3 学院动态
                //cmd.CommandText = "select top 5 ID,Title,CDT from Articles where SubID = 5 and Status =1 and Finished = 1 Order by Orders Desc,CDT Desc,ID Desc";
                //rd = cmd.ExecuteReader();
                //GridView3.DataSource = rd;
                //GridView3.DataBind();
                //rd.Close();

                // GridView3 学院动态
                cmd.CommandText = "select top 2 ID,Title,CDT from Articles where SubID = 5 and Status =1 and Finished = 1 Order by Orders Desc,CDT Desc,ID Desc";
                rd = cmd.ExecuteReader();
                Repeater5.DataSource = rd;
                Repeater5.DataBind();
                rd.Close();

                //// GridView4 作品展示
                //cmd.CommandText = "select top 4 ID,Title,Abs,Author,CoverPhotoURL,CDT,Catalog from Shows where Status =1 Order by Orders Desc,CDT Desc,ID Desc";
                //rd = cmd.ExecuteReader();
                //GridView4.DataSource = rd;
                //GridView4.DataBind();
                //rd.Close();

                // GridView4 作品展示
                //cmd.CommandText = "select top 4 ID,Title,Abs,Author,CoverPhotoURL,CDT,Catalog from Shows where Status =1 Order by Orders Desc,CDT Desc,ID Desc";
                //rd = cmd.ExecuteReader();
                //Repeater2.DataSource = rd;
                //Repeater2.DataBind();
                //rd.Close();

                // GridView5 活动剪影
                //cmd.CommandText = "select top 5 ID,Title,CDT from Articles where SubID = 39 and Status =1 and Finished = 1 Order by Orders Desc,CDT Desc,ID Desc";
                //rd = cmd.ExecuteReader();
                //GridView5.DataSource = rd;
                //GridView5.DataBind();
                //rd.Close();

                // GridView5 活动剪影
                cmd.CommandText = "select top 4 ID,Title,CDT from Articles where SubID = 39 and Status =1 and Finished = 1 Order by Orders Desc,CDT Desc,ID Desc";
                rd = cmd.ExecuteReader();
                Repeater6.DataSource = rd;
                Repeater6.DataBind();
                rd.Close();

                conn.Close();
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string strQuery = "";
        string strVideo = "";

        if (Request.QueryString["Id"] != null)
        {
            strQuery = Request.QueryString["Id"].ToString();
        }

        Call_Database FoundersDB = new Call_Database();

        Repeater1.DataSource = FoundersDB.dbFounders;
        Repeater1.DataBind();


        Call_Database VideoDB = new Call_Database();

        strVideo = VideoDB.VideoLOAD();

        urIframe.Attributes.Add("src", strVideo.ToString());

        Call_Database CornerstoneDB = new Call_Database();

        Repeater2.DataSource = CornerstoneDB.dbCornerstone;
        Repeater2.DataBind();

        Call_Database ScholarshipsDB = new Call_Database();

        Repeater3.DataSource = ScholarshipsDB.dbScholarships;
        Repeater3.DataBind();

        Call_Database RoundtableDB = new Call_Database();

        Repeater4.DataSource = RoundtableDB.dbRoundtable;
        Repeater4.DataBind();

        Call_Database PresidentsTabDB = new Call_Database();

        Repeater5.DataSource = PresidentsTabDB.dbPresidentsTab;
        Repeater5.DataBind();

        Call_Database QuadrangleTabDB = new Call_Database();

        Repeater6.DataSource = QuadrangleTabDB.dbQuadrangleTab;
        Repeater6.DataBind();

        Call_Database BlueGoldTabDB = new Call_Database();

        Repeater7.DataSource = BlueGoldTabDB.dbBlueGoldTab;
        Repeater7.DataBind();

        Call_Database CenturyTabDB = new Call_Database();

        Repeater8.DataSource = CenturyTabDB.dbCenturyTab;
        Repeater8.DataBind();

        Call_Database OtherDonorsTabDB = new Call_Database();

        Repeater9.DataSource = OtherDonorsTabDB.dbOtherDonorsTab;
        Repeater9.DataBind();
    }
Exemplo n.º 30
0
    protected void FillInvoicesList(DataTable dt_invoices)
    {
        Invoice[] invoices   = new Invoice[dt_invoices.Rows.Count];
        int[]     invoiceIDs = new int[dt_invoices.Rows.Count];


        int countShowing = 0;

        dt_invoices.Columns.Add("message_reversed_wiped", typeof(string));
        dt_invoices.Columns.Add("td_name", typeof(string));                // for use of td 'name' tag to hide all reversed or hide all rejected
        dt_invoices.Columns.Add("style_display", typeof(string));          // to set initially reversed and/or rejected as hidden
        dt_invoices.Columns.Add("inv_debtor", typeof(string));
        dt_invoices.Columns.Add("inv_total_due", typeof(decimal));
        for (int i = 0; i < dt_invoices.Rows.Count; i++)
        {
            Invoice invoice = InvoiceDB.LoadAll(dt_invoices.Rows[i]);

            invoiceIDs[i] = invoice.InvoiceID;
            invoices[i]   = invoice;

            if (invoice.ReversedBy != null)
            {
                dt_invoices.Rows[i]["message_reversed_wiped"] = "Reversed";
                dt_invoices.Rows[i]["td_name"]       = "td_reversed";
                dt_invoices.Rows[i]["style_display"] = "none";
            }
            else if (invoice.PayerOrganisation != null && (invoice.PayerOrganisation.OrganisationID == -1 || invoice.PayerOrganisation.OrganisationID == -2) && invoice.Total > 0 && invoice.CreditNotesTotal >= invoice.Total)
            {
                dt_invoices.Rows[i]["message_reversed_wiped"] = "Rejected";
                dt_invoices.Rows[i]["td_name"]       = "td_rejected";
                dt_invoices.Rows[i]["style_display"] = "none";
            }
            else
            {
                countShowing++;
            }

            if (invoice.PayerOrganisation != null)
            {
                dt_invoices.Rows[i]["inv_debtor"] = invoice.PayerOrganisation.Name;
            }
            else if (invoice.PayerPatient != null)
            {
                dt_invoices.Rows[i]["inv_debtor"] = invoice.PayerPatient.Person.FullnameWithoutMiddlename;
            }
            else
            {
                dt_invoices.Rows[i]["inv_debtor"] = invoice.Booking != null &&
                                                    invoice.Booking.Patient != null &&
                                                    invoice.Booking.Patient.Person != null    ? invoice.Booking.Patient.Person.FullnameWithoutMiddlename : string.Empty; // empty for invoices without bookings
            }
            dt_invoices.Rows[i]["inv_total_due"] = invoice.TotalDue.ToString();
        }


        // single db call to get invoicelines into hashtable lookup by invoice
        Hashtable invoiceLinesHash = InvoiceLineDB.GetBulkInvoiceLinesByInvoiceID(invoices);

        dt_invoices.Columns.Add("inv_lines_text", typeof(string));
        for (int i = 0; i < dt_invoices.Rows.Count; i++)
        {
            Invoice       invoice  = InvoiceDB.LoadAll(dt_invoices.Rows[i]);
            InvoiceLine[] invLines = (InvoiceLine[])invoiceLinesHash[invoice.InvoiceID];

            bool showAreaTreated      = invoice.PayerOrganisation != null && (invoice.PayerOrganisation.OrganisationID == -2 || invoice.PayerOrganisation.OrganisationType.OrganisationTypeID == 150);
            bool showServiceReference = invoice.PayerOrganisation != null && invoice.PayerOrganisation.OrganisationType.OrganisationTypeID == 150;

            string output = "<ul style=\"padding-left:14px;\">";
            foreach (InvoiceLine invLine in invLines)
            {
                string extras = string.Empty;
                if (showAreaTreated || showServiceReference)
                {
                    string linkAreaTreated      = "<a title=\"Edit\" onclick=\"javascript:window.showModalDialog('Invoice_UpdateAreaTreatedV2.aspx?inv_line=" + invLine.InvoiceLineID + "', '', 'dialogWidth:600px;dialogHeight:275px;center:yes;resizable:no; scroll:no');window.location.href=window.location.href;return false;\" href=\"#\">Edit</a>";
                    string linkServiceReference = "<a title=\"Edit\" onclick=\"javascript:window.showModalDialog('Invoice_UpdateServiceReferenceV2.aspx?inv_line=" + invLine.InvoiceLineID + "', '', 'dialogWidth:600px;dialogHeight:275px;center:yes;resizable:no; scroll:no');window.location.href=window.location.href;return false;\" href=\"#\">Edit</a>";

                    extras += "<table>";
                    if (showAreaTreated)
                    {
                        extras += "<tr><td>Area Treated</td><td style=\"min-width:10px;\"></td><td>" + (invLine.AreaTreated.Length == 0 ? "[EMPTY]" : invLine.AreaTreated) + "</td><td style=\"min-width:10px;\"></td><td>" + linkAreaTreated + "</td></tr>";
                    }
                    if (showServiceReference)
                    {
                        extras += "<tr><td>Service Reference</td><td style=\"min-width:10px;\"></td><td>" + (invLine.ServiceReference.Length == 0 ? "[EMPTY]" : invLine.ServiceReference) + "</td><td style=\"min-width:10px;\"></td><td>" + linkServiceReference + "</td></tr>";
                    }
                    extras += "</table>";
                }

                string itemDescr = string.Empty;
                if (invLine.Offering != null)
                {
                    itemDescr = invLine.Offering.Name;
                }
                if (invLine.Credit != null)
                {
                    itemDescr = "Voucher: <i>" + invLine.Credit.VoucherDescr + "</i>";
                }


                output += "<li>" + itemDescr + " x " + ((invLine.Quantity % 1) == 0 ? Convert.ToInt32(invLine.Quantity) : invLine.Quantity) + " = " + invLine.Price + (invLine.Tax == 0 ? "" : " (<i>Inc GST</i>)") + (invLine.Patient.Person == null ? "" : " [" + invLine.Patient.Person.FullnameWithoutMiddlename + "]") + extras + "</li>";
            }
            output += "</ul>";

            dt_invoices.Rows[i]["inv_lines_text"] = output;

            if (countShowing == 0)
            {
                dt_invoices.Rows[i]["style_display"] = "";
            }
        }


        //get approximate page width...
        // 194 = row titles
        // average row = 340 px (about 220-440)
        // add 70px for good measure
        int pageWidth = 194 + 365 * (countShowing == 0 ? 1 : countShowing) + 120;

        Page.ClientScript.RegisterStartupScript(this.GetType(), "resize_window", "<script language=javascript>window.resizeTo(  (" + pageWidth + "+ window.outerWidth - window.innerWidth) < screen.width ? (" + pageWidth + " + window.outerWidth - window.innerWidth) : screen.width , window.outerHeight);</script>");



        if (dt_invoices.Rows.Count <= 1)
        {
            divToggleShowReversedRejected.Visible = false;
        }
        else if (countShowing == 0)
        {
            chkShowReversed.Checked = true;
            chkShowRejected.Checked = true;
        }


        // now databind
        Repeater1.DataSource  = dt_invoices; Repeater1.DataBind();
        Repeater2.DataSource  = dt_invoices; Repeater2.DataBind();
        Repeater3.DataSource  = dt_invoices; Repeater3.DataBind();
        Repeater4.DataSource  = dt_invoices; Repeater4.DataBind();
        Repeater5.DataSource  = dt_invoices; Repeater5.DataBind();
        Repeater6.DataSource  = dt_invoices; Repeater6.DataBind();
        Repeater7.DataSource  = dt_invoices; Repeater7.DataBind();
        Repeater8.DataSource  = dt_invoices; Repeater8.DataBind();
        Repeater9.DataSource  = dt_invoices; Repeater9.DataBind();
        Repeater10.DataSource = dt_invoices; Repeater10.DataBind();
        Repeater11.DataSource = dt_invoices; Repeater11.DataBind();
        Repeater12.DataSource = dt_invoices; Repeater12.DataBind();
        Repeater13.DataSource = dt_invoices; Repeater13.DataBind();
        Repeater14.DataSource = dt_invoices; Repeater14.DataBind();
        Repeater15.DataSource = dt_invoices; Repeater15.DataBind();
        Repeater16.DataSource = dt_invoices; Repeater16.DataBind();
        Repeater17.DataSource = dt_invoices; Repeater17.DataBind();
        Repeater18.DataSource = dt_invoices; Repeater18.DataBind();
        Repeater19.DataSource = dt_invoices; Repeater19.DataBind();


        // non booking invoices (ie standard invoices) will not have a booking
        Booking booking = invoices[0].Booking;

        if (booking != null)
        {
            string patientText = string.Empty;
            if (booking != null && booking.Patient != null)
            {
                patientText = booking.Patient.Person.FullnameWithoutMiddlename;
            }
            else if (invoices[0].PayerPatient != null)
            {
                patientText = invoices[0].PayerPatient.Person.FullnameWithoutMiddlename;
            }
            else
            {
                patientText = "< No patient >";
            }


            // show booking info
            lblBooking_Org.Text                = booking.Organisation.Name;
            lblBooking_Provider.Text           = booking.Provider.Person.FullnameWithoutMiddlename;
            lblBooking_Patient.Text            = patientText;  // booking.Patient.Person.FullnameWithoutMiddlename;
            lblBooking_Offering.Text           = booking.Offering == null ? "< No service >" : booking.Offering.Name;
            lblBooking_BookingStatus.Text      = booking.BookingStatus.Descr;
            lblBooking_Time.Text               = booking.DateStart.Date.ToString("dd MMM yyyy") + " - " + booking.DateStart.ToString("h:mm") + (booking.DateStart.Hour < 12 ? "am" : "pm") + "-" + booking.DateEnd.ToString("h:mm") + (booking.DateEnd.Hour < 12 ? "am" : "pm");
            lblBooking_PatientMissedAppt.Text  = booking.IsPatientMissedAppt ? "Yes" : "No";
            lblBooking_ProviderMissedAppt.Text = booking.IsProviderMissedAppt ? "Yes" : "No";
            lblBooking_Emergency.Text          = booking.IsEmergency ? "Yes" : "No";
            lblBooking_Notes.Text              = Note.GetPopupLinkTextV2(15, booking.EntityID, booking.NoteCount > 0, true, 1050, 530, "images/notes-bw-24.jpg", "images/notes-24.png");
        }
        else
        {
            booking_space.Visible                  = false;
            booking_title.Visible                  = false;
            booking_offering.Visible               = false;
            booking_patient.Visible                = false;
            booking_provider.Visible               = false;
            booking_org.Visible                    = false;
            booking_status.Visible                 = false;
            booking_apptmt_time.Visible            = false;
            booking_patiemt_missed_apptmt.Visible  = false;
            booking_provider_missed_apptmt.Visible = false;
            booking_isemergency.Visible            = false;
            booking_notes.Visible                  = false;
        }
    }