Ejemplo n.º 1
0
        void treeList_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
        {
            this.panel2.Controls.Clear();
            this.panel3.Controls.Clear();

            if (e.Node.Level == 2)
            {
                GridControl grid = new GridControl();
                grid.Dock = DockStyle.Fill;

                this.panel2.Controls.Add(grid);

                string prodID = e.Node.GetValue("ITEMS").ToString();

                DataTable dt = null;

                if (this.radioGroupQueryOption.SelectedIndex == 0)
                {
                    dt = BindGridData(prodID, grid, 0);
                    DrawChart(dt, 0);
                }
                else
                {
                    dt = BindGridData(prodID, grid, 1);
                    DrawChart(dt, 1);
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 选择节点之前设定控件状态
 /// </summary>
 private void treeListDept_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
 {
     try
     {
         if (bSDepartment.Current != null)
         {
             if (((DataRowView)bSDepartment.Current).IsEdit)
             {
                 int     oldId = e.OldNode == null ? 0 : DataTypeConvert.GetInt(e.OldNode["AutoId"]);
                 DataRow dr    = ((DataRowView)bSDepartment.Current).Row;
                 if (dr.RowState == DataRowState.Added && oldId != 0)
                 {
                     return;
                 }
                 else
                 {
                     dr.RejectChanges();
                     editForm.Set_Button_State(true);
                     editForm.Set_EditZone_ControlReadOnly(true);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         ExceptionHandler.HandleException(this.Text + "--选择节点之前设定控件状态错误。", ex);
     }
 }
Ejemplo n.º 3
0
 void treeList1_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e) {
     string id = e.Node["ID"].ToString();
     string type = e.Node["Type"].ToString();
     
     if (!e.Node.HasChildren) {
         treeList1.BeginInit();
         if (type == "gyxl") {
             IList<PS_xl> list = Ebada.Client.ClientHelper.PlatformSqlMap.GetList<PS_xl>("where orgcode='" + id.Substring(2) + "' and len(linecode)=6");
             foreach (PS_xl xl in list) {
                 mTable.Rows.Add(xl.LineName, xl.LineID, id, "xl");
                 mLines.Add(xl.LineID, xl);
             }
         } else if (type == "xlxh") {
             IList<PS_dxxh> list = Ebada.Client.ClientHelper.PlatformSqlMap.GetList<PS_dxxh>("SelectPS_dxxhList");
             //string lname = mLines[id].LineName;
             foreach (PS_dxxh xlxh in list)
             {
                 mTable.Rows.Add(xlxh.dxxh/*.Replace(lname, "")*/, xlxh.ID, id, "xlxhchild");
                 mDxxh.Add(xlxh.ID, xlxh);
             }
         } else if (type == "byqxh") {
            // string lname = e.Node["Name"].ToString();
             IList<PS_byqxh> list = Ebada.Client.ClientHelper.PlatformSqlMap.GetList<PS_byqxh>("SelectPS_byqxhList");
             foreach (PS_byqxh byqxh in list)
             {
                 mTable.Rows.Add(byqxh.byqModle/*.Replace(lname, "")*/, byqxh.ID, id, "byqxhchild");
                 mByqxh.Add(byqxh.ID, byqxh);
             }
         } 
         treeList1.EndInit();
     }
 }
Ejemplo n.º 4
0
        private void treeList1_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
        {
            if (this.platformWeightRadioGroup.SelectedIndex == StrategyOptionMapping.PlatformWeightSetTypeDict[StrategyOptionMapping.manualWeightSetTypeName])
            {
                if (e.Node.Equals(this.manualAssignNode) || e.Node.Equals(this.primaryVariableManualAssignNode) || e.Node.Equals(this.secondaryVariableManualAssignNode))
                {
                    e.CanFocus = true;
                }
                else if (e.Node.Equals(this.autoAssignNode) || e.Node.Equals(this.FactorPriorityNode) || e.Node.Equals(this.platformPriorityNode))
                {
                    e.CanFocus = false;
                }
            }
            else if (this.platformWeightRadioGroup.SelectedIndex == StrategyOptionMapping.PlatformWeightSetTypeDict[StrategyOptionMapping.autoWeightSetTypeName])
            {
                if (e.Node.Equals(this.manualAssignNode) || e.Node.Equals(this.primaryVariableManualAssignNode) || e.Node.Equals(this.secondaryVariableManualAssignNode))
                {
                    e.CanFocus = false;
                }
                else if (e.Node.Equals(this.autoAssignNode) || e.Node.Equals(this.FactorPriorityNode) || e.Node.Equals(this.platformPriorityNode))
                {
                    e.CanFocus = true;
                }
            }

            if (!checkCurrentPageValid(sender, e))
            {
                e.CanFocus = false;
            }
        }
Ejemplo n.º 5
0
        void treeList1_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e) {
            string id = e.Node["ID"].ToString();
            string type = e.Node["Type"].ToString();

            if (!e.Node.HasChildren)
            {
                treeList1.BeginInit();
                if (type == "xl")
                {
                    IList<sd_xl> list = Ebada.Client.ClientHelper.PlatformSqlMap.GetList<sd_xl>("where parentid='" + id + "'");
                    
                    
                    foreach (sd_xl xl in list)
                    {

                        if (!mLines.ContainsKey(xl.LineID))
                        {
                            mTable.Rows.Add(xl.LineName, xl.LineID, id, "xl");
                            mLines.Add(xl.LineID, xl);
                        }
                    }
                } 
          
                treeList1.EndInit();
            }
        }
Ejemplo n.º 6
0
 private void treeList_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs bfnea)
 {
     // if the tree list node is not enabled don't allow it to be focused
     if (Convert.ToBoolean(bfnea.Node.GetValue(EnabledFieldName)) == false)
     {
         bfnea.CanFocus = false;
     }
 }
Ejemplo n.º 7
0
 private void TreeListOnBeforeFocusNode(object sender, BeforeFocusNodeEventArgs beforeFocusNodeEventArgs)
 {
     if (!beforeFocusNodeEventArgs.CanFocus)
     {
         return;
     }
     beforeFocusNodeEventArgs.CanFocus = OnItemChanging(sender,
                                                        _treeList.GetDataRecordByNode(beforeFocusNodeEventArgs.Node));
 }
Ejemplo n.º 8
0
        void treeList1_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e) {
            string id = e.Node["ID"].ToString();
            string type = e.Node["Type"].ToString();
            
            if (!e.Node.HasChildren) {
                treeList1.BeginInit();
                if (type == "gyxl") {
                    IList<PS_xl> list = Ebada.Client.ClientHelper.PlatformSqlMap.GetList<PS_xl>("where orgcode='" + id.Substring(2) + "' and len(linecode)=6");
                    foreach (PS_xl xl in list) {
                        mTable.Rows.Add(xl.LineName, xl.LineID, id, "xl");
                        mLines.Add(xl.LineID, xl);
                    }
                } else if (type == "xl") {
                    IList<PS_xl> list = Ebada.Client.ClientHelper.PlatformSqlMap.GetList<PS_xl>("where parentid='" + id + "' and linevol='10'");
                    string lname = mLines[id].LineName;
                    foreach (PS_xl xl in list) {

                        if (!mLines.ContainsKey(xl.LineID)) {
                            mTable.Rows.Add(xl.LineName, xl.LineID, id, "xl");
                            mLines.Add(xl.LineID, xl);
                        }
                    }
                } else if (type == "xl2") {
                    IList<PS_xl> list = Ebada.Client.ClientHelper.PlatformSqlMap.GetList<PS_xl>("where parentid='" + id + "' and linevol='0.4' ");
                    ///string lname = mLines2[id].LineName;
                    foreach (PS_xl xl in list) {

                        if (!mLines2.ContainsKey(xl.LineID)) {
                            mTable.Rows.Add(xl.LineName, xl.LineID, id, "xl2");
                            mLines2.Add(xl.LineID, xl);
                        }
                    }
                } else if (type == "dxl") {
                    string lname = e.Node["Name"].ToString();
                    IList<PS_xl> list = Ebada.Client.ClientHelper.PlatformSqlMap.GetList<PS_xl>("where parentid='" + id.Substring(2) + "'  and linevol='0.4'");
                    foreach (PS_xl xl in list) {
                        if (!mLines2.ContainsKey(xl.LineID)) {
                            mTable.Rows.Add(xl.LineName, xl.LineID, id, "xl2");
                            mLines2.Add(xl.LineID, xl);
                        }
                    }
                } else if (type == "dyxl") {
                    IList<PS_tq> list = Ebada.Client.ClientHelper.PlatformSqlMap.GetList<PS_tq>("where left(tqcode,3)='" + id.Substring(2) + "'");
                    foreach (PS_tq xl in list) {
                        mTable.Rows.Add(xl.tqName, "tq"+xl.tqCode, id, "dxl");
                        //mTQs.Add(xl.tqID, xl);
                    }
                }
                treeList1.EndInit();
            }
        }
Ejemplo n.º 9
0
 private void treeList1_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
 {
     if (modified || newRec)
     {
         if (checkForms())
         {
             e.CanFocus = true;
         }
         else
         {
             e.CanFocus = false;
         }
     }
 }
Ejemplo n.º 10
0
 private bool checkCurrentPageValid(object sender, BeforeFocusNodeEventArgs e)
 {
     if (e.CanFocus)
     {
         if (e.OldNode == this.primaryVariableManualAssignNode && e.Node != this.primaryVariableManualAssignNode)
         {
             return(checkPrimaryGridViewValid());
         }
         else if (e.OldNode == this.secondaryVariableManualAssignNode && e.Node != this.secondaryVariableManualAssignNode)
         {
             return(checkSecondaryGridViewValid());
         }
     }
     return(true);
 }
Ejemplo n.º 11
0
 private void treeList1_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
 {
     if (e.Node.GetValue("name").Equals("General") && lastFocusName.Equals("Dependence Setting"))
     {
         this.saveCurrentDependenceRecord();
         if (checkDependenceRecordValid())
         {
             e.CanFocus = true;
         }
         else
         {
             e.CanFocus = false;
         }
     }
     else
     {
         e.CanFocus = true;
     }
 }
Ejemplo n.º 12
0
 private void TreeListBeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
 {
 }
Ejemplo n.º 13
0
 private void TreeListBeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
 {
 }
Ejemplo n.º 14
0
 void treeList1_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e) {
     
 }
Ejemplo n.º 15
0
 void treeList_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
 {
     e.CanFocus = (TreeList.GetDataRecordByNode(e.Node) is FilterItemBase);
 }
Ejemplo n.º 16
0
        void prodiclist_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
        {
            #region 动态加载体检项信息采集控件
            if (prodiclist.FocusedNode == null)
            {
                e.CanFocus = true;
                return;
            }
            prodiclist.Columns["cur_value"].ColumnEdit = null;
            string cur_value_str = e.Node.GetValue("m_value").ToString();

            if (e.Node.GetValue("cur_value").ToString() != "-")
            {
                string controltype = e.Node.GetValue("control_type").ToString();
                if (controltype == "" || controltype == "1")
                {
                    //文字类型 或 未知类型
                }
                else if (controltype == "2" || controltype == "3")
                {
                    //数字类型 2 整合 3 小数
                }
                else if (controltype == "4")
                {
                    string cur_value_strc = e.Node.GetValue("m_value") + "-" + e.Node.GetValue("cur_value");
                    #region 单选
                    rg_cur_value.Properties.Items.Clear();

                    string   contorl_static_str = e.Node.GetValue("contorl_static").ToString();
                    string[] strs = contorl_static_str.Split('|');
                    for (int i = 0; i < strs.Length; i++)
                    {
                        string[] element1 = strs[i].Split(',');
                        if (element1.Length > 1)
                        {
                            DevExpress.XtraEditors.Controls.RadioGroupItem item = new DevExpress.XtraEditors.Controls.RadioGroupItem();
                            item.Description = element1[1];
                            item.Value       = element1[0] + "-" + element1[1];
                            rg_cur_value.Properties.Items.Add(item);
                        }
                    }

                    rg_cur_value.EditValue = cur_value_strc;

                    prodiclist.Columns["cur_value"].ColumnEdit = ripcrg_cur_value;
                    #endregion
                }
                else if (controltype == "5")//多选
                {
                    #region 多选控件
                    string cur_value_strcs = e.Node.GetValue("m_value").ToString();
                    string cur_value_strc  = e.Node.GetValue("cur_value").ToString();
                    ccbe_cur_value.Items.Clear();
                    string[]      cur_value_strs  = cur_value_strcs.Split(',');
                    string[]      cur_value_strds = cur_value_strc.Split(',');
                    List <string> ss = new List <string>();
                    for (int i = 0; i < cur_value_strs.Length; i++)
                    {
                        ss.Add(cur_value_strs[i] + "-" + cur_value_strds[i]);
                    }


                    string   contorl_static_str = e.Node.GetValue("contorl_static").ToString();
                    string[] strs = contorl_static_str.Split('|');
                    for (int i = 0; i < strs.Length; i++)
                    {
                        string[] element1 = strs[i].Split(',');
                        if (element1.Length > 1)
                        {
                            DevExpress.XtraEditors.Controls.CheckedListBoxItem item = new DevExpress.XtraEditors.Controls.CheckedListBoxItem();
                            item.Description = element1[1];
                            item.Value       = element1[0] + "-" + element1[1];
                            if (ss.Contains(element1[0] + "-" + element1[1]))
                            {
                                item.CheckState = CheckState.Checked;
                            }
                            ccbe_cur_value.Items.Add(item);
                        }
                    }
                    prodiclist.Columns["cur_value"].ColumnEdit = pipc_cur_value;

                    #endregion
                }
                else if (controltype == "6")//日期
                {
                    #region 多选控件
                    try
                    {
                        prodiclist.Columns["cur_value"].ColumnEdit = ride_value;
                    }
                    catch
                    {
                    }
                    #endregion
                }
            }
            #endregion
        }
Ejemplo n.º 17
0
 void treeList1_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e) {
     string id = e.Node["ID"].ToString();
     string type = e.Node["type"].ToString();
     if (!e.Node.HasChildren && type=="0") {
         mTable.Rows.Add(hide, "0", "_", id+"^", id);
     }
 }
Ejemplo n.º 18
0
 void prodiclist_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
 {
 }
Ejemplo n.º 19
0
 private void OnBeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
 {
     e.CanFocus = false;
 }
Ejemplo n.º 20
0
 void treeList1_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e) {
     string id = e.Node["ID"].ToString();
     if (id.Contains("_") && !e.Node.HasChildren) {
         mTable.Rows.Add(hide, "0", "_", id+"^", id);
     }
 }
Ejemplo n.º 21
0
 private void TreeItems_BeforeFocusNode(object sender, BeforeFocusNodeEventArgs e)
 {
 }