Пример #1
0
        private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            string baseyear = "";

            baseyear = EnsureBaseYear(baseyear);
            if ((e.Value.ToString() != lastEditValue ||
                 lastEditNode != e.Node ||
                 lastEditColumn != e.Column) &&
                e.Column.FieldName.IndexOf("年") > 0 &&
                e.Column.Tag != null)
            {
                if (e.Column.FieldName.Replace("年", "") != baseyear && baseyear != "")
                {
                    return;
                }
                if (SaveCellValue((int)treeList1.FocusedColumn.Tag, (int)treeList1.FocusedNode.GetValue("ID"), Math.Round(Convert.ToDouble(e.Value), 2)))
                {
                    SetRateYearValue(e.Node, Math.Round(Convert.ToDouble(e.Value), 2));
                    CalculateSum(e.Node, e.Column);
                }
                else
                {
                    treeList1.FocusedNode.SetValue(treeList1.FocusedColumn.FieldName, lastEditValue);
                }
            }
        }
Пример #2
0
 private void roleTree_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     if (e.Column == colRoleValue)
     {
         UpdateRoleValue(e.Node, true);
     }
 }
Пример #3
0
 private void _tree_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     if (!ReferenceEquals(CellValueChanged, null))
     {
         CellValueChanged.Invoke(sender, new CellValueChangedEventArgs(e));
     }
 }
Пример #4
0
        private void treeListMenuInfo_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            Menuinfo menuinfo = treeListMenuInfo.GetDataRecordByNode(e.Node) as Menuinfo;

            menuinfoPowerClient.PropertyValueChanged(menuinfo, e.Column.FieldName);
            if (e.Value.ToString() == "True")
            {
                DevExpress.XtraTreeList.Nodes.TreeListNode node = e.Node.ParentNode;

                while (node != null)
                {
                    if (node.GetValue("CheckValue").ToString() == "True")
                    {
                        node = node.ParentNode;
                        continue;
                    }
                    menuinfo = treeListMenuInfo.GetDataRecordByNode(node) as Menuinfo;
                    menuinfo.Check(true);
                    menuinfoPowerClient.PropertyValueChanged(menuinfo, e.Column.FieldName);

                    node.SetValue("CheckValue", true);
                    node = node.ParentNode;
                }
            }
        }
Пример #5
0
        private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            if ((e.Value.ToString() != lastEditValue ||
                 lastEditNode != e.Node ||
                 lastEditColumn != e.Column)
                //&& e.Column.FieldName.IndexOf("年") > 0
                //&& e.Column.Tag != null
                )
            {
                if (e.Column.FieldName != "Lixi" && e.Column.FieldName != "Yubei" && e.Column.FieldName != "Dongtai" && e.Column.FieldName != "Dongtai")
                {
                    SaveCellValue((int)treeList1.FocusedColumn.Tag, (int)treeList1.FocusedNode.GetValue("ID"), Convert.ToDouble(e.Value));
                }
                else
                {
                    int id = (int)e.Node["ID"];

                    SaveCellValue(e.Column.FieldName, id, Convert.ToDouble(e.Value));
                }
                //
                CalculateSum(e.Node, e.Column);
                //}
                //else
                //{
                //    treeList1.FocusedNode.SetValue(treeList1.FocusedColumn.FieldName, lastEditValue);
                //}
            }

            CalculateNodeSum(e.Node);
        }
Пример #6
0
        private void treeList_CellValueChanging(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            try
            {
                //if (m_bDisableEvents == true) { return; }
                //if ((e.Column == colMoneyApprov) && (e.Value != null))
                //{
                //    e.Node.SetValue(colMoney, e.Value);
                //}
                //if ((e.Column == colDayApprov) && (e.Value != null))
                //{
                //    e.Node.SetValue(colDay, e.Value);
                //}
                //SetPropertiesModified(true);
            }//try
            catch (System.Exception f)
            {
                DevExpress.XtraEditors.XtraMessageBox.Show(
                    "Ошибка изменения свойств. Текст ошибки: " + f.Message, "Ошибка",
                    System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
            }
            finally
            {
            }

            return;
        }
Пример #7
0
        private void treeListChucNang_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            TrangThaiDuLieu tt = (TrangThaiDuLieu)e.Node["TrangThaiThayDoi"];

            if (tt != TrangThaiDuLieu.Them && tt != TrangThaiDuLieu.Xoa)
            {
                e.Node["TrangThaiThayDoi"] = TrangThaiDuLieu.CapNhat;
            }
        }
        private void tlSectionsBook_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            Object      DataRow = tlSectionsBook.GetDataRecordByNode(e.Node);
            DataRowView drv     = DataRow as DataRowView;

            if (drv != null)
            {
                drv.Row["Updated"] = 1;
            }
        }
Пример #9
0
 private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     if (e.Column.FieldName.IndexOf("月") > 0 &&
         !bLoadingData &&
         Convert.ToInt32(e.Column.FieldName.Replace("月", "")) < 13)
     {
         CalculateSum(e.Node);
         RefreshChart();
     }
 }
Пример #10
0
 private void treeListMenu_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     try
     {
         e.Node.SetValue("SeModificoValor", true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #11
0
 private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     if ((e.Value.ToString() != lastEditValue ||
          lastEditNode != e.Node ||
          lastEditColumn != e.Column) &&
         e.Column.FieldName.IndexOf("Col") == 0 &&
         !_isLoadingData)
     {
         CalculateSum(e.Node, e.Column);
         SaveNodeValue(e.Node);
     }
 }
Пример #12
0
 //TREELIST DOSYA,KLASÖR İSİM DEĞİŞTİRME
 private void treeListFolder_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     if (e.Value as String != "" && !e.Node.HasChildren)
     {
         fInfo = new FileInfo(e.Node[3] as String);
         fInfo.MoveTo(fInfo.DirectoryName + "\\" + e.Value);
     }
     else
     {
         MessageBox.Show("Ana Dizinlerin Adı Değiştirilemez", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     FillDosyaYonetici();
 }
Пример #13
0
 private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     //表格数据发生变化
     //if (e.Column.FieldName!= "Col2"&&e.Column.FieldName!="y1990") return;
     treeList1.BeginInit();
     try
     {
         CalculateSum(e.Node, e.Column);
     }
     catch
     { }
     treeList1.EndInit();
 }
Пример #14
0
        private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            if (e.Column.FieldName == "Remark")
            {
                SaveRemarkValue(treeList1.FocusedNode.GetValue("ID").ToString(), e.Value.ToString());
            }


            if (e.Column.FieldName != "Remark" && e.Column.FieldName != "Title")
            {
                SaveCellValue(treeList1.FocusedColumn.Tag.ToString(), treeList1.FocusedNode.GetValue("ID").ToString(), e.Value.ToString());
            }
        }
Пример #15
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            gruplar.dt_NotGruplari.Rows.Add(gruplar.dt_NotGruplari.NewRow());
            gruplar.dt_NotGruplari.Rows[gruplar.dt_NotGruplari.Rows.Count - 1]["GrupAdi"] = textEdit1.EditValue.ToString();

            if (checkEdit1.CheckState == CheckState.Checked)
            {
                gruplar.dt_NotGruplari.Rows[gruplar.dt_NotGruplari.Rows.Count - 1]["UstGurupID"] = treeList1.FocusedNode["NotGurupID"];
            }
            DevExpress.XtraTreeList.CellValueChangedEventArgs ee = new DevExpress.XtraTreeList.CellValueChangedEventArgs(null, treeList1.Nodes[treeList1.Nodes.Count - 1], null);

            treeList1_CellValueChanged(null, ee);
        }
Пример #16
0
        private void trlFeature_CellValueChanging(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            trlFeature.CellValueChanging -= trlFeature_CellValueChanging;

            if (e.Column == colIsAdd || e.Column == colIsEdit || e.Column == colIsDelete ||
                e.Column == colIsSave || e.Column == colIsPrintPreview || e.Column == colIsExportExcel)
            {
                //List<TreeListNode> lstNode = new List<TreeListNode>();
                CheckedNode(e.Node, e.Column, (bool)e.Value);
                e.Node.SetValue(e.Column, e.Value);
            }

            trlFeature.CellValueChanging += trlFeature_CellValueChanging;
        }
Пример #17
0
        private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            try
            {
                TrGenel = SqlConnections.GetBaglanti().BeginTransaction();
                //gruplar.GrupGuncelle(SqlConnections.GetBaglanti(), TrGenel, (DataRowView)treeList1.GetDataRecordByNode(treeList1.FocusedNode));
                gruplar.GrupGuncelle(SqlConnections.GetBaglanti(), TrGenel, (DataRowView)treeList1.GetDataRecordByNode(e.Node));

                TrGenel.Commit();
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #18
0
        private void trvJudgement_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            var pr  = Program.TargetJudgementPR;
            var itm = e.Node.Tag as JudgeItem;

            if (e.Column == trvJudgeCol_Score && pr != null && itm != null)
            {
                float fVal = 0;
                if (float.TryParse(e.Value as string, out fVal))
                {
                    pr.TaskScores[itm.ID] = fVal;
                    RefreshJudgementUI();
                }
            }
        }
Пример #19
0
        private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            if (!bl1)
            {
                return;
            }

            TreeListNode tln = treeList1.FocusedNode;

            if (tln == null)
            {
                return;
            }

            TreeListColumn tnc = treeList1.FocusedColumn;

            if (tnc.Caption.IndexOf("年") < 0)
            {
                return;
            }
            bl1 = false;
            double fuhe = 0;

            try
            {
                fuhe = double.Parse(tln[tnc.FieldName].ToString());
            }
            catch { return; }
            int a = 0;

            try { a = int.Parse(tnc.Caption.Replace("年", "")); }
            catch { }

            int    b  = endyear;
            double fh = 0;

            for (int i = a; i <= b; i++)
            {
                fh = 0;
                try
                {
                    tln.SetValue(i + "年", fh + fuhe);
                }
                catch { }
            }
            bl1 = true;
            bl2 = true;
        }
Пример #20
0
        private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            TreeListNode row = this.treeList1.FocusedNode;

            if (row == null)
            {
                return;
            }
            Ps_Forecast_Math pf = new Ps_Forecast_Math();

            ForecastClass1.TreeNodeToDataObject <Ps_Forecast_Math>(pf, row);
            Services.BaseService.Update <Ps_Forecast_Math>(pf);
            //CalculateSum2(row);
            //aaa(row);
            RefreshChart();
        }
Пример #21
0
        private void list_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            string column = e.Column.FieldName;
            int    row    = e.Node.Id;
            string value  = e.Value.ToString();

            switch (column)
            {
            case "label":
                actions[row].label = value;
                break;

            case "command":
                actions[row].command = value;
                break;
            }
        }
Пример #22
0
 private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     if ((e.Value.ToString() != lastEditValue ||
          lastEditNode != e.Node ||
          lastEditColumn != e.Column) &&
         e.Column.FieldName.IndexOf("年") > 0 &&
         e.Column.Tag != null)
     {
         if (SaveCellValue((int)treeList1.FocusedColumn.Tag, (int)treeList1.FocusedNode.GetValue("ID"), Convert.ToDouble(e.Value)))
         {
             CalculateSum(e.Node, e.Column);
         }
         else
         {
             treeList1.FocusedNode.SetValue(treeList1.FocusedColumn.FieldName, lastEditValue);
         }
     }
 }
Пример #23
0
        private void treeList_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            try
            {
            }
            catch (System.Exception f)
            {
                DevExpress.XtraEditors.XtraMessageBox.Show(
                    "Ошибка изменения данных в ячейке.\nТекст ошибки: " + f.Message, "Ошибка",
                    System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
            }
            finally
            {
                SetPropertiesModified(true);
            }

            return;
        }
Пример #24
0
        private void cxDBTreeList1_CellValueChanging(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            if (e.Node == cxDBTreeList1.Nodes.AutoFilterNode)
            {
                return;
            }

            bHasChanges = true;
            if (e.Column == cxDBTreeList1cxDBTreeListNAME || e.Column == cxDBTreeList1cxDBTreeListTO)
            {
                dxBarBtnsave.Enabled    = true;
                dxBarBtnCancel.Enabled  = true;
                dxBarBtnAddNode.Enabled = false;
                dxBarBtnDelNode.Enabled = false;
                dxBarBtnExp.Enabled     = false;
                dxBarBtnCollp.Enabled   = false;
            }
        }
Пример #25
0
        //节点名字改变时调用
        private void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            List <ProjectTreeNode> tree = treeList1.DataSource as List <ProjectTreeNode>;
            var focusNode = treeList1.FocusedNode;
            var node      = getProjectNode(focusNode);

            changeParentNode(node);
            treeList1.RefreshDataSource();
            treeList1.OptionsBehavior.Editable = false;

            List <ProjectTreeLeafNode> ls = new List <ProjectTreeLeafNode>();

            getLeafNodes(node, ls);
            foreach (var leafNode in ls)
            {
                modityLeafNode(leafNode);
            }
        }
Пример #26
0
        private void treeList1_CellValueChanging(object sender, CellValueChangedEventArgs e)
        {
            //var user = gridView1.GetFocusedRow() as account;
            var phongban = gv.GetFocusedRow() as phongban;

            if (phongban == null)
            {
                return;
            }

            e.Node.SetValue(e.Column, e.Value);

            var obj = treeList1.GetDataRecordByNode(treeList1.FocusedNode) as ObjPhanQuyen;

            //var find = db.PhanQuyen2s.FirstOrDefault(q => q.ChucNang == obj.MaChucNang && q.TaiKhoan == user.id);
            var find = dbData.PhanQuyen2s.FirstOrDefault(q => q.ChucNang == obj.MaChucNang && q.TaiKhoan == phongban.id);

            if (find == null)
            {
                find = new PhanQuyen2();
                //find.TaiKhoan = user.id;
                find.TaiKhoan = phongban.id;
                find.ChucNang = obj.MaChucNang;
                find.Xem      = obj.Xem;
                find.Them     = obj.Them;
                find.Sua      = obj.Sua;
                find.Xoa      = obj.Xoa;

                dbData.PhanQuyen2s.InsertOnSubmit(find);
                dbData.SubmitChanges();
            }
            else
            {
                find.Xem  = obj.Xem;
                find.Them = obj.Them;
                find.Sua  = obj.Sua;
                find.Xoa  = obj.Xoa;
                dbData.SubmitChanges();
            }

            SetCheckedChildNodes(e.Node, e.Column, (bool)e.Value);
            SetCheckedParentNodes(e.Node, e.Column, (bool)e.Value);
        }
Пример #27
0
 /// <summary>
 /// 单元格改变更新数据库事件
 /// </summary>
 private void treeListDocTemp_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     try
     {
         if (e.Column.FieldName == "DocVersion")
         {
             string docVersionStr = DataTypeConvert.GetString(e.Node["DocVersion"]);
             if (oldDocVersionValue != docVersionStr)
             {
                 string moduleNameStr = DataTypeConvert.GetString(e.Node["ModuleName"]);
                 //if (MessageHandler.ShowMessageBox_YesNo(string.Format("确认更新模块【{0}】的打印模板的版本号吗?(更新版本号后,所有站点将会重新下载最新的打印模板)", moduleNameStr)) == DialogResult.Yes)
                 if (MessageHandler.ShowMessageBox_YesNo(string.Format(tsmiQrgxmk.Text + "【{0}】" + tsmiDdymbd.Text, moduleNameStr)) == DialogResult.Yes)
                 {
                     string tableNameStr = DataTypeConvert.GetString(e.Node["TableName"]).Trim();
                     if (docDAO.UpdateDocTemplet_Version(tableNameStr, docVersionStr))
                     {
                         //MessageHandler.ShowMessageBox(string.Format("模块【{0}】的版本号更新成功。", moduleNameStr));
                         MessageHandler.ShowMessageBox(string.Format(tsmiMk.Text + "【{0}】" + tsmiDbbhgxcg.Text, moduleNameStr));
                     }
                     else
                     {
                         //MessageHandler.ShowMessageBox(string.Format("模块【{0}】的版本号更新失败。", moduleNameStr));
                         MessageHandler.ShowMessageBox(string.Format(tsmiMk.Text + "【{0}】" + tsmiDbbhgxsb.Text, moduleNameStr));
                     }
                     QueryDocTemplet();
                     SetEditState(false);
                     treeListDocTemp.FocusedNode = e.Node;
                 }
                 else
                 {
                     QueryDocTemplet();
                     SetEditState(false);
                     treeListDocTemp.FocusedNode = e.Node;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         //ExceptionHandler.HandleException(this.Text + "--单元格改变更新数据库事件错误。", ex);
         ExceptionHandler.HandleException(this.Text + "--" + tsmiDyggb.Text, ex);
     }
 }
Пример #28
0
        private void treeSolInterm_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            /*
             * Solidos
             * -------
             * 1: Alicuota = volumen*concentracion/concentracion patron
             *
             * Líquidos
             * --------
             * 1: Alicuota = volumen/(concentracion patron/concentracion)  */

            // Hacer el cálculo
            // Si es el patrón de solución es muestra terminal entonces verificar
            // antes si es sólido o líquido
            //
            try
            {
                if (e.Node.Level == 0)
                {
                    // Muestra patron es terminal
                    if (IsSolidSolutionPattern()) // sólido
                    {
                        e.Node["Aliquot"] = Convert.ToDecimal(e.Node["Volumen"]) * Convert.ToDecimal(e.Node["Concentration"]) / template_method_aa.Std_concentration;
                    }
                    else // líquido
                    {
                        e.Node["Aliquot"] = Convert.ToDecimal(e.Node["Volumen"]) / (template_method_aa.Std_concentration / Convert.ToDecimal(e.Node["Concentration"]));
                    }
                }
                else if (e.Node.Level >= 1) // solucion intermedia
                {
                    // solución intermedia 1 o 2 es terminal
                    // determinar la concentración
                    decimal parentConcentration = Convert.ToDecimal(e.Node.ParentNode["Concentration"]);

                    e.Node["Aliquot"] = Convert.ToDecimal(e.Node["Volumen"]) / Convert.ToDecimal(e.Node["Concentration"]) / parentConcentration;
                }
            }
            catch (Exception ex)
            {
                Comun.Send_message("Soluciones", TypeMsg.error, ex.Message);
            }
        }
Пример #29
0
 private void trCategoryList_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     //if (trCategoryList.FocusedNode["선택"].ToString() == "Y")
     //{
     //    if (trCategoryList.FocusedNode["멀티여부"].ToString() == "N")
     //    {
     //        teSearchNm.Focus();
     //        DataTable dt = (DataTable)trCategoryList.DataSource;
     //        dt.AcceptChanges();
     //        DataRow[] dRow_Multi = dt.Select("선택 = 'Y'");
     //        if(dRow_Multi.Length > 0)
     //        {
     //            for(int i = 0; i < dRow_Multi.Length; i++)
     //            {
     //                dRow_Multi[0]["선택"] = "N";
     //            }
     //        }
     //    }
     //}
 }
Пример #30
0
 private void treeListMenuInfo_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
 {
     try
     {
         CurrentMenuinfoAction(menuinfo =>
         {
             if (menuinfo != null && menuinfo.Sysid != null)
             {
                 if (e.Column != null && e.Column.FieldName == "Sysid")
                 {
                     return;
                 }
                 //rightManagerSrv.ModifyMenu(menuinfo);
             }
         });
     }
     catch (Exception ex)
     {
         ExceptionAction(ex);
     }
 }