Example #1
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();
        }
    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();
    }
Example #3
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();
        }
Example #4
0
    /// <summary>
    /// 工程结算情况
    /// </summary>
    private void Bindgxjsqk()
    {
        string  strsql = "select * from tunnel_newstype where IsDel=0 and parentid=25";
        DataSet das    = Tunnel.Data.DbHelperSQL.Query(strsql);

        if (das.Tables[0].Rows.Count > 0)
        {
            Repeater14.DataSource = das;
            Repeater14.DataBind();
            Repeater14.Visible = true;
            string  strsql2 = "select top " + gettop(8 - das.Tables[0].Rows.Count) + " * from tunnel_index where typeid=25 and del=0 and IsDel=0 order by setdate desc ";
            DataSet das2    = Tunnel.Data.DbHelperSQL.Query(strsql2);
            Repeater7.DataSource = das2;
            Repeater7.DataBind();
        }
        else
        {
            string  strsql2 = "select top 8 * from tunnel_index where typeid=25 and del=0 and IsDel=0 order by setdate desc";
            DataSet das2    = Tunnel.Data.DbHelperSQL.Query(strsql2);
            Repeater7.DataSource = das2;
            Repeater7.DataBind();
            Repeater7.Visible  = true;
            Repeater14.Visible = false;
        }
    }
Example #5
0
    protected void bindRepeater7()
    {
        DataTable dt = b_Ask.SelUser();  //根据被采纳问题数取知道之星

        Repeater7.DataSource = dt;
        Repeater7.DataBind();
    }
Example #6
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();
        }
Example #7
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();
        }
Example #8
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();
        }
Example #9
0
    private void LoadPoll()
    {
        string pollSql = "select top(1) Id,AddDate,Title from Poll where ShowInHome=1  Order By AddDate Desc, Id Desc";

        if (Page.Culture.Contains("Arabic"))
        {
            pollSql = "select top(1) Id,AddDate,TitleAr as title from Poll where ShowInHome=1  Order By AddDate Desc, Id Desc";
        }
        Database db  = new Database();
        Lang     lan = new Lang();

        DataTable dt = db.ExecuteDataTable(pollSql);

        Repeater7.DataSource = dt;
        Repeater7.DataBind();
    }
Example #10
0
        protected void btnAddHomework7_Click(object sender, EventArgs e)
        {
            Homework homework = new Homework();

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

            homework.Date = Convert.ToDateTime(ss);
            db.Homeworks.InsertOnSubmit(homework);
            db.SubmitChanges();
            txtAddSubj7.Text     = "";
            txtAddHomework7.Text = "";
            Repeater7.DataBind();
        }
Example #11
0
    private void fill_slider()
    {
        try
        {
            var id = (from a in linq_obj.slider_msts
                      select new
            {
                code = a.intglcode,
                slider_img = "./upload/" + a.image
            }).ToList();

            Repeater7.DataSource = id;
            Repeater7.DataBind();
        }
        catch (Exception)
        {
        }
    }
Example #12
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();
 }
Example #13
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();
        }
Example #14
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();
        }
Example #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string major = "physics";
            if (Request.QueryString["type"] != "师资队伍")
            {
                Response.Redirect("index.aspx");
            }
            if (Request.QueryString["item"] != null)
            {
                major = Request.QueryString["item"];
            }
            panel1.Visible = true;
            panel2.Visible = false;
            panel3.Visible = false;
            panel4.Visible = false;
            //panel5.Visible = false;
            if (major == "physics")
            {
                lblMajor.Text        = "物理系";
                lblEnglishMajor.Text = "physics";
                var db = new oucITEntities();
                // 绑定教授
                var list = (from a in db.Teacher
                            where a.Department == "物理系" && a.JobTitle == 1
                            orderby a.Birthday
                            select a).ToList();
                Repeater1.DataSource = list;
                Repeater1.DataBind();
                if (list.Count == 0)
                {
                    Panel6.Visible = false;
                }
                // 绑定博士生导师
                var list2 = (from a in db.Teacher
                             where a.Department == "物理系" && a.Tutor == 1
                             orderby a.Job, a.Birthday
                             select a).ToList();
                Repeater3.DataSource = list2;
                Repeater3.DataBind();
                if (list2.Count == 0)
                {
                    Panel7.Visible = false;
                }
                // 绑定硕士生导师
                var list3 = (from a in db.Teacher
                             where a.Department == "物理系" && (a.Tutor == 1 || a.Tutor == 2)
                             orderby a.Job, a.Tutor, a.Birthday
                             select a).ToList();
                Repeater4.DataSource = list3;
                Repeater4.DataBind();
                // 绑定信息工程中心
                var list4 = (from a in db.Teacher
                             where a.Department == "物理系" && a.JobTitle == 2
                             orderby a.Birthday
                             select a).ToList();
                Repeater2.DataSource = list4;
                Repeater2.DataBind();
                // 绑定高级工程师
                var list5 = (from a in db.Teacher
                             where a.Department == "物理系" && a.JobTitle == 3
                             orderby a.Birthday
                             select a).ToList();
                Repeater5.DataSource = list5;
                Repeater5.DataBind();
                if (list5.Count == 0)
                {
                    Panel5.Visible = false;
                }
                // 绑定高级实验师
                var list6 = (from a in db.Teacher
                             where a.Department == "物理系" && a.JobTitle == 4
                             orderby a.Birthday
                             select a).ToList();
                Repeater6.DataSource = list6;
                Repeater6.DataBind();
                if (list6.Count == 0)
                {
                    Panel8.Visible = false;
                }
                // 绑定讲师
                var list7 = (from a in db.Teacher
                             where a.Department == "物理系" && a.JobTitle == 5
                             orderby a.Birthday
                             select a).ToList();
                Repeater7.DataSource = list7;
                Repeater7.DataBind();
                if (list7.Count == 0)
                {
                    Panel9.Visible = false;
                }
                // 绑定助理工程师
                var list8 = (from a in db.Teacher
                             where a.Department == "物理系" && a.JobTitle == 6
                             orderby a.Birthday
                             select a).ToList();
                Repeater8.DataSource = list8;
                Repeater8.DataBind();
                if (list8.Count == 0)
                {
                    Panel10.Visible = false;
                }
                // 绑定助理实验师
                var list9 = (from a in db.Teacher
                             where a.Department == "物理系" && a.JobTitle == 7
                             orderby a.Birthday
                             select a).ToList();
                Repeater9.DataSource = list9;
                Repeater9.DataBind();
                if (list9.Count == 0)
                {
                    Panel11.Visible = false;
                }
            }
            else if (major == "electron")
            {
                panel1.Visible       = true;
                panel4.Visible       = false;
                lblMajor.Text        = "电子工程系";
                lblEnglishMajor.Text = "electronic engineering";
                var db   = new oucITEntities();
                var list = (from a in db.Teacher
                            where a.Department == "电子工程系" && a.JobTitle == 1
                            orderby a.Birthday
                            select a).ToList();
                Repeater1.DataSource = list;
                Repeater1.DataBind();
                if (list.Count == 0)
                {
                    Panel6.Visible = false;
                }
                var list2 = (from a in db.Teacher
                             where a.Department == "电子工程系" && a.Tutor == 1
                             orderby a.Job, a.Birthday
                             select a).ToList();
                Repeater3.DataSource = list2;
                Repeater3.DataBind();
                if (list2.Count == 0)
                {
                    Panel7.Visible = false;
                }
                var list3 = (from a in db.Teacher
                             where a.Department == "电子工程系" && (a.Tutor == 1 || a.Tutor == 2)
                             orderby a.Job, a.Tutor, a.Birthday
                             select a).ToList();
                Repeater4.DataSource = list3;
                Repeater4.DataBind();
                var list4 = (from a in db.Teacher
                             where a.Department == "电子工程系" && a.JobTitle == 2
                             orderby a.UserID
                             select a).ToList();
                Repeater2.DataSource = list4;
                Repeater2.DataBind();
                var list5 = (from a in db.Teacher
                             where a.Department == "电子工程系" && a.JobTitle == 3
                             orderby a.Birthday
                             select a).ToList();
                Repeater5.DataSource = list5;
                Repeater5.DataBind();
                if (list5.Count == 0)
                {
                    Panel5.Visible = false;
                }
                var list6 = (from a in db.Teacher
                             where a.Department == "电子工程系" && a.JobTitle == 4
                             orderby a.Birthday
                             select a).ToList();
                Repeater6.DataSource = list6;
                Repeater6.DataBind();
                if (list6.Count == 0)
                {
                    Panel8.Visible = false;
                }
                var list7 = (from a in db.Teacher
                             where a.Department == "电子工程系" && a.JobTitle == 5
                             orderby a.Birthday
                             select a).ToList();
                Repeater7.DataSource = list7;
                Repeater7.DataBind();
                if (list7.Count == 0)
                {
                    Panel9.Visible = false;
                }
                var list8 = (from a in db.Teacher
                             where a.Department == "电子工程系" && a.JobTitle == 6
                             orderby a.Birthday
                             select a).ToList();
                Repeater8.DataSource = list8;
                Repeater8.DataBind();
                if (list8.Count == 0)
                {
                    Panel10.Visible = false;
                }
                var list9 = (from a in db.Teacher
                             where a.Department == "电子工程系" && a.JobTitle == 7
                             orderby a.Birthday
                             select a).ToList();
                Repeater9.DataSource = list9;
                Repeater9.DataBind();
                if (list9.Count == 0)
                {
                    Panel11.Visible = false;
                }
            }
            else if (major == "computer")
            {
                lblMajor.Text        = "计算机科学与技术系";
                lblEnglishMajor.Text = "computer science and technology";
                var db   = new oucITEntities();
                var list = (from a in db.Teacher
                            where a.Department == "计算机科学与技术系" && a.JobTitle == 1
                            orderby a.Birthday
                            select a).ToList();
                Repeater1.DataSource = list;
                Repeater1.DataBind();
                if (list.Count == 0)
                {
                    Panel6.Visible = false;
                }
                var list2 = (from a in db.Teacher
                             where a.Department == "计算机科学与技术系" && a.Tutor == 1
                             orderby a.Job, a.Birthday
                             select a).ToList();
                Repeater3.DataSource = list2;
                Repeater3.DataBind();
                if (list2.Count == 0)
                {
                    Panel7.Visible = false;
                }
                var list3 = (from a in db.Teacher
                             where a.Department == "计算机科学与技术系" && (a.Tutor == 1 || a.Tutor == 2)
                             orderby a.Job, a.Tutor, a.Birthday
                             select a).ToList();
                Repeater4.DataSource = list3;
                Repeater4.DataBind();
                var list4 = (from a in db.Teacher
                             where a.Department == "计算机科学与技术系" && a.JobTitle == 2
                             orderby a.UserID
                             select a).ToList();
                Repeater2.DataSource = list4;
                Repeater2.DataBind();
                var list5 = (from a in db.Teacher
                             where a.Department == "计算机科学与技术系" && a.JobTitle == 3
                             orderby a.Birthday
                             select a).ToList();
                Repeater5.DataSource = list5;
                Repeater5.DataBind();
                if (list5.Count == 0)
                {
                    Panel5.Visible = false;
                }
                var list6 = (from a in db.Teacher
                             where a.Department == "计算机科学与技术系" && a.JobTitle == 4
                             orderby a.Birthday
                             select a).ToList();
                Repeater6.DataSource = list6;
                Repeater6.DataBind();
                if (list6.Count == 0)
                {
                    Panel8.Visible = false;
                }
                var list7 = (from a in db.Teacher
                             where a.Department == "计算机科学与技术系" && a.JobTitle == 5
                             orderby a.Birthday
                             select a).ToList();
                Repeater7.DataSource = list7;
                Repeater7.DataBind();
                if (list7.Count == 0)
                {
                    Panel9.Visible = false;
                }
                var list8 = (from a in db.Teacher
                             where a.Department == "计算机科学与技术系" && a.JobTitle == 6
                             orderby a.Birthday
                             select a).ToList();
                Repeater8.DataSource = list8;
                Repeater8.DataBind();
                if (list8.Count == 0)
                {
                    Panel10.Visible = false;
                }
                var list9 = (from a in db.Teacher
                             where a.Department == "计算机科学与技术系" && a.JobTitle == 7
                             orderby a.Birthday
                             select a).ToList();
                Repeater9.DataSource = list9;
                Repeater9.DataBind();
                if (list9.Count == 0)
                {
                    Panel11.Visible = false;
                }
            }
            else if (major == "ocean")
            {
                lblMajor.Text        = "海洋技术系";
                lblEnglishMajor.Text = "marine technology";
                var db   = new oucITEntities();
                var list = (from a in db.Teacher
                            where a.Department == "海洋技术系" && a.JobTitle == 1
                            orderby a.Birthday
                            select a).ToList();
                Repeater1.DataSource = list;
                Repeater1.DataBind();
                if (list.Count == 0)
                {
                    Panel6.Visible = false;
                }
                var list2 = (from a in db.Teacher
                             where a.Department == "海洋技术系" && a.Tutor == 1
                             orderby a.Job, a.Birthday
                             select a).ToList();
                Repeater3.DataSource = list2;
                Repeater3.DataBind();
                if (list2.Count == 0)
                {
                    Panel7.Visible = false;
                }
                var list3 = (from a in db.Teacher
                             where a.Department == "海洋技术系" && (a.Tutor == 1 || a.Tutor == 2)
                             orderby a.Job, a.Tutor, a.Birthday
                             select a).ToList();
                Repeater4.DataSource = list3;
                Repeater4.DataBind();
                var list4 = (from a in db.Teacher
                             where a.Department == "海洋技术系" && a.JobTitle == 2
                             orderby a.UserID
                             select a).ToList();
                Repeater2.DataSource = list4;
                Repeater2.DataBind();
                var list5 = (from a in db.Teacher
                             where a.Department == "海洋技术系" && a.JobTitle == 3
                             orderby a.Birthday
                             select a).ToList();
                Repeater5.DataSource = list5;
                Repeater5.DataBind();
                if (list5.Count == 0)
                {
                    Panel5.Visible = false;
                }
                var list6 = (from a in db.Teacher
                             where a.Department == "海洋技术系" && a.JobTitle == 4
                             orderby a.Birthday
                             select a).ToList();
                Repeater6.DataSource = list6;
                Repeater6.DataBind();
                if (list6.Count == 0)
                {
                    Panel8.Visible = false;
                }
                var list7 = (from a in db.Teacher
                             where a.Department == "海洋技术系" && a.JobTitle == 5
                             orderby a.Birthday
                             select a).ToList();
                Repeater7.DataSource = list7;
                Repeater7.DataBind();
                if (list7.Count == 0)
                {
                    Panel9.Visible = false;
                }
                var list8 = (from a in db.Teacher
                             where a.Department == "海洋技术系" && a.JobTitle == 6
                             orderby a.Birthday
                             select a).ToList();
                Repeater8.DataSource = list8;
                Repeater8.DataBind();
                if (list8.Count == 0)
                {
                    Panel10.Visible = false;
                }
                var list9 = (from a in db.Teacher
                             where a.Department == "海洋技术系" && a.JobTitle == 7
                             orderby a.Birthday
                             select a).ToList();
                Repeater9.DataSource = list9;
                Repeater9.DataBind();
                if (list9.Count == 0)
                {
                    Panel11.Visible = false;
                }
            }
            //else if (major == "it")
            //{

            //    lblMajor.Text = "行政人员";
            //    lblEnglishMajor.Text = "administrative staff";
            //    var db = new oucITEntities();
            //    var list10 = (from a in db.Teacher
            //                  where a.Department == "行政人员"
            //                  orderby a.JobTitle, a.UserID
            //                  select a).ToList();
            //    Repeater10.DataSource = list10;
            //    Repeater10.DataBind();
            //    panel1.Visible = false;
            //    panel4.Visible = true;
            //    panelChoose.Visible = false;
            //}
            else if (major == "it")
            {
                lblMajor.Text        = "信息工程中心";
                lblEnglishMajor.Text = "information engineering center";
                var db     = new oucITEntities();
                var list10 = (from a in db.Teacher
                              where a.Department == "信息工程中心"
                              orderby a.JobTitle, a.UserID
                              select a).ToList();
                Repeater10.DataSource = list10;
                Repeater10.DataBind();
                panel1.Visible      = false;
                panel4.Visible      = true;
                panelChoose.Visible = false;
            }
            else
            {
                Response.Redirect("Index.aspx");
            }
        }
    }
Example #16
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;
        }
    }
Example #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Label2.Text = DateTime.Today.ToString("dd/MM/yyyy");
        TransitionLogic ol   = new TransitionLogic();
        DataTable       dt1  = ol.SelectOrderStatus("Order Created", DateTime.Today);
        DataTable       dt2  = ol.SelectOrderStatus("Performa invoice generated", DateTime.Today);
        DataTable       dt3  = ol.SelectOrderStatus("Performa invoice approved", DateTime.Today);
        DataTable       dt4  = ol.SelectOrderStatus("Cylinder requested", DateTime.Today);
        DataTable       dt5  = ol.SelectOrderStatus("Cylinder received", DateTime.Today);
        DataTable       dt6  = ol.SelectOrderStatus("Print pending", DateTime.Today);
        DataTable       dt7  = ol.SelectOrderStatus("Converting", DateTime.Today);
        DataTable       dt8  = ol.SelectOrderStatus("Ready", DateTime.Today);
        DataTable       dt9  = ol.SelectOrderStatus("Dispached", DateTime.Today);
        DataTable       dt10 = ol.SelectOrderStatusClosed("Closed", DateTime.Today);

        int max = findMax(dt1.Rows.Count, dt2.Rows.Count, dt3.Rows.Count, dt4.Rows.Count, dt5.Rows.Count, dt6.Rows.Count, dt7.Rows.Count, dt8.Rows.Count, dt9.Rows.Count, dt10.Rows.Count);

        if (dt1.Rows.Count < max)
        {
            for (int i = dt1.Rows.Count; i < max; i++)
            {
                dt1.Rows.Add("-");
            }
        }

        if (dt2.Rows.Count < max)
        {
            for (int i = dt2.Rows.Count; i < max; i++)
            {
                dt2.Rows.Add("-");
            }
        }
        if (dt3.Rows.Count < max)
        {
            for (int i = dt3.Rows.Count; i < max; i++)
            {
                dt3.Rows.Add("-");
            }
        }
        if (dt4.Rows.Count < max)
        {
            for (int i = dt4.Rows.Count; i < max; i++)
            {
                dt4.Rows.Add("-");
            }
        }
        if (dt5.Rows.Count < max)
        {
            for (int i = dt5.Rows.Count; i < max; i++)
            {
                dt5.Rows.Add("-");
            }
        }
        if (dt6.Rows.Count < max)
        {
            for (int i = dt6.Rows.Count; i < max; i++)
            {
                dt6.Rows.Add("-");
            }
        }
        if (dt7.Rows.Count < max)
        {
            for (int i = dt7.Rows.Count; i < max; i++)
            {
                dt7.Rows.Add("-");
            }
        }
        if (dt8.Rows.Count < max)
        {
            for (int i = dt8.Rows.Count; i < max; i++)
            {
                dt8.Rows.Add("-");
            }
        }
        if (dt9.Rows.Count < max)
        {
            for (int i = dt9.Rows.Count; i < max; i++)
            {
                dt9.Rows.Add("-");
            }
        }
        if (dt10.Rows.Count < max)
        {
            for (int i = dt10.Rows.Count; i < max; i++)
            {
                dt10.Rows.Add("-");
            }
        }
        Repeater1.DataSource  = dt1;
        Repeater2.DataSource  = dt2;
        Repeater3.DataSource  = dt3;
        Repeater4.DataSource  = dt4;
        Repeater5.DataSource  = dt5;
        Repeater6.DataSource  = dt6;
        Repeater7.DataSource  = dt7;
        Repeater8.DataSource  = dt8;
        Repeater9.DataSource  = dt9;
        Repeater10.DataSource = dt10;

        Repeater1.DataBind();
        Repeater2.DataBind();
        Repeater3.DataBind();
        Repeater4.DataBind();
        Repeater5.DataBind();
        Repeater6.DataBind();
        Repeater7.DataBind();
        Repeater8.DataBind();
        Repeater9.DataBind();
        Repeater10.DataBind();
    }
    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();
    }
Example #19
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();
    }
Example #20
0
    protected void Button2_click(object sender, EventArgs e)
    {
        DateTime d1 = new DateTime();

        // d1 = Convert.ToDateTime(TextBox1.Text);
        if (!DateTime.TryParseExact(TextBox1.Text, "dd/MM/yyyy", null, System.Globalization.DateTimeStyles.None, out d1))
        {
        }

        Label2.Text = d1.ToString("dd/MM/yyyy");

        TransitionLogic ol   = new TransitionLogic();
        DataTable       dt1  = ol.SelectOrderStatus("Order Created", d1);
        DataTable       dt2  = ol.SelectOrderStatus("Performa invoice generated", d1);
        DataTable       dt3  = ol.SelectOrderStatus("Performa invoice approved", d1);
        DataTable       dt4  = ol.SelectOrderStatus("Cylinder requested", d1);
        DataTable       dt5  = ol.SelectOrderStatus("Cylinder received", d1);
        DataTable       dt6  = ol.SelectOrderStatus("Print pending", d1);
        DataTable       dt7  = ol.SelectOrderStatus("Converting", d1);
        DataTable       dt8  = ol.SelectOrderStatus("Ready", d1);
        DataTable       dt9  = ol.SelectOrderStatus("Dispached", d1);
        DataTable       dt10 = ol.SelectOrderStatus("Closed", d1);

        int max = findMax(dt1.Rows.Count, dt2.Rows.Count, dt3.Rows.Count, dt4.Rows.Count, dt5.Rows.Count, dt6.Rows.Count, dt7.Rows.Count, dt8.Rows.Count, dt9.Rows.Count, dt10.Rows.Count);

        if (dt1.Rows.Count < max)
        {
            for (int i = dt1.Rows.Count; i < max; i++)
            {
                dt1.Rows.Add("-");
            }
        }

        if (dt2.Rows.Count < max)
        {
            for (int i = dt2.Rows.Count; i < max; i++)
            {
                dt2.Rows.Add("-");
            }
        }
        if (dt3.Rows.Count < max)
        {
            for (int i = dt3.Rows.Count; i < max; i++)
            {
                dt3.Rows.Add("-");
            }
        }
        if (dt4.Rows.Count < max)
        {
            for (int i = dt4.Rows.Count; i < max; i++)
            {
                dt4.Rows.Add("-");
            }
        }
        if (dt5.Rows.Count < max)
        {
            for (int i = dt5.Rows.Count; i < max; i++)
            {
                dt5.Rows.Add("-");
            }
        }
        if (dt6.Rows.Count < max)
        {
            for (int i = dt6.Rows.Count; i < max; i++)
            {
                dt6.Rows.Add("-");
            }
        }
        if (dt7.Rows.Count < max)
        {
            for (int i = dt7.Rows.Count; i < max; i++)
            {
                dt7.Rows.Add("-");
            }
        }
        if (dt8.Rows.Count < max)
        {
            for (int i = dt8.Rows.Count; i < max; i++)
            {
                dt8.Rows.Add("-");
            }
        }
        if (dt9.Rows.Count < max)
        {
            for (int i = dt9.Rows.Count; i < max; i++)
            {
                dt9.Rows.Add("-");
            }
        }
        if (dt10.Rows.Count < max)
        {
            for (int i = dt10.Rows.Count; i < max; i++)
            {
                dt10.Rows.Add("-");
            }
        }
        Repeater1.DataSource  = dt1;
        Repeater2.DataSource  = dt2;
        Repeater3.DataSource  = dt3;
        Repeater4.DataSource  = dt4;
        Repeater5.DataSource  = dt5;
        Repeater6.DataSource  = dt6;
        Repeater7.DataSource  = dt7;
        Repeater8.DataSource  = dt8;
        Repeater9.DataSource  = dt9;
        Repeater10.DataSource = dt10;

        Repeater1.DataBind();
        Repeater2.DataBind();
        Repeater3.DataBind();
        Repeater4.DataBind();
        Repeater5.DataBind();
        Repeater6.DataBind();
        Repeater7.DataBind();
        Repeater8.DataBind();
        Repeater9.DataBind();
        Repeater10.DataBind();
    }
Example #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            var db = new oucITEntities();
            if (Request.QueryString["type"] != "组织机构")
            {
                Response.Redirect("index.aspx");
            }
            string item = "党委团委";
            if (Request.QueryString["item"] != null)
            {
                item = Request.QueryString["item"];
            }

            // 绑定组织结构列表
            if (item == "党委团委")
            {
                // 显示党委团委对应Panel,下同
                Panel1.Visible = true;
                Panel2.Visible = false;
                Panel3.Visible = false;

                // 绑定右侧列表,下同
                var ITgroup = GroupHelper.Select("学院党委");
                if (ITgroup != null)
                {
                    var xydwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater1.DataSource = xydwlist.ToList();
                    Repeater1.DataBind();
                }
                ITgroup = GroupHelper.Select("学院团委");
                if (ITgroup != null)
                {
                    var xytwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater2.DataSource = xytwlist.ToList();
                    Repeater2.DataBind();
                }
                ITgroup = GroupHelper.Select("教工党支部");
                if (ITgroup != null)
                {
                    var jgdzblist = from a in db.Connection
                                    where a.GroupID == ITgroup.GroupID
                                    orderby a.Class, a.Job
                    select a;
                    Repeater3.DataSource = jgdzblist.ToList();
                    Repeater3.DataBind();
                }
                ITgroup = GroupHelper.Select("学生党支部");
                if (ITgroup != null)
                {
                    var xsdzblist = from a in db.Connection
                                    where a.GroupID == ITgroup.GroupID
                                    select new { Job = a.Job };
                    Repeater4.DataSource = xsdzblist.ToList();
                    Repeater4.DataBind();
                }
            }
            else if (item == "院行政")
            {
                Panel1.Visible = false;
                Panel2.Visible = true;
                Panel3.Visible = false;
                var ITgroup = GroupHelper.Select("院行政");
                if (ITgroup != null)
                {
                    var xydwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater5.DataSource = xydwlist.ToList();
                    Repeater5.DataBind();
                }
                ITgroup = GroupHelper.Select("院办公室");
                if (ITgroup != null)
                {
                    var xydwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater6.DataSource = xydwlist.ToList();
                    Repeater6.DataBind();
                }
                ITgroup = GroupHelper.Select("物理系");
                if (ITgroup != null)
                {
                    var xydwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater7.DataSource = xydwlist.ToList();
                    Repeater7.DataBind();
                }
                ITgroup = GroupHelper.Select("电子工程系");
                if (ITgroup != null)
                {
                    var xydwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater8.DataSource = xydwlist.ToList();
                    Repeater8.DataBind();
                }
                ITgroup = GroupHelper.Select("计算机科学与技术系");
                if (ITgroup != null)
                {
                    var xydwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater9.DataSource = xydwlist.ToList();
                    Repeater9.DataBind();
                }
                ITgroup = GroupHelper.Select("海洋技术系");
                if (ITgroup != null)
                {
                    var xydwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater10.DataSource = xydwlist.ToList();
                    Repeater10.DataBind();
                }
                ITgroup = GroupHelper.Select("信息工程中心");
                if (ITgroup != null)
                {
                    var xydwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater11.DataSource = xydwlist.ToList();
                    Repeater11.DataBind();
                }
            }
            else if (item == "院工会妇委会")
            {
                Panel1.Visible = false;
                Panel2.Visible = false;
                Panel3.Visible = true;
                var ITgroup = GroupHelper.Select("院工会");
                if (ITgroup != null)
                {
                    var xydwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater12.DataSource = xydwlist.ToList();
                    Repeater12.DataBind();
                }
                ITgroup = GroupHelper.Select("院妇女委员会");
                if (ITgroup != null)
                {
                    var xydwlist = from a in db.Connection
                                   where a.GroupID == ITgroup.GroupID
                                   orderby a.Class
                                   select a;
                    Repeater13.DataSource = xydwlist.ToList();
                    Repeater13.DataBind();
                }
            }
            else
            {
                Response.Redirect("index.aspx");
            }
        }
    }
    protected void Button2_click(object sender, EventArgs e)
    {
        DateTime d1 = new DateTime();

        // d1 = Convert.ToDateTime(TextBox1.Text);
        if (!DateTime.TryParseExact(TextBox1.Text, "dd/MM/yyyy", null, System.Globalization.DateTimeStyles.None, out d1))
        {
        }

        Label2.Text = d1.ToString("dd/MM/yyyy");

        TransitionLogic ol  = new TransitionLogic();
        DataTable       dt1 = ol.SelectProductStatus("Product Created", d1);
        DataTable       dt2 = ol.SelectProductStatus("Product Designed", d1);
        DataTable       dt3 = ol.SelectProductStatus("Product Sent for client design approval", d1);
        DataTable       dt4 = ol.SelectProductStatus("Design approved bt client", d1);
        DataTable       dt5 = ol.SelectProductStatus("Trial product prepared", d1);
        DataTable       dt6 = ol.SelectProductStatus("Trial product sent for client approval", d1);
        DataTable       dt7 = ol.SelectProductStatus("Trial product approved by client", d1);
        DataTable       dt8 = ol.SelectProductStatus("product approved", d1);


        int max = findMax(dt1.Rows.Count, dt2.Rows.Count, dt3.Rows.Count, dt4.Rows.Count, dt5.Rows.Count, dt6.Rows.Count, dt7.Rows.Count, dt8.Rows.Count);

        if (dt1.Rows.Count < max)
        {
            for (int i = dt1.Rows.Count; i < max; i++)
            {
                dt1.Rows.Add("-");
            }
        }

        if (dt2.Rows.Count < max)
        {
            for (int i = dt2.Rows.Count; i < max; i++)
            {
                dt2.Rows.Add("-");
            }
        }
        if (dt3.Rows.Count < max)
        {
            for (int i = dt3.Rows.Count; i < max; i++)
            {
                dt3.Rows.Add("-");
            }
        }
        if (dt4.Rows.Count < max)
        {
            for (int i = dt4.Rows.Count; i < max; i++)
            {
                dt4.Rows.Add("-");
            }
        }
        if (dt5.Rows.Count < max)
        {
            for (int i = dt5.Rows.Count; i < max; i++)
            {
                dt5.Rows.Add("-");
            }
        }
        if (dt6.Rows.Count < max)
        {
            for (int i = dt6.Rows.Count; i < max; i++)
            {
                dt6.Rows.Add("-");
            }
        }
        if (dt7.Rows.Count < max)
        {
            for (int i = dt7.Rows.Count; i < max; i++)
            {
                dt7.Rows.Add("-");
            }
        }
        if (dt8.Rows.Count < max)
        {
            for (int i = dt8.Rows.Count; i < max; i++)
            {
                dt8.Rows.Add("-");
            }
        }

        Repeater1.DataSource = dt1;
        Repeater2.DataSource = dt2;
        Repeater3.DataSource = dt3;
        Repeater4.DataSource = dt4;
        Repeater5.DataSource = dt5;
        Repeater6.DataSource = dt6;
        Repeater7.DataSource = dt7;
        Repeater8.DataSource = dt8;


        Repeater1.DataBind();
        Repeater2.DataBind();
        Repeater3.DataBind();
        Repeater4.DataBind();
        Repeater5.DataBind();
        Repeater6.DataBind();
        Repeater7.DataBind();
        Repeater8.DataBind();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Label2.Text = DateTime.Today.ToString("dd/MM/yyyy");
        TransitionLogic ol = new TransitionLogic();

        DataTable dt1 = ol.SelectProductStatus("Product Created", DateTime.Today);
        DataTable dt2 = ol.SelectProductStatus("Product Designed", DateTime.Today);
        DataTable dt3 = ol.SelectProductStatus("Product Sent for client design approval", DateTime.Today);
        DataTable dt4 = ol.SelectProductStatus("Design approved bt client", DateTime.Today);
        DataTable dt5 = ol.SelectProductStatus("Trial product prepared", DateTime.Today);
        DataTable dt6 = ol.SelectProductStatus("Trial product sent for client approval", DateTime.Today);
        DataTable dt7 = ol.SelectProductStatus("Trial product approved by client", DateTime.Today);
        DataTable dt8 = ol.SelectProductStatusApproved("product approved", DateTime.Today);

        int[] arr = { dt1.Rows.Count, dt2.Rows.Count, dt3.Rows.Count, dt4.Rows.Count, dt5.Rows.Count, dt6.Rows.Count, dt7.Rows.Count, dt8.Rows.Count };



        int max = findMax(dt1.Rows.Count, dt2.Rows.Count, dt3.Rows.Count, dt4.Rows.Count, dt5.Rows.Count, dt6.Rows.Count, dt7.Rows.Count, dt8.Rows.Count);

        if (dt1.Rows.Count < max)
        {
            for (int i = dt1.Rows.Count; i < max; i++)
            {
                dt1.Rows.Add("-");
            }
        }

        if (dt2.Rows.Count < max)
        {
            for (int i = dt2.Rows.Count; i < max; i++)
            {
                dt2.Rows.Add("-");
            }
        }
        if (dt3.Rows.Count < max)
        {
            for (int i = dt3.Rows.Count; i < max; i++)
            {
                dt3.Rows.Add("-");
            }
        }
        if (dt4.Rows.Count < max)
        {
            for (int i = dt4.Rows.Count; i < max; i++)
            {
                dt4.Rows.Add("-");
            }
        }
        if (dt5.Rows.Count < max)
        {
            for (int i = dt5.Rows.Count; i < max; i++)
            {
                dt5.Rows.Add("-");
            }
        }
        if (dt6.Rows.Count < max)
        {
            for (int i = dt6.Rows.Count; i < max; i++)
            {
                dt6.Rows.Add("-");
            }
        }
        if (dt7.Rows.Count < max)
        {
            for (int i = dt7.Rows.Count; i < max; i++)
            {
                dt7.Rows.Add("-");
            }
        }
        if (dt8.Rows.Count < max)
        {
            for (int i = dt8.Rows.Count; i < max; i++)
            {
                dt8.Rows.Add("-");
            }
        }
        Repeater1.DataSource = dt1;
        Repeater2.DataSource = dt2;
        Repeater3.DataSource = dt3;
        Repeater4.DataSource = dt4;
        Repeater5.DataSource = dt5;
        Repeater6.DataSource = dt6;
        Repeater7.DataSource = dt7;
        Repeater8.DataSource = dt8;

        Repeater1.DataBind();
        Repeater2.DataBind();
        Repeater3.DataBind();
        Repeater4.DataBind();
        Repeater5.DataBind();
        Repeater6.DataBind();
        Repeater7.DataBind();
        Repeater8.DataBind();
    }
Example #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["DoctorGUID"] == null)
            {
                Util.ShowMessage("用户登录超时,请重新登录!", "Login.aspx");
                Response.End();
            }
            else
            {
                if (Request.QueryString["GUID"] != null)
                {
                    using (SqlConnection conn = new DB().GetConnection())
                    {
                        GUIDS = Request.QueryString["GUID"].ToString();
                        SqlCommand cmd = conn.CreateCommand();
                        cmd.CommandText = "select * from Patient where GUID=@GUID";
                        cmd.Parameters.AddWithValue("@GUID", Request.QueryString["GUID"].ToString());
                        conn.Open();
                        SqlDataReader rd = cmd.ExecuteReader();
                        if (rd.Read())
                        {
                            Patient.Text  = rd["PatientName"].ToString();
                            GUID.Text     = rd["GUID"].ToString();
                            Sex.Text      = rd["Sex"].ToString();
                            Birthday.Text = String.Format("{0:yyyy-MM-dd}", rd["Birthday"]);
                            Num1.Text     = rd["Num1"].ToString();

                            Phone1.Text = rd["Phone1"].ToString();
                        }
                        rd.Close();

                        DoctorGUID.Text = Session["DoctorGUID"].ToString();
                        cmd.CommandText = "select * from Doctor where GUID=@DoctorGUID";
                        cmd.Parameters.AddWithValue("@DoctorGUID", DoctorGUID.Text);
                        rd = cmd.ExecuteReader();
                        if (rd.Read())
                        {
                            DoctorName.Text = rd["DoctorName"].ToString();
                        }
                        rd.Close();

                        // T1
                        cmd.CommandText = "select GUID,EndDT from T1 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater1.DataSource = rd;
                        Repeater1.DataBind();
                        rd.Close();

                        // T2
                        cmd.CommandText = "select GUID,EndDT from T2 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater2.DataSource = rd;
                        Repeater2.DataBind();
                        rd.Close();

                        // T3
                        cmd.CommandText = "select GUID,EndDT from T3 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater3.DataSource = rd;
                        Repeater3.DataBind();
                        rd.Close();

                        // T4
                        cmd.CommandText = "select GUID,EndDT from T4 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater4.DataSource = rd;
                        Repeater4.DataBind();
                        rd.Close();

                        // T5
                        cmd.CommandText = "select GUID,EndDT from T5 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater5.DataSource = rd;
                        Repeater5.DataBind();
                        rd.Close();

                        // T6
                        cmd.CommandText = "select GUID,EndDT from T6 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater6.DataSource = rd;
                        Repeater6.DataBind();
                        rd.Close();

                        // T7
                        cmd.CommandText = "select GUID,EndDT from T7 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater7.DataSource = rd;
                        Repeater7.DataBind();
                        rd.Close();

                        //T8
                        cmd.CommandText = "select GUID,EndDT from T8 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater8.DataSource = rd;
                        Repeater8.DataBind();
                        rd.Close();

                        // T9
                        cmd.CommandText = "select GUID,EndDT from T9 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater9.DataSource = rd;
                        Repeater9.DataBind();
                        rd.Close();

                        // T10
                        cmd.CommandText = "select GUID,EndDT from T10 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater10.DataSource = rd;
                        Repeater10.DataBind();
                        rd.Close();

                        // T11
                        cmd.CommandText = "select GUID,EndDT from T11 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater11.DataSource = rd;
                        Repeater11.DataBind();
                        rd.Close();

                        // T12
                        cmd.CommandText = "select GUID,EndDT from T12 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater12.DataSource = rd;
                        Repeater12.DataBind();
                        rd.Close();

                        // T13
                        cmd.CommandText = "select GUID,EndDT from T13 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater13.DataSource = rd;
                        Repeater13.DataBind();
                        rd.Close();

                        // T14
                        cmd.CommandText = "select GUID,EndDT from T14 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater14.DataSource = rd;
                        Repeater14.DataBind();
                        rd.Close();

                        // T15
                        cmd.CommandText = "select GUID,EndDT from T15 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater15.DataSource = rd;
                        Repeater15.DataBind();
                        rd.Close();

                        // T16
                        cmd.CommandText = "select GUID,EndDT from T16 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater16.DataSource = rd;
                        Repeater16.DataBind();
                        rd.Close();

                        // T17
                        cmd.CommandText = "select GUID,EndDT from T17 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater17.DataSource = rd;
                        Repeater17.DataBind();
                        rd.Close();

                        // T18
                        cmd.CommandText = "select GUID,EndDT from T18 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater18.DataSource = rd;
                        Repeater18.DataBind();
                        rd.Close();

                        // T19
                        cmd.CommandText = "select GUID,EndDT from T19 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater19.DataSource = rd;
                        Repeater19.DataBind();
                        rd.Close();

                        // T20
                        cmd.CommandText = "select GUID,EndDT from T20 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater20.DataSource = rd;
                        Repeater20.DataBind();
                        rd.Close();

                        // T21
                        cmd.CommandText = "select GUID,EndDT from T21 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater21.DataSource = rd;
                        Repeater21.DataBind();
                        rd.Close();

                        // T22
                        cmd.CommandText = "select GUID,EndDT from T22 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater22.DataSource = rd;
                        Repeater22.DataBind();
                        rd.Close();

                        // T23
                        cmd.CommandText = "select GUID,EndDT from T23 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater23.DataSource = rd;
                        Repeater23.DataBind();
                        rd.Close();

                        // T24
                        cmd.CommandText = "select GUID,EndDT from T24 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater24.DataSource = rd;
                        Repeater24.DataBind();
                        rd.Close();

                        // T25
                        cmd.CommandText = "select GUID,EndDT from T25 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater25.DataSource = rd;
                        Repeater25.DataBind();
                        rd.Close();

                        // T26
                        cmd.CommandText = "select GUID,EndDT from T26 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater26.DataSource = rd;
                        Repeater26.DataBind();
                        rd.Close();

                        // T27
                        cmd.CommandText = "select GUID,EndDT from T27 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater27.DataSource = rd;
                        Repeater27.DataBind();
                        rd.Close();

                        // T28
                        cmd.CommandText = "select GUID,EndDT from T28 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater28.DataSource = rd;
                        Repeater28.DataBind();
                        rd.Close();

                        conn.Close();
                    }
                }
                else
                {
                    Response.Write(" <script> alert(\"请先选择测试对象,再选择其完成的测试进行打印!\");;window.location='Patient_List.aspx'; </script> ");
                }
            }
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            List <Tin> ds   = new List <Tin>();
            TinBLL     tbll = new TinBLL();

            ds = tbll.LayMaLoaiTin2("LT04");
            this.rpt.DataSource = ds;
            rpt.DataBind();

            List <Tin> ds9   = new List <Tin>();
            TinBLL     tbll9 = new TinBLL();

            ds9 = tbll9.LayMaLoaiTin2benphai("LT05");
            this.Repeater9.DataSource = ds9;
            Repeater9.DataBind();

            List <Tin> ds1   = new List <Tin>();
            TinBLL     tbll1 = new TinBLL();

            ds1 = tbll.LayMaLoaiTin1("LT01");
            this.Repeater1.DataSource = ds1;
            Repeater1.DataBind();

            List <Tin> ds10   = new List <Tin>();
            TinBLL     tbll10 = new TinBLL();

            ds10 = tbll10.LayMaLoaiTin1benphai("LT02");
            this.Repeater10.DataSource = ds10;
            Repeater10.DataBind();

            List <Tin> ds2   = new List <Tin>();
            TinBLL     tbll2 = new TinBLL();

            ds2 = tbll.LayMaLoaiTin3("LT07");
            this.Repeater2.DataSource = ds2;
            Repeater2.DataBind();

            List <Tin> ds11   = new List <Tin>();
            TinBLL     tbll11 = new TinBLL();

            ds11 = tbll11.LayMaLoaiTin3benphai("LT08");
            this.Repeater11.DataSource = ds11;
            Repeater11.DataBind();

            List <Tin> ds3   = new List <Tin>();
            TinBLL     tbll3 = new TinBLL();

            ds3 = tbll.LayMaLoaiTin4("LT11");
            this.Repeater3.DataSource = ds3;
            Repeater3.DataBind();

            List <Tin> ds12   = new List <Tin>();
            TinBLL     tbll12 = new TinBLL();

            ds12 = tbll12.LayMaLoaiTin4benphai("LT12");
            this.Repeater12.DataSource = ds12;
            Repeater12.DataBind();

            List <Tin> ds4   = new List <Tin>();
            TinBLL     tbll4 = new TinBLL();

            ds4 = tbll.LayMaLoaiTin5("LT13");
            this.Repeater4.DataSource = ds4;
            Repeater4.DataBind();

            List <Tin> ds13   = new List <Tin>();
            TinBLL     tbll13 = new TinBLL();

            ds13 = tbll13.LayMaLoaiTin5benphai("LT13");
            this.Repeater13.DataSource = ds13;
            Repeater13.DataBind();

            List <Tin> ds5   = new List <Tin>();
            TinBLL     tbll5 = new TinBLL();

            ds5 = tbll.LayMaLoaiTin6("LT14");
            this.Repeater5.DataSource = ds5;
            Repeater5.DataBind();

            List <Tin> ds14   = new List <Tin>();
            TinBLL     tbll14 = new TinBLL();

            ds14 = tbll13.LayMaLoaiTin6benphai("LT15");
            this.Repeater14.DataSource = ds14;
            Repeater14.DataBind();


            List <Tin> ds6   = new List <Tin>();
            TinBLL     tbll6 = new TinBLL();

            ds6 = tbll.LayMaLoaiTin7("LT17");
            this.Repeater6.DataSource = ds6;
            Repeater6.DataBind();

            List <Tin> ds15   = new List <Tin>();
            TinBLL     tbll15 = new TinBLL();

            ds15 = tbll15.LayMaLoaiTin7benphai("LT17");
            this.Repeater15.DataSource = ds15;
            Repeater15.DataBind();

            List <Tin> ds7   = new List <Tin>();
            TinBLL     tbll7 = new TinBLL();

            ds7 = tbll.LayMaLoaiTin8("LT18");
            this.Repeater7.DataSource = ds7;
            Repeater7.DataBind();

            List <Tin> ds16   = new List <Tin>();
            TinBLL     tbll16 = new TinBLL();

            ds16 = tbll16.LayMaLoaiTin8benphai("LT19");
            this.Repeater16.DataSource = ds16;
            Repeater16.DataBind();

            List <Tin> ds8   = new List <Tin>();
            TinBLL     tbll8 = new TinBLL();

            ds8 = tbll.LayMaLoaiTin9("LT20");
            this.Repeater8.DataSource = ds8;
            Repeater8.DataBind();

            List <Tin> ds17   = new List <Tin>();
            TinBLL     tbll17 = new TinBLL();

            ds17 = tbll17.LayMaLoaiTin9benphai("LT21");
            this.Repeater17.DataSource = ds17;
            Repeater17.DataBind();
        }
        void Bind()
        {
            intProfessionalId = Basic.RequestHelper.GetQueryInt("professionalid", 0);

            Entity.Professional info = DAL.TengXB.Professional.ProfessionalEntityGet(intProfessionalId);
            if (info != null)
            {
                strProfessionalName = info.ProfessionalName;//专业名称

                ProfessionalBase1.info = info;

                ProfessionalLeft1.ProfessionalId  = info.Id;
                ProfessionalLeft1.XueKeMenLeiName = info.XueKeMenLeiName;

                Crumb1.NavString = " <span>&gt;</span> <a href=\"/zhuanye.shtml\" title\"高考报考专业库\">高考报考专业库</a> <span>&gt;</span> <a href=\"/zhuanye-jianjie-" + info.Id + ".shtml\" title\"" + info.ProfessionalName + "\">" + info.ProfessionalName + "</a> <span>&gt;</span> 开设院校";

                DataTable dt0 = DAL.FenShengZhuanYeLuQu.ZhuanYeKaiSheYuanXiaoList("ZyId = " + intProfessionalId, "2013");

                DataView dv = dt0.DefaultView;


                //1华东地区(包括15山东、10江苏、12安徽、11浙江、13福建、9上海)
                //2华南地区(包括19广东、20广西、21海南)
                //3华中地区(包括17湖北、18湖南、16河南、14江西)
                //4华北地区(包括1北京、2天津、3河北、4山西、5内蒙古)
                //5西北地区(包括30宁夏、31新疆、29青海、27陕西、28甘肃)
                //6西南地区(包括23四川、25云南、24贵州、26西藏、22重庆)
                //7东北地区(包括6辽宁、7吉林、8黑龙江)
                //8台港澳地区(32包括台湾、香港、澳门)

                dv.RowFilter = " SchoolProvinceId = 15 OR  SchoolProvinceId = 10 OR  SchoolProvinceId = 12 OR  SchoolProvinceId = 11 OR  SchoolProvinceId = 13 OR  SchoolProvinceId = 9  ";
                DataTable dt1 = dv.ToTable();
                Repeater1.DataSource = dt1;
                Repeater1.DataBind();


                dv.RowFilter = " SchoolProvinceId = 19 OR  SchoolProvinceId = 20 OR  SchoolProvinceId = 21  ";
                DataTable dt2 = dv.ToTable();
                Repeater2.DataSource = dt2;
                Repeater2.DataBind();


                dv.RowFilter = " SchoolProvinceId = 17 OR  SchoolProvinceId = 18 OR  SchoolProvinceId = 16 OR  SchoolProvinceId = 14  ";
                DataTable dt3 = dv.ToTable();
                Repeater3.DataSource = dt3;
                Repeater3.DataBind();


                dv.RowFilter = " SchoolProvinceId = 1 OR  SchoolProvinceId = 2 OR  SchoolProvinceId = 3 OR  SchoolProvinceId = 4 OR  SchoolProvinceId = 5  ";
                DataTable dt4 = dv.ToTable();
                Repeater4.DataSource = dt4;
                Repeater4.DataBind();

                dv.RowFilter = " SchoolProvinceId = 30 OR  SchoolProvinceId = 31 OR  SchoolProvinceId = 29 OR  SchoolProvinceId = 27 OR  SchoolProvinceId = 28  ";
                DataTable dt5 = dv.ToTable();
                Repeater5.DataSource = dt5;
                Repeater5.DataBind();


                dv.RowFilter = " SchoolProvinceId = 23 OR  SchoolProvinceId = 25 OR  SchoolProvinceId = 24 OR  SchoolProvinceId = 26 OR  SchoolProvinceId = 22  ";
                DataTable dt6 = dv.ToTable();
                Repeater6.DataSource = dt6;
                Repeater6.DataBind();

                dv.RowFilter = " SchoolProvinceId = 6 OR  SchoolProvinceId = 7 OR  SchoolProvinceId = 8  ";
                DataTable dt7 = dv.ToTable();
                Repeater7.DataSource = dt7;
                Repeater7.DataBind();
            }
            else
            {
                Basic.MsgHelper.AlertBackMsg("获取专业信息失败");
            }
        }
Example #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SqlCommand komenda          = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '1' and '6'", polaczenie);
            SqlCommand komendaDruga     = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '7' and '12'", polaczenie);
            SqlCommand komendaTrzecia   = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '13' and '16'", polaczenie);
            SqlCommand komendaCzwarta   = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '17' and '20'", polaczenie);
            SqlCommand komendaPiata     = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '21' and '23'", polaczenie);
            SqlCommand komendaSzosta    = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '24' and '26'", polaczenie);
            SqlCommand komendaSiodma    = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '27' and '30'", polaczenie);
            SqlCommand komendaOsma      = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '31' and '34'", polaczenie);
            SqlCommand komendaDziewiata = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '35' and '38'", polaczenie);
            SqlCommand komendaDziesiata = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '39' and '42'", polaczenie);
            SqlCommand komendaJedenasta = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '43' and '47'", polaczenie);
            SqlCommand komendaDwunasta  = new SqlCommand("	SELECT g.IDgodziny,g.godzinyPoranne,g.godzinyWieczorne,t.TypPołączenia,m.miasto FROM GodzinyRozkladowLotow g INNER JOIN TypyPołączenia t on g.IDTypyPołączenia=t.IDTypyPołączenia INNER JOIN MIASTA m on g.IDmiasta=m.IDmiasta WHERE IDgodziny between '48' and '52'", polaczenie);
            SqlCommand komendaTrzynasta = new SqlCommand("	SELECT IDMiasWyl, MiasWyl FROM MiasWylo ", polaczenie);
            //   SqlCommand komendaCzternasta = new SqlCommand("SELECT IDMiasPrz, MiasPrz FROM MiasPrzy", polaczenie);

            try
            {
                polaczenie.Open();
                odczytaj             = komenda.ExecuteReader();
                Repeater1.DataSource = odczytaj;
                Repeater1.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj             = komendaDruga.ExecuteReader();
                Repeater2.DataSource = odczytaj;
                Repeater2.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj             = komendaTrzecia.ExecuteReader();
                Repeater3.DataSource = odczytaj;
                Repeater3.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj             = komendaCzwarta.ExecuteReader();
                Repeater4.DataSource = odczytaj;
                Repeater4.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj             = komendaPiata.ExecuteReader();
                Repeater5.DataSource = odczytaj;
                Repeater5.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj             = komendaSzosta.ExecuteReader();
                Repeater6.DataSource = odczytaj;
                Repeater6.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj             = komendaSiodma.ExecuteReader();
                Repeater7.DataSource = odczytaj;
                Repeater7.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj             = komendaOsma.ExecuteReader();
                Repeater8.DataSource = odczytaj;
                Repeater8.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj             = komendaDziewiata.ExecuteReader();
                Repeater9.DataSource = odczytaj;
                Repeater9.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj = komendaDziesiata.ExecuteReader();
                Repeater10.DataSource = odczytaj;
                Repeater10.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj = komendaJedenasta.ExecuteReader();
                Repeater11.DataSource = odczytaj;
                Repeater11.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj = komendaDwunasta.ExecuteReader();
                Repeater12.DataSource = odczytaj;
                Repeater12.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                polaczenie.Open();
                odczytaj          = komendaTrzynasta.ExecuteReader();
                MW.DataValueField = "IDMiasWyl";
                MW.DataTextField  = "MiasWyl";
                MW.DataSource     = odczytaj;
                MW.DataBind();
                odczytaj.Close();
                polaczenie.Close();

                /*
                 * polaczenie.Open();
                 * odczytaj = komendaCzternasta.ExecuteReader();
                 * MP.DataValueField = "IDMiasPrz";
                 * MP.DataTextField = "MiasPrz";
                 * MP.DataSource = odczytaj;
                 * MP.DataBind();
                 * odczytaj.Close();
                 * polaczenie.Close(); */
            }



            catch
            {
                Response.Write("Błąd pobierania danych");
            }
            finally
            {
                polaczenie.Close();
            }
        }
    }