Exemplo n.º 1
0
        protected void OnDelete(object sender, EventArgs e)
        {
            //Find the reference of the Repeater Item.
            RepeaterItem item = (sender as LinkButton).Parent as RepeaterItem;
            int          ID   = int.Parse((item.FindControl("lblID") as Label).Text);

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

            db.Homeworks.DeleteOnSubmit(checkHomework);
            db.SubmitChanges();
            Repeater1.DataBind();
            Repeater2.DataBind();
            Repeater3.DataBind();
            Repeater4.DataBind();
            Repeater5.DataBind();
            Repeater6.DataBind();
            Repeater7.DataBind();
            Repeater8.DataBind();
            Repeater8.DataBind();
            Repeater9.DataBind();
            Repeater10.DataBind();
            Repeater11.DataBind();
            Repeater12.DataBind();
            Repeater13.DataBind();
            Repeater14.DataBind();
            Repeater15.DataBind();
        }
Exemplo n.º 2
0
    /// <summary>
    /// 签证工作量汇总表
    /// </summary>
    private void Bindqzgzlhzb()
    {
        string  strsql = "select * from tunnel_newstype where IsDel=0 and parentid=22";
        DataSet das    = Tunnel.Data.DbHelperSQL.Query(strsql);

        if (das.Tables[0].Rows.Count > 0)
        {
            Repeater11.DataSource = das;
            Repeater11.DataBind();
            Repeater11.Visible = true;
            string  strsql2 = "select top " + gettop(8 - das.Tables[0].Rows.Count) + " * from tunnel_index where typeid=22 and del=0 and IsDel=0 order by setdate desc ";
            DataSet das2    = Tunnel.Data.DbHelperSQL.Query(strsql2);
            Repeater4.DataSource = das2;
            Repeater4.DataBind();
        }
        else
        {
            string  strsql2 = "select top 8 * from tunnel_index where typeid=22 and del=0 and IsDel=0 order by setdate desc";
            DataSet das2    = Tunnel.Data.DbHelperSQL.Query(strsql2);
            Repeater4.DataSource = das2;
            Repeater4.DataBind();
            Repeater4.Visible  = true;
            Repeater11.Visible = false;
        }
    }
Exemplo n.º 3
0
        protected void OnUpdate(object sender, EventArgs e)
        {
            //Find the reference of the Repeater Item.
            RepeaterItem item          = (sender as LinkButton).Parent as RepeaterItem;
            int          ID            = int.Parse((item.FindControl("lblID") as Label).Text);
            string       subject       = (item.FindControl("txtSubj") as TextBox).Text.Trim();
            string       homework      = (item.FindControl("txtHomework") as TextBox).Text.Trim();
            var          checkHomework = (from c in db.Homeworks where c.ID.Equals(ID) select c).FirstOrDefault();

            checkHomework.Subject   = subject;
            checkHomework.Homework1 = homework;
            db.SubmitChanges();
            Repeater1.DataBind();
            Repeater2.DataBind();
            Repeater3.DataBind();
            Repeater4.DataBind();
            Repeater5.DataBind();
            Repeater6.DataBind();
            Repeater7.DataBind();
            Repeater8.DataBind();
            Repeater8.DataBind();
            Repeater9.DataBind();
            Repeater10.DataBind();
            Repeater11.DataBind();
            Repeater12.DataBind();
            Repeater13.DataBind();
            Repeater14.DataBind();
            Repeater15.DataBind();
        }
Exemplo n.º 4
0
    /// <summary>
    /// 热点关键词
    /// </summary>
    protected void bindRepeater11()
    {
        DataTable dt = b_Ask.SelfieldOrd("QueType", 10);//根据被采纳问题数取知道之星

        Repeater11.DataSource = dt;
        Repeater11.DataBind();
    }
Exemplo n.º 5
0
    /// <summary>
    /// 新闻
    /// </summary>
    public void XinWenPageBind()
    {
        PageBase pb = new PageBase();

        pb.TblName       = "Tunnel_information";
        pb.FldName       = "i_id";
        pb.ProcedureName = "pagination";
        pb.PageSize      = 4;
        if (cuttentPage == 0)
        {
            cuttentPage = pb.PageIndex;
        }
        pb.PageIndex = cuttentPage;
        int TypeId = 0;

        pb.StrWhere = " i_sort = " + TypeId + " and i_hit=1" + " and i_del=0";
        int count = 0;

        pb.DoCount = 1;
        mbll.GetList(pb, ref count); //获取总条数
        pb.DoCount = 0;
        List <Tunnel.Model.Tunnel_information> modelList = new List <Tunnel.Model.Tunnel_information>();

        modelList = imbll.GetList(pb, ref count);//获取分页结果

        //数据绑定
        Repeater11.DataSource = modelList;
        Repeater11.DataBind();
        GetDirectories();
    }
Exemplo n.º 6
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            //last week

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

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

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

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

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

            //this week


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

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

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

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

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

            //next week


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

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

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

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

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

            Repeater1.DataBind();
            Repeater2.DataBind();
            Repeater3.DataBind();
            Repeater4.DataBind();
            Repeater5.DataBind();
            Repeater6.DataBind();
            Repeater7.DataBind();
            Repeater8.DataBind();
            Repeater8.DataBind();
            Repeater9.DataBind();
            Repeater10.DataBind();
            Repeater11.DataBind();
            Repeater12.DataBind();
            Repeater13.DataBind();
            Repeater14.DataBind();
            Repeater15.DataBind();
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string        Kelime = Request.QueryString["q"].ToString();
            SqlConnection con    = new SqlConnection("Data Source=CRIMSONLADY\\SQLEXPRESS;Initial Catalog=BlogDizi; Integrated Security=True;");

            SqlDataAdapter da = new SqlDataAdapter("Select* from TBLBLOG where BLOGBASLIK like  '%" + Kelime + "%'", con);
            DataTable      dt = new DataTable();

            da.Fill(dt);
            Repeater11.DataSource = dt;
            Repeater11.DataBind();
        }
Exemplo n.º 8
0
        protected void btnAddHomework11_Click(object sender, EventArgs e)
        {
            Homework homework = new Homework();

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

            homework.Date = Convert.ToDateTime(ss);
            db.Homeworks.InsertOnSubmit(homework);
            db.SubmitChanges();
            txtAddSubj11.Text     = "";
            txtAddHomework11.Text = "";
            Repeater11.DataBind();
        }
Exemplo n.º 9
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;
        }
    }
        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();
        }
Exemplo n.º 11
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");
            }
        }
    }
Exemplo n.º 12
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> ");
                }
            }
        }
    }
Exemplo n.º 13
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();
            }
        }
    }