Example #1
0
        public bool submit()
        {
            DataTable dt    = (DataTable)prodiclist.DataSource;
            DataTable dtNew = dt.Clone();

            foreach (DataRow row in dt.Rows)
            {
                if (row["isChange"].ToString() == "1")
                {
                    DataRow nowrow = dtNew.NewRow();
                    nowrow["project_id"]    = row["project_id"];
                    nowrow["solve_content"] = row["solve_content"];
                    dtNew.Rows.Add(nowrow);
                }
            }

            if (dtNew.Rows.Count > 0)
            {
                string allXml = TmoShare.getXMLFromDataTable(dtNew);
                bool   issuc  = (bool)TmoServiceClient.InvokeServerMethodT <bool>(funCode.updateAll, new object[] { allXml });
                return(issuc);
            }

            return(true);
        }
Example #2
0
        void btnsave_Click(object sender, EventArgs e)
        {
            DataTable dt      = (DataTable)dgcTree.DataSource;
            string    xmldata = TmoShare.getXMLFromDataTable(dt);

            if (btnsave.Text == "修改")
            {
                bool isT = TmoServiceClient.InvokeServerMethodT <bool>(TmoCommon.funCode.TuijianUpdate, new object[] { xmldata });
                if (isT)
                {
                    DXMessageBox.Show("修改成功!", true);
                    DialogResult = DialogResult.OK;
                }
                else
                {
                    DXMessageBox.Show("修改失败!", true);
                }
            }
            else
            {
                bool isT = TmoServiceClient.InvokeServerMethodT <bool>(TmoCommon.funCode.TuijianZhi, new object[] { xmldata });
                if (isT)
                {
                    DXMessageBox.Show("添加成功!", true);
                    DialogResult = DialogResult.OK;
                }
                else
                {
                    DXMessageBox.Show("添加失败!", true);
                }
            }
        }
        public static string GetData(string getdataEntityParams)
        {
            if (string.IsNullOrWhiteSpace(getdataEntityParams))
            {
                return(null);
            }
            DataTable dt = Tmo_FakeEntityManager.Instance.GetData(getdataEntityParams);

            return(TmoShare.getXMLFromDataTable(dt));
        }
        public static string GetTableStruct(string tableName)
        {
            if (string.IsNullOrWhiteSpace(tableName))
            {
                return(null);
            }
            DataTable dt = Tmo_FakeEntityManager.Instance.GetTableStruct(tableName);

            return(TmoShare.getXMLFromDataTable(dt));
        }
        public static string GetActionPlan(object[] param)
        {
            if (param == null || param.Length < 1 || param[0] == null)
            {
                throw new Exception("err_params");
            }
            string apid = param[0].ToString();
            var    dt   = tmo_actionplanManager.Instance.GetActionPlan(apid);

            return(TmoShare.getXMLFromDataTable(dt));
        }
        public static object GetAttach(string userId, string userTimes, string newOrold)
        {
            DataTable dt = tmo_web_attachmentManager.Instance.GetAttchs(userId, userTimes, newOrold);

            if (dt != null)
            {
                return(TmoShare.getXMLFromDataTable(dt));
            }
            else
            {
                return("");
            }
        }
        public static string GetDataUser(string userid, string suertime)
        {
            DataTable dt = tmo_tuijianManager.Instance.GetDataUser(userid, suertime);

            if (TmoShare.DataTableIsNotEmpty(dt))
            {
                return(TmoShare.getXMLFromDataTable(dt));
            }
            else
            {
                return("");
            }
        }
        public static string getTuiData()
        {
            DataTable dt = tmo_tuijianManager.Instance.GetData();

            if (TmoShare.DataTableIsNotEmpty(dt))
            {
                return(TmoShare.getXMLFromDataTable(dt));
            }
            else
            {
                return("");
            }
        }
        public static string GetMedicalIn(string xml)
        {
            DataTable dt = tmo_medical_inManager.Instance.GetDataUser(xml);

            if (TmoShare.DataTableIsNotEmpty(dt))
            {
                dt.TableName = "cc";
                return(TmoShare.getXMLFromDataTable(dt));
            }
            else
            {
                return("");
            }
        }
Example #10
0
        public static string getScreenData(string userId, string userTimes, string quesId)
        {
            DataTable dt = newReportManager.Instance.getScreenData(userId, userTimes, quesId);

            return(TmoShare.getXMLFromDataTable(dt));
        }
Example #11
0
        public static string getTest(string userId, string userTimes, string quesId)
        {
            DataTable dt = Tmo_TangNiaoManager.Instance.getTangNiaoData(userId, userTimes, quesId);

            return(TmoShare.getXMLFromDataTable(dt));
        }
Example #12
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            string contype = "";

            if (cmproType.SelectedIndex == 0)
            {
                DXMessageBox.Show("请选择题目答案的类型");
            }
            else
            {
                switch (cmproType.SelectedIndex)
                {
                case 1:
                    contype = "1";
                    break;

                case 2:
                    contype = "4";
                    break;

                case 3:
                    contype = "5";
                    break;

                case 4:
                    contype = "6";
                    break;
                }
            }
            if (string.IsNullOrEmpty(dic_name.Text))
            {
                DXMessageBox.Show("指标名称不能为空");
                return;
            }
            bool dicNametur = (bool)TmoServiceClient.InvokeServerMethodT <bool>(funCode.checkname, new object[] { dic_name.Text });

            if (!dicNametur)
            {
                DXMessageBox.Show("该指标名称已经被使用"); return;
            }
            if (string.IsNullOrEmpty(control_static.Text) && control_static.Visible)
            {
                DXMessageBox.Show("答案不能为空"); return;
            }

            DataTable dt = new DataTable();

            dt.TableName = "dd";
            dt.Columns.Add("dic_id", typeof(string));
            dt.Columns.Add("dic_name", typeof(string));
            dt.Columns.Add("dic_unit", typeof(string));
            dt.Columns.Add("control_type", typeof(string));
            dt.Columns.Add("contorl_static", typeof(string));
            DataRow drd = dt.NewRow();

            drd["dic_name"]       = dic_name.Text;
            drd["dic_unit"]       = dic_unit.Text;
            drd["control_type"]   = contype;
            drd["contorl_static"] = control_static.Text;

            if (update)
            {
                drd["dic_id"] = drinput["dic_id"];
                dt.Rows.Add(drd);
                string xml       = TmoShare.getXMLFromDataTable(dt);
                bool   updteTrue = (bool)TmoServiceClient.InvokeServerMethodT <bool>(funCode.updatemedic, new object[] { xml });
                if (updteTrue)
                {
                    DXMessageBox.ShowSuccess("修改成功");
                }
                else
                {
                    DXMessageBox.ShowWarning2("修改失败");
                }
            }
            else
            {
                dt.Rows.Add(drd);
                string xml       = TmoShare.getXMLFromDataTable(dt);
                bool   updteTrue = (bool)TmoServiceClient.InvokeServerMethodT <bool>(funCode.medicadd, new object[] { xml });
                if (updteTrue)
                {
                    DXMessageBox.ShowSuccess("添加成功");
                }
                else
                {
                    DXMessageBox.ShowWarning2("添加失败");
                }
            }
        }