예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            return;
        }
        //if (Request.QueryString["id"] == null) Response.Redirect("../Err/nonePage.aspx");

        //if (Session["power"] == null) Response.Redirect("../Default.aspx");
        //if (!srrshPage.Level2(Session["power"].ToString())) Response.Redirect("../Err/powerNeed.aspx");//没权限

        //setAutoComplete();
        //commonHis ch = new commonHis();
        //ddldept.DataSource = ch.getDeptList("*");
        //ddldept.DataTextField="deptName";
        //ddldept.DataValueField = "deptName";
        //ddldept.DataBind();

        string    sql = "select largeItemRdn,largeItemName,smallItemRdn,smallItemName,sItemValue,sItemType from JCI_generateTable where tableRdn=" + Request.QueryString["id"].Split(',')[0].ToString();
        DataTable dt  = conn.ExcuteSelect(sql);
        MediTable mt  = new MediTable();

        _ddt = dt;
        mt.generator(dt, GridView1);
        IsDynamicLoadControl = true;
    }
예제 #2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        MediTable mt          = new MediTable();
        string    sdocDept    = ddldept.SelectedValue;
        string    scheckDpt   = checkDept.Text.Trim();
        string    scheckDate  = checkTime.Text.Trim();
        string    stablescore = sumup.Text;
        string    smrn        = mrn.Text.Trim();
        string    spname      = pName.Text;

        if (sumup.Text == "")
        {
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "javascript", "<script>alert('请先计算得分');</script>"); return;
        }
        try
        {
            string[] tableinfo = Request.QueryString["id"].ToString().Split(',');
            string   sdocs     = attend1.Text + ":" + attend2.Text + ":" + attend3.Text + ":" + attend4.Text + ":" + attend5.Text;
            string   sfellows  = getfellows();
            string   index     = mt.saveBrifeInfo(scheckDate, scheckDpt, sdocDept, sdocs, sfellows, tableinfo[0], tableinfo[1], mt.tableType, stablescore, smrn, spname, GridView1);
            if (index != "")
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "javascript", "<script>alert('添加成功');window.location='../tableList.aspx'</script>");
            }
        }
        catch (Exception ex)
        {
            Response.Redirect("../Err/nonePage.aspx");
        }
    }
예제 #3
0
 protected override void LoadViewState(object savedState)
 {
     base.LoadViewState(savedState);
     if (IsDynamicLoadControl)
     {
         MediTable mt = new MediTable();
         mt.generator(_ddt, GridView1);
     }
 }
예제 #4
0
 private void getBrifeBind(string dept, string date)
 {
     try
     {
         DateTime date1, date2;
         string   sdept = "1";
         int      year, month;
         year  = Convert.ToInt16(date.Split('-')[0]);
         month = Convert.ToInt16(date.Split('-')[1]);
         date1 = new DateTime(year, month, 1);
         date2 = new DateTime(year, month, 30);
         MediTable mt = new MediTable();
         mt.getBrifeInfo(sdept, date1.ToString("yyyy-MM-dd"), date2.ToString("yyyy-MM-dd"), GridView1);
         mt.getDetailInfo(sdept, date1.ToString("yyyy-MM-dd"), date2.ToString("yyyy-MM-dd"), GridView2);
     }
     catch (Exception ex)
     {
         Response.Write(ex.ToString());
         //Response.Redirect("../Err/nonePage.aspx");
     }
 }