private void BindGrid(string strtid)
        {
            cd_thermal_batch     ctb  = new cd_thermal_batch();
            cd_thermal_indicator ctic = new cd_thermal_indicator();

            secondGrid.DataSource = ctic.getBindGridDataAsdt(strtid);
            secondGrid.DataBind();

            mainGrid.DataSource = ctb.getBindGridDataAsdt(strtid);
            mainGrid.DataBind();
        }
        protected void btnSave_batch_Click(object sender, EventArgs e)
        {
            FineUIPro.TreeNode treenode = firsttree.SelectedNode;

            if (treenode != null && treenode.Attributes["nodemenu"].ToString().Trim() == "2")
            {
                Dictionary <string, string> dic = initDatadic_batch();
                string           strID          = editID_batch.Text.ToString().Trim();
                cd_thermal_batch ctb            = new cd_thermal_batch();;
                int intresult = 0;

                cd_thermal ct     = new cd_thermal();
                string     strtid = ct.isExistdata("cd_thermal", "pid", treenode.NodeID.ToString().Trim(), "ID").Trim();

                if (strID == "")
                {
                    dic.Add("ID", Guid.NewGuid().ToString());
                    dic.Add("tid", strtid);

                    intresult = ctb.add(dic, "cd_thermal_batch");
                }
                else
                {
                    intresult = ctb.update(dic, "cd_thermal_batch", "ID", strID);
                }

                Alert alert = new Alert();
                BindGrid(strtid);

                if (intresult == 1)
                {
                    alert.Icon    = Icon.Information;
                    alert.Message = "数据保存成功";
                }
                else
                {
                    alert.MessageBoxIcon = MessageBoxIcon.Error;
                    alert.Message        = "数据保存失败";
                }

                alert.Show();
            }
        }