protected override void OnLoad(EventArgs e)
        {
            #region GridControl中特殊字段绑定
            DataTable dicDpt = Tmo_FakeEntityClient.Instance.GetData("tmo_department", new[] { "dpt_id", "dpt_name", "dpt_parent" }, "dpt_id in (" + TmoComm.login_docInfo.children_department + "," + TmoComm.login_docInfo.doc_department + ")");
            DataRow   dr1    = dicDpt.NewRow();
            dr1["dpt_id"] = -1; dr1["dpt_name"] = "无部门";
            dicDpt.Rows.Add(dr1);
            TSCommon.BindRepositoryImageComboBox(rp_doc_department, dicDpt, "dpt_name", "dpt_id");

            DataTable dicGroup   = MemoryCacheHelper.GetCacheItem <DataTable>("tmo_docgroup", () => Tmo_FakeEntityClient.Instance.GetData("tmo_docgroup", new[] { "group_id", "group_name" }, "group_level>=" + TmoComm.login_docInfo.doc_group_level), DateTime.Now.AddMinutes(5));
            DataTable dicGroupCp = dicGroup.Copy();
            DataRow   dr2        = dicGroupCp.NewRow();
            dr2["group_id"] = -1; dr2["group_name"] = "无群组";
            dicGroupCp.Rows.Add(dr2);
            TSCommon.BindRepositoryImageComboBox(rp_doc_group, dicGroupCp, "group_name", "group_id");
            #endregion

            #region 查询条件绑定
            UCTreeListSelector selCheck = new UCTreeListSelector(false);
            DataRow[]          drs      = dicDpt.Select("dpt_id=" + TmoComm.login_docInfo.doc_department);
            for (int i = 0; i < drs.Length; i++)
            {
                dicDpt.Rows.Remove(drs[i]);
            }
            selCheck.InitData(doc_department, dicDpt, "dpt_id", "dpt_parent", "dpt_name", true);

            TSCommon.BindImageComboBox(doc_group, dicGroup, "", "group_name", "group_id", true);
            #endregion

            base.OnLoad(e);
        }
 public ucPointsChangeList()
 {
     InitializeComponent();
     Title = "积分兑换记录";
     GetData();
     TSCommon.SetGridControl(dgcTree);
 }
        public void InitData(PopupContainerEdit popupcEdit, DataTable dtSource, string keyFieldName, string parentFieldName, string previewFieldName, bool showCheckBox = false)
        {
            PopupcEdit    = popupcEdit;
            allowCheckBox = showCheckBox;
            TSCommon.SetTreeList(treeList1, showCheckBox);
            if (showCheckBox)
            {
                treeList1.AfterCheckNode += treeList1_AfterCheckNode;
            }
            else
            {
                treeList1.FocusedNodeChanged += treeList1_FocusedNodeChanged;
                //treeList1.AfterFocusNode += treeList1_AfterFocusNode;
            }

            treeList1.KeyFieldName     = keyFieldName;
            treeList1.ParentFieldName  = parentFieldName;
            treeList1.PreviewFieldName = previewFieldName;
            if (!string.IsNullOrWhiteSpace(previewFieldName))
            {
                TreeListColumn tc = new TreeListColumn {
                    Name = previewFieldName, FieldName = previewFieldName, VisibleIndex = 0
                };
                tc.OptionsColumn.AllowEdit = false;
                treeList1.Columns.Add(tc);
            }
            treeList1.DataSource = dtSource;
            treeList1.ExpandAll();
        }
Exemple #4
0
        private void LinkEdit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ImageComboBoxItem selItem = lbType.SelectedItem as ImageComboBoxItem;

            if (selItem != null)
            {
                var    drs    = _intelibType.Select("type_id=" + selItem.Value);
                string doc_id = drs[0]["doc_id"].ToString();
                if (doc_id == TmoComm.login_docInfo.doc_id.ToString())
                {
                    UCIntervenelibTypeEditor typeEditor = new UCIntervenelibTypeEditor()
                    {
                        Title = "修改干预库类型", PrimaryKeyValue = selItem.Value.ToString(), DbOperaType = DBOperateType.Update
                    };
                    if (typeEditor.ShowDialog() == DialogResult.OK)
                    {
                        DXMessageBox.Show("干预库类型修改成功!", true);
                        _intelibType = Tmo_FakeEntityClient.Instance.GetData("tmo_intervenelibtype");
                        TSCommon.BindImageComboBox(lbType, _intelibType, null, "type_name", "type_id");
                    }
                    typeEditor.Dispose();
                }
                else
                {
                    DXMessageBox.ShowWarning("没有权限(非创建者)!\n创建者ID[" + doc_id + "]");
                }
            }
        }
Exemple #5
0
 public UCSyncMain()
 {
     InitializeComponent();
     gridViewMain.RowCellClick += gridViewMain_RowCellClick;
     TSCommon.SetGridControl(gc_DevList, "没有监测到设备");
     gc_DevList.DataSource = deviceList;
 }
 public ucPointsProductList()
 {
     InitializeComponent();
     Title = "商品列表";
     GetData();
     TSCommon.SetGridControl(dgcTree);
 }
 public string GetEditValue()
 {
     if (allowCheckBox)
     {
         if (dicValues == null)
         {
             dicValues = TSCommon.GetTreeListCheckedKeyValue(treeList1);
         }
         StringBuilder sb = new StringBuilder();
         int           i  = 1;
         foreach (object item in dicValues.Keys)
         {
             if (item != null)
             {
                 sb.AppendFormat("{0}", item);
             }
             if (i < dicValues.Count)
             {
                 sb.Append(",");
             }
             i++;
         }
         return(sb.ToString());
     }
     else
     {
         DataRowView drv = treeList1.GetDataRecordByNode(treeList1.FocusedNode) as DataRowView;
         if (drv != null)
         {
             object val = drv[treeList1.KeyFieldName];
             return(val == null ? null : val.ToString());
         }
     }
     return(null);
 }
        public frmPlanShow()
        {
            InitializeComponent();
            gridView2.RowCellClick += gridView1_RowCellClick;

            TSCommon.SetGridControl(dgcTree);
        }
 public ucManagermentList()
 {
     InitializeComponent();
     Title = "管理建议";
     GetData();
     TSCommon.SetGridControl(dgcTree);
 }
Exemple #10
0
 public ucReadList()
 {
     Title = "网站管理";
     InitializeComponent();
     TSCommon.SetGridControl(dgcTree);
     IniData();
 }
Exemple #11
0
        private void LinkDel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ImageComboBoxItem selItem = lbType.SelectedItem as ImageComboBoxItem;

            if (selItem != null)
            {
                var    drs    = _intelibType.Select("type_id=" + selItem.Value);
                string doc_id = drs[0]["doc_id"].ToString();
                if (doc_id == TmoComm.login_docInfo.doc_id.ToString())
                {
                    DXMessageBox.btnOKClick += (_sender, _e) =>
                    {
                        bool del = Tmo_FakeEntityClient.Instance.DeleteData("tmo_intervenelibtype", "type_id", selItem.Value.ToString());
                        if (del)
                        {
                            DXMessageBox.Show("干预库类型删除成功!", true);
                            _intelibType = Tmo_FakeEntityClient.Instance.GetData("tmo_intervenelibtype");
                            TSCommon.BindImageComboBox(lbType, _intelibType, null, "type_name", "type_id");
                        }
                    };
                    DXMessageBox.ShowQuestion(string.Format("确定要删除干预库类型【{0}】吗?", selItem.Description));
                }
                else
                {
                    DXMessageBox.ShowWarning("没有权限(非创建者)!\n创建者ID[" + doc_id + "]");
                }
            }
        }
 public ucprodiclist()
 {
     InitializeComponent();
     this.btnCreate.Click   += btnCreate_Click;
     gridView2.RowCellClick += gridView1_RowCellClick;
     TSCommon.SetGridControl(dgcTree);
     GetComdata();
 }
 public ucSportDiaryList()
 {
     InitializeComponent();
     Title = "运动记录";
     GetData();
     TSCommon.SetGridControl(dgcTree);
     gridView1.RowCellClick += gridView1_RowCellClick;
 }
Exemple #14
0
 void frmMain_VisibleChanged(object sender, EventArgs e)
 {
     if (!frmMain.Visible && !this.Visible)
     {
         TSCommon.SetSkin("Office 2013");
         this.Show();
     }
 }
 public ucPharmacyDiaryList()
 {
     InitializeComponent();
     //Title = "用药记录";
     GetData();
     TSCommon.SetGridControl(dgcTree);
     gridView1.RowCellClick += gridView1_RowCellClick;
 }
Exemple #16
0
        void UCUserEditor_Load(object sender, EventArgs e)
        {
            //读取民族数据
            DataTable dicNation = MemoryCacheHelper.GetCacheItem <DataTable>("nationality", () =>
            {
                return(Tmo_FakeEntityClient.Instance.GetData("tmo_nationality", new[] { "code", "name" }));
            }, DateTime.Now.AddHours(24)); //由于民族数据基本不变 24小时过期

            TSCommon.BindImageComboBox(nation, dicNation, null, "name", "code", true);

            birthday.EditValue = DateTime.Now.Date;
            //绑定婚姻状况
            DataTable dicMarital = MemoryCacheHelper.GetCacheItem <DataTable>("marital", () =>
            {
                return(Tmo_FakeEntityClient.Instance.GetData("tmo_marital"));
            }, DateTime.Now.AddHours(24));

            TSCommon.BindImageComboBox(marital, dicMarital, null, "name", "code", true);

            //绑定省数据
            DataTable dicProvincecode = MemoryCacheHelper.GetCacheItem <DataTable>("provincecode", () => Tmo_FakeEntityClient.Instance.GetData("tmo_provincecode"), DateTime.Now.AddHours(24));

            province_id.SelectedValueChanged += (object sender0, EventArgs e0) =>
            {//绑定市数据
                city_id.Enabled = province_id.EditValue != null;
                DataTable dicCitycode = MemoryCacheHelper.GetCacheItem <DataTable>("citycode", () => Tmo_FakeEntityClient.Instance.GetData("tmo_citycode"), DateTime.Now.AddHours(24));
                TSCommon.BindImageComboBox(city_id, dicCitycode, "province_id='" + province_id.EditValue + "'", "city_name", "city_id", true);
            };
            city_id.SelectedValueChanged += (object sender0, EventArgs e0) =>
            {//绑定区数据
                eare_id.Enabled = city_id.EditValue != null;
                DataTable dicAreacode = MemoryCacheHelper.GetCacheItem <DataTable>("areacode", () => Tmo_FakeEntityClient.Instance.GetData("tmo_areacode"), DateTime.Now.AddHours(24));
                TSCommon.BindImageComboBox(eare_id, dicAreacode, "city_id='" + city_id.EditValue + "'", "area_name", "area_id", true);
            };
            TSCommon.BindImageComboBox(province_id, dicProvincecode, null, "province_name", "province_id", true);

            //绑定职业类型
            DataTable dicOccupation = MemoryCacheHelper.GetCacheItem <DataTable>("occupation", () =>
            {
                return(Tmo_FakeEntityClient.Instance.GetData("tmo_occupation"));
            }, DateTime.Now.AddHours(24));

            TSCommon.BindImageComboBox(occupation, dicOccupation, null, "name", "code", true);

            //绑定文化程度
            DataTable dicEducation = MemoryCacheHelper.GetCacheItem <DataTable>("education", () =>
            {
                return(Tmo_FakeEntityClient.Instance.GetData("tmo_education"));
            }, DateTime.Now.AddHours(24));

            TSCommon.BindImageComboBox(education, dicEducation, null, "name", "code", true);

            InitValidationRules();

            DataTable dicDpt = Tmo_FakeEntityClient.Instance.GetData("tmo_department", new[] { "dpt_id", "dpt_name", "dpt_parent" }, "dpt_id in (" + TmoComm.login_docInfo.children_department + ")");

            selCheck.InitData(dpt_id, dicDpt, "dpt_id", "dpt_parent", "dpt_name");
        }
Exemple #17
0
 public ucvideoList()
 {
     InitializeComponent();
     Title = "视频管理维护";
     this.btnCreate.Click   += btnCreate_Click;
     gridView2.RowCellClick += gridView1_RowCellClick;
     TSCommon.SetGridControl(dgcTree);
     GetData();
 }
 public FrmDataShow(string userID)
 {
     InitializeComponent();
     _uid = userID;
     GetItemData();
     dgvMainEx.RowCellClick += dgvMainEx_RowCellClick;
     TSCommon.SetGridControl(dgvEx);
     TSCommon.SetGridControl(dgvMonitor);
 }
 public ucluruList(string userId)
 {
     InitializeComponent();
     Title    = "录入指标列表";
     _user_id = userId;
     gridView2.RowCellClick += gridView1_RowCellClick;
     TSCommon.SetGridControl(dgcTree);
     GetData();
 }
 public TmoUcPurchasesList()
 {
     InitializeComponent();
     Title = "进货管理";
     ComboBoxBind();
     GetData();
     btnPurchases.Click += btnPurchases_Click;
     productType.SelectedIndexChanged += productType_SelectedIndexChanged;
     TSCommon.SetGridControl(dgcTree);
 }
Exemple #21
0
 public UCDepartmentInfo()
 {
     InitializeComponent();
     Title          = "部门管理";
     AllowPagePanel = false;
     TSCommon.SetTreeList(treeList1);
     TableName  = "tmo_department";
     PrimaryKey = "dpt_id";
     Columns    = new[] { "dpt_id", "dpt_id dpt_id2", "dpt_name", "dpt_parent", "input_time" };
 }
Exemple #22
0
 public UCFunction()
 {
     Title = "权限管理";
     InitializeComponent();
     Init("tmo_function", "func_id");
     OrderByConditons.Add(new OrderByCondition("input_time"));
     AllowPagePanel = false;
     btnAdd.Visible = false;
     TSCommon.SetTreeList(treeList1);
 }
Exemple #23
0
 public TmoUcStockList()
 {
     InitializeComponent();
     Title = "库存管理";
     ComboBoxBind();
     GetData();
     produtType.SelectedIndexChanged += produtType_SelectedIndexChanged;
     TSCommon.SetGridControl(dgcTree);
     btnAddProduct.Click    += btnAddProduct_Click;
     gridView1.RowCellClick += gridView1_RowCellClick;
 }
Exemple #24
0
 public void IniData()
 {
     _pageSize  = Convert.ToInt32(this.txtPageSize.Text);
     this.Load += ReportList_Load;
     TSCommon.SetGridControl(dgcTree);
     AddArticle.Click         += AddArticle_Click;
     Search.Click             += Search_Click;
     Clear.Click              += Clear_Click;
     editcheck.CheckedChanged += editcheck_CheckedChanged;
     gridView1.RowCellClick   += gridView1_RowCellClick;
     ComboBoxBind();
 }
Exemple #25
0
 public TmoUcSellList()
 {
     InitializeComponent();
     Title = "销售管理";
     ComboBoxBind();
     GetData();
     productType.SelectedIndexChanged += productType_SelectedIndexChanged;
     sellTime.CheckedChanged          += purchaseTime_CheckedChanged;
     sendTimeClick.CheckedChanged     += sendTimeClick_CheckedChanged;
     recieaveTimeClick.CheckedChanged += recieaveTimeClick_CheckedChanged;
     TSCommon.SetGridControl(dgcTree);
 }
 public NewExtendServer()
 {
     InitializeComponent();
     Title            = "新延伸服务";
     TitleDescription = " ";
     this.repositoryItemHyperLinkEdit1.Click += repositoryItemHyperLinkEdit1_Click;
     this.Load              += ReportList_Load;
     btnquery.Click         += btnquery_Click;
     btnclear.Click         += btnclear_Click;
     _pageSize               = Convert.ToInt32(this.txtPageSize.Text);
     gridView1.RowCellClick += gridView1_RowCellClick;
     TSCommon.SetGridControl(dgcTree);
 }
Exemple #27
0
 private void UCInterveneEditor_Load(object sender, EventArgs e)
 {
     InitValidationRules();
     dteIntePlantime.DateTime = DateTime.Today;
     teIntePlantime.Time      = DateTime.Now;
     _intelibType             = Tmo_FakeEntityClient.Instance.GetData("tmo_intervenelibtype");
     TSCommon.BindImageComboBox(lbType, _intelibType, null, "type_name", "type_id");
     user_id_Click(null, null);
     if (DbOperaType == DBOperateType.Update || !TmoComm.login_docInfo.doc_function_list.Contains("funSaveInterveneLib"))
     {
         groupControl2.Enabled = false;
     }
 }
 public NewReporttenance()
 {
     InitializeComponent();
     Title            = "报告维护";
     TitleDescription = " ";
     this.repositoryItemHyperLinkEdit1.Click += repositoryItemHyperLinkEdit1_Click;
     this.Load      += ReportList_Load;
     btnquery.Click += btnquery_Click;
     btnclear.Click += btnclear_Click;
     repositoryItemHyperLinkEdit2.Click += repositoryItemHyperLinkEdit2_Click;
     gridView1.RowCellClick             += new DevExpress.XtraGrid.Views.Grid.RowCellClickEventHandler(dgvMain_RowCellClick);
     TSCommon.SetGridControl(dgcTree);
 }
Exemple #29
0
        private void LinkAdd_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            UCIntervenelibTypeEditor typeEditor = new UCIntervenelibTypeEditor()
            {
                Title = "新建干预库类型", DbOperaType = DBOperateType.Add
            };

            if (typeEditor.ShowDialog() == DialogResult.OK)
            {
                DXMessageBox.Show("干预库类型创建成功!", true);
                _intelibType = Tmo_FakeEntityClient.Instance.GetData("tmo_intervenelibtype");
                TSCommon.BindImageComboBox(lbType, _intelibType, null, "type_name", "type_id");
            }
            typeEditor.Dispose();
        }
Exemple #30
0
 public tmo_projectShow()
 {
     InitializeComponent();
     Title            = "方案管理";
     TitleDescription = " ";
     this.repositoryItemHyperLinkEdit1.Click += repositoryItemHyperLinkEdit1_Click;
     this.Load              += ReportList_Load;
     btnquery.Click         += btnquery_Click;
     btnclear.Click         += btnclear_Click;
     linkdel.Click          += linkdel_Click;
     _pageSize               = Convert.ToInt32(this.txtPageSize.Text);
     gridView2.RowCellClick += gridView1_RowCellClick;
     user_codetxt.KeyDown   += ReportShow_KeyDown;
     btntest.Click          += btntest_Click;
     TSCommon.SetGridControl(dgcTree);
 }