SVN r1006
SVN-Revision: r1006
This commit is contained in:
@@ -492,7 +492,7 @@ namespace Lskj.Control
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
@@ -4703,7 +4703,7 @@ namespace Lskj.Control
|
||||
ItemButtonEdit.ButtonClick += new ButtonPressedEventHandler(OnItemButtonEdit_ButtonClick);
|
||||
DataTable rightMenuTab = BaseModuleImpl.GetBaseGridRightMenus(this.Model.ModuleCode);
|
||||
int ColumnWidth = 0;
|
||||
if (rightMenuTab.Columns.Contains("IcoName"))
|
||||
if (rightMenuTab.Columns.Contains("IcoName"))
|
||||
{
|
||||
// 创建只显示图片的按钮
|
||||
DataRow[] rightMenuBtns = rightMenuTab.Select().Where(n => !string.IsNullOrEmpty(n["IcoName"] + "")).ToArray();
|
||||
@@ -4740,18 +4740,18 @@ namespace Lskj.Control
|
||||
}
|
||||
ColumnWidth = rightMenuBtns.Length * picWidth;
|
||||
}
|
||||
if (rightMenuTab.Columns.Contains("showtoolbar"))
|
||||
if (rightMenuTab.Columns.Contains("showtoolbar"))
|
||||
{
|
||||
// 创建只显示文本的按钮
|
||||
DataRow[] rightMenuBtnsText = rightMenuTab.Select().Where(n => "1".Equals(n["showtoolbar"] + "")).ToArray();
|
||||
EditorButton textOnlyButton = new EditorButton();
|
||||
foreach (DataRow rightMenu in rightMenuBtnsText)
|
||||
foreach (DataRow rightMenu in rightMenuBtnsText)
|
||||
{
|
||||
GridRightMenuModel menuModel = new GridRightMenuModel(rightMenu);
|
||||
if (!string.IsNullOrWhiteSpace(menuModel.MenuName))
|
||||
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;
|
||||
@@ -9573,7 +9573,7 @@ namespace Lskj.Control
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user