Пример #1
0
 protected override void BeforeGetData()
 {
     JoinConditions.Clear();
     JoinConditions.Add(new JoinCondition {
         JoinType = EmJoinType.LeftJoin, Table = "tmo_docinfo", OnCol = "doc_id"
     });
     if (bindDev.EditValue != null)
     {
         JoinConditions.Add(new JoinCondition
         {
             JoinType    = EmJoinType.RightJoin,
             Table       = $"(select dev_userid from tmo_monitor_devicebind where dev_type={bindDev.EditValue} GROUP BY dev_userid)",
             TableAsName = "b", OnCol = "dev_userid", MainTable = "tmo_userinfo", MainCol = "user_id"
         });
     }
     else
     {
         JoinConditions.Add(new JoinCondition
         {
             JoinType = EmJoinType.LeftJoin, Table = "(select dev_userid from tmo_monitor_devicebind GROUP BY dev_userid)", TableAsName = "b",
             OnCol    = "dev_userid", MainTable = "tmo_userinfo", MainCol = "user_id"
         });
     }
     FixWhere = $"(tmo_userinfo.doc_id in ({TmoComm.login_docInfo.children_docid}) or tmo_userinfo.doc_id is null)";
 }
Пример #2
0
 public UCQuestionSave()
 {
     Title = "指标分析";
     InitializeComponent();
     BrowseMode = true;
     TableName  = "tmo_question_save";
     Columns    = new[] { "tmo_question_save.*", "u.gender", "u.age", "u.name" };
     JoinConditions.Add(new JoinCondition()
     {
         JoinType = EmJoinType.LeftJoin, MainCol = "user_id", OnCol = "user_id", Table = "tmo_userinfo", TableAsName = "u"
     });
     OrderByConditons.Add(new OrderByCondition("tmo_question_save.questionnaire_time", true));
     btnSelcet.Click += btnSelcet_Click;
     btnClear.Click  += btnClear_Click;
 }
Пример #3
0
        public UCActionPlanInfo()
        {
            Title = "健康行动计划";
            InitializeComponent();
            TableName = "tmo_userstatus";
            Columns   = new[] { "tmo_userstatus.user_id", "tmo_userstatus.usertimes as user_times", "tmo_userstatus.questionnare_status", "'' as actionplan",
                                "tmo_userinfo.name", "tmo_userinfo.gender", "tmo_userinfo.age", "tmo_userinfo.birthday", "tmo_userinfo.input_time",
                                "tmo_docinfo.doc_name", "tmo_extend_service.pay_money", "tmo_extend_service.pay_time", "tmo_actionplan.apid",
                                "tmo_actionplan.apstartdate", "tmo_actionplan.apenddate", "'' as acstate", "tmo_actionplanlib.aclb_title" };
            FixWhere = "tmo_userstatus.questionnare_status>=3 and tmo_userinfo.is_del!=1 and (tmo_userinfo.doc_id is null or tmo_userinfo.doc_id in (" + TmoComm.login_docInfo.children_docid + "))";
            JoinConditions.Add(new JoinCondition()
            {
                JoinType = EmJoinType.LeftJoin, MainCol = "user_id", MainTable = "tmo_userstatus", OnCol = "user_id", Table = "tmo_userinfo"
            });
            JoinConditions.Add(new JoinCondition()
            {
                JoinType = EmJoinType.LeftJoin, MainCol = "doc_id", MainTable = "tmo_userinfo", OnCol = "doc_id", Table = "tmo_docinfo"
            });
            JoinConditions.Add(new JoinCondition()
            {
                JoinType = EmJoinType.LeftJoin, MainCol = "id", MainTable = "tmo_userstatus", OnCol = "id", Table = "tmo_extend_service"
            });
            JoinConditions.Add(new JoinCondition()
            {
                JoinType = EmJoinType.LeftJoin, MainCol = "user_id and tmo_actionplan.usertimes=tmo_userstatus.usertimes", MainTable = "tmo_userstatus", OnCol = "userid", Table = "tmo_actionplan"
            });
            JoinConditions.Add(new JoinCondition()
            {
                JoinType = EmJoinType.LeftJoin, MainCol = "aplib", MainTable = "tmo_actionplan", OnCol = "aclb_id", Table = "tmo_actionplanlib"
            });

            OrderByConditons.Add(new OrderByCondition()
            {
                Col = "tmo_extend_service.pay_time", IsDesc = true
            });

            HasEdit = false;
            HasDel  = false;

            btnSelcet.Click            += btnSelcet_Click;
            btnClear.Click             += btnClear_Click;
            acStartTimeMin.Enabled      = acStartTimeMax.Enabled = acEndTimeMin.Enabled = acEndTimeMax.Enabled = false;
            ckStartTime.CheckedChanged += (s, e) => { acStartTimeMin.Enabled = acStartTimeMax.Enabled = ckStartTime.Checked; };
            ckEndTime.CheckedChanged   += (s, e) => { acEndTimeMin.Enabled = acEndTimeMax.Enabled = ckEndTime.Checked; };
            doc_id.Click += doc_id_Click;
        }
        public UCInterveneLibInfo()
        {
            Title = "健康干预库";
            InitializeComponent();
            //ChooseMode = true;
            btnUse.Click += BtnUse_Click;

            AllowPagePanel = false;
            Init("tmo_intervenelib", "intelb_id");
            Columns = new string[] { "tmo_intervenelibtype.type_name", "tmo_intervenelib.*" };
            JoinConditions.Add(new JoinCondition
            {
                JoinType = EmJoinType.LeftJoin,
                MainCol  = "intelb_type",
                Table    = "tmo_intervenelibtype",
                OnCol    = "type_id"
            });
        }
Пример #5
0
        public UCActionPlanLibInfo()
        {
            Title = "健康计划库";
            InitializeComponent();
            btnUse.Click += BtnUse_Click;

            AllowPagePanel = false;
            HasEdit        = false;
            Init("tmo_actionplanlib", "aclb_id");
            Columns = new string[] { "tmo_actionplanlibtype.type_name", "tmo_actionplanlib.aclb_id", "tmo_actionplanlib.aclb_title", "tmo_actionplanlib.aclb_content", "tmo_actionplanlib.aclb_base64Ext" };
            JoinConditions.Add(new JoinCondition
            {
                JoinType = EmJoinType.LeftJoin,
                MainCol  = "aclb_type",
                Table    = "tmo_actionplanlibtype",
                OnCol    = "type_id"
            });
        }
Пример #6
0
 public UCIntervene()
 {
     Title = "健康干预";
     InitializeComponent();
     Init("tmo_intervene", "inte_id");
     Columns = new[] { "tmo_userinfo.name", "tmo_userinfo.gender", "tmo_userinfo.age", "tmo_docinfo.doc_name", "tmo_intervene.*" };
     JoinConditions.Add(new JoinCondition()
     {
         JoinType = EmJoinType.LeftJoin, Table = "tmo_userinfo", OnCol = "user_id"
     });
     JoinConditions.Add(new JoinCondition()
     {
         JoinType = EmJoinType.LeftJoin, Table = "tmo_docinfo", OnCol = "doc_id", MainTable = "tmo_intervene"
     });
     OrderByConditons.Add(new OrderByCondition("tmo_intervene.input_time", true));
     ckInputTime.CheckedChanged += CkInputTime_CheckedChanged;
     ckPlanTime.CheckedChanged  += CkPlanTime_CheckedChanged;
     btnSelcet.Click            += BtnSelcet_Click;
     btnClear.Click             += btnClear_Click;
     doc_id.Click += doc_id_Click;
 }