Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.tisanestatus.Items.Add(new ListItem("已完成", "1"));
        this.tisanestatus.Items.Add(new ListItem("待煎药", "2"));
        this.tisanestatus.Items.Add(new ListItem("正在煎药", "3"));

        TeModel       tm   = new TeModel();
        SqlDataReader sdr1 = tm.getTisaneMachinInfo();


        if (sdr1 != null)
        {
            while (sdr1.Read())
            {
                this.machinename.Items.Add(new ListItem(sdr1["machinename"].ToString(), sdr1["id"].ToString()));
            }
        }



        if (Request.QueryString["id"] != null)
        {
            int id = Convert.ToInt16(Request.QueryString["id"]);
            idnum.Value = Request.QueryString["id"].ToString();


            SqlDataReader sr = tm.findTisaneinfoByid(id);
            if (sr.Read())
            {
                tisaneperson.Value = sr["tisaneman"].ToString();
                machinename.Value  = sr["machineid"].ToString();

                tisanestatus.Value = sr["tisanestatus"].ToString();
            }
        }
        //  TeModel tm = new TeModel();
        //tm.findTisaneinfoByid();
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        TeModel       tm   = new TeModel();
        SqlDataReader sdr1 = tm.getTisaneMachinInfo();
        SqlDataReader sdr2 = tm.getPackingMachineInfo();


        if (sdr1 != null)
        {
            while (sdr1.Read())
            {
                this.TisaneMachine.Items.Add(new ListItem(sdr1["machinename"].ToString(), sdr1["id"].ToString()));
            }
        }


        if (sdr2 != null)
        {
            while (sdr2.Read())
            {
                this.PackMachine.Items.Add(new ListItem(sdr2["machinename"].ToString(), sdr2["id"].ToString()));
            }
        }



        this.FlexGridRecipe.InitConfig(
            new string[] {
            "title=煎药机信息",          //标题
            "striped=true",         //是否显示行交替色
            "selectedonclick=true", //是否点击行自动选中checkbox
            "usepager=false",       //使用分页器
            "showcheckbox=true",    //显示复选框
            "height=300",           //高度,可为auto或具体px值
            "width=585"             //宽度,可为auto或具体px值
        },
            new dotNetFlexGrid.FieldConfig[] {
            new dotNetFlexGrid.FieldConfig("machinename", "煎药名称", 90, true, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("roomnum", "机房号", 90, false, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("usingstatus", "启用状态", 90, true, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("status", "状态", 90, true, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("healthstatus", "卫生状态", 90, false, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("disinfectionstatus", "消毒状态", 90, false, dotNetFlexGrid.FieldConfigAlign.Center),
        },
            null
            ,
            null
            );
        this.FlexGridRecipe.DataHandler = new dotNetFlexGrid.DataHandlerDelegate(FlexGridRecipeDataHandler);  //提供数据的方法


        this.FlexGridDrug.InitConfig(
            new string[] {
            "title=包装机信息",          //标题
            "striped=true",         //是否显示行交替色
            "selectedonclick=true", //是否点击行自动选中checkbox
            "usepager=false",       //使用分页器
            "showcheckbox=true",    //显示复选框
            "height=300",           //高度,可为auto或具体px值
            "width=1000"            //宽度,可为auto或具体px值
        },
            new dotNetFlexGrid.FieldConfig[] {
            new dotNetFlexGrid.FieldConfig("machinename", "包装机名称", 60, true, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("roomnum", "机房号", 60, false, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("usingstatus", "启用状态", 60, true, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("status", "状态", 60, true, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("healthstatus", "卫生状态", 60, false, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("disinfectionstatus", "消毒状态", 60, false, dotNetFlexGrid.FieldConfigAlign.Center),
        },
            null
            ,
            null
            );
        this.FlexGridDrug.DataHandler = new dotNetFlexGrid.DataHandlerDelegate(FlexGridDrugDataHandler);  //提供数据的方法
    }