SVN r1006

SVN-Revision: r1006
This commit is contained in:
tdx
2025-09-28 08:24:32 +00:00
parent 87313eadfb
commit 8e25337079
+6 -43
View File
@@ -870,7 +870,7 @@ namespace Lskj.Control
if (string.IsNullOrEmpty(model.DataFormat))
{
result = Math.Round(Convert.ToDouble(2), model.Decimals, MidpointRounding.AwayFromZero) + "";
result = Math.Round(Convert.ToDouble(result), model.Decimals, MidpointRounding.AwayFromZero) + "";
}
else
{
@@ -1303,7 +1303,7 @@ namespace Lskj.Control
}
}
//左侧如果配置表格,也和出现和主表一样的操作列。先限制为左侧固定不加载(要加载的话要获取左侧的fieldKey)
if (this.Model != null && BaseModuleImpl.IsGridViewRightMenuBtnEdit(rightMentTab)&&!customColumKey.Contains("BaseLeftGridView_"))
if (this.Model != null && BaseModuleImpl.IsGridViewRightMenuBtnEdit(rightMentTab) && !customColumKey.Contains("BaseLeftGridView_"))
{
this.InitRightMenuBtnEdit();
}
@@ -4751,7 +4751,7 @@ namespace Lskj.Control
if (!string.IsNullOrWhiteSpace(menuModel.MenuName))
{
EditorButton editorButton = new EditorButton();
editorButton.Caption = menuModel.MenuName+"";
editorButton.Caption = menuModel.MenuName + "";
//editorButton.GlyphAlignment = HorzAlignment.Center;
editorButton.ToolTip = menuModel.MenuName;
editorButton.Kind = ButtonPredefines.Glyph;
@@ -8758,7 +8758,7 @@ namespace Lskj.Control
List<int> targetPrivTypeIds = new List<int>();
foreach (string permission in model.PrivilegeOper.Split(','))
{
if(!string.IsNullOrWhiteSpace(permission)) targetPrivTypeIds.Add(int.Parse(permission));
if (!string.IsNullOrWhiteSpace(permission)) targetPrivTypeIds.Add(int.Parse(permission));
}
//获取权限对应的人员名称
string userString = string.Join(",", AuthorityTable.AsEnumerable()
@@ -9544,10 +9544,10 @@ namespace Lskj.Control
private void GridView_ShowingEditor(object sender, CancelEventArgs e)
{
GridColumn gridColumn = gridView.FocusedColumn;
if (gridColumn != null && gridColumn.Tag != null&& gridColumn.Tag is GridColumnModel)
if (gridColumn != null && gridColumn.Tag != null && gridColumn.Tag is GridColumnModel)
{
GridColumnModel model = (GridColumnModel)gridColumn.Tag;
if (model.FormatEditBox && (model.FieldType == ControlType.LabTextInt || model.FieldType == ControlType.LabCalcText || model.FieldType == ControlType.LabAccount)&& gridColumn.RealColumnEdit!=null&& !gridColumn.RealColumnEdit.EditFormat.FormatString.Equals(model.DataFormat))
if (model.FormatEditBox && (model.FieldType == ControlType.LabTextInt || model.FieldType == ControlType.LabCalcText || model.FieldType == ControlType.LabAccount) && gridColumn.RealColumnEdit != null && !gridColumn.RealColumnEdit.EditFormat.FormatString.Equals(model.DataFormat))
{
gridColumn.RealColumnEdit.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
gridColumn.RealColumnEdit.EditFormat.FormatString = model.DataFormat;
@@ -9772,41 +9772,4 @@ namespace Lskj.Control
return Rectangle.Empty;
// 转换为网格控件内的坐标(关键修正)
Point cellLocation = view.GridControl.PointToClient(
viewInfo.GridControl.PointToScreen(cellInfo.Bounds.Location)
);
return new Rectangle(
cellLocation.X,
cellLocation.Y,
cellInfo.Bounds.Width,
cellInfo.Bounds.Height
);
}
catch
{
return Rectangle.Empty;
}
}
// 计算按钮起始X坐标(支持左右对齐)
private int GetButtonStartX(int cellWidth, int totalButtonsWidth, bool isLeftAligned)
{
if (isLeftAligned)
{
// 靠左对齐:从单元格左侧开始
return 0;
}
else
{
// 靠右对齐:从右侧减去总宽度
return cellWidth - totalButtonsWidth;
}
}
#endregion
}
}