SVN-Revision: r421
This commit is contained in:
cyf
2025-03-28 10:09:21 +00:00
parent 0913c35ec6
commit e45025f084
+21 -6
View File
@@ -1,6 +1,7 @@
using DevExpress.XtraEditors;
using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Columns;
using Lskj.Business;
using Lskj.Business.Impl;
using Lskj.Control;
using Lskj.Control.Model;
@@ -487,14 +488,17 @@ namespace Lskj.PubProductSysMge
}
}
}
int topRowIndex = gcMain.GridView.GetVisibleRowHandle(gcMain.GridView.TopRowIndex);//顶部可见行
if (this.gcMain.GridView.Columns.Count > 0)
{
this.gcMain.GridControl.DataSource = sourceTable;
this.gcMain.AdjustIndicatorWidthSmart();
}
//this.gcMain.GridView.BestFitColumns();
if (selectHandler)
{
this.gcMain.GridView.FocusedRowHandle = handler;
if(topRowIndex>0) gcMain.GridView.TopRowIndex = topRowIndex;
}
}
/// <summary>
@@ -1036,7 +1040,10 @@ namespace Lskj.PubProductSysMge
{
//string projectId = MainImpl.GetResult(string.Format("select BmFaID from P_ProductSpeciesTab where speciesno = '{0}'", e.Node.Name)) + "";
//string projectName = MainImpl.GetResult(string.Format("select ItemName from p_productsyssetGrouptab where id = '{0}'", projectId)) + "";
DataTable dataTable = MainImpl.GetDataTableResult(string.Format("select id,ItemName from p_productsyssetGrouptab where speciesno = '{0}'", e.Node.Name));
string sql = "select id,ItemName from p_productsyssetGrouptab where speciesno = '{0}'";
if (!string.IsNullOrWhiteSpace(this.MainModuleObj.TreeClickSchemeSql)) sql = this.MainModuleObj.TreeClickSchemeSql;
DataTable dataTable = MainImpl.GetDataTableResult(string.Format(sql, e.Node.Name));
this.speciesNoEdit.Text = e.Node.Name;
this.speciesNameEdit.Text = e.Node.Text;
//this.projectComBoEdit.Text = projectName;
@@ -1047,10 +1054,11 @@ namespace Lskj.PubProductSysMge
{
foreach (DataRow item in dataTable.Rows)
{
ComboBoxModel comboBoxModel = new ComboBoxModel(item)
{
ValueMember = "id",
DisplayMember = "ItemName",
ValueMember = dataTable.Columns[0].ColumnName,
DisplayMember = dataTable.Columns[1].ColumnName,
};
this.projectComBoEdit.Properties.Items.Add(comboBoxModel);
}
@@ -1616,15 +1624,18 @@ namespace Lskj.PubProductSysMge
return;
}
//获取选中行对应的方案
DataTable dataTable = MainImpl.GetDataTableResult(string.Format("select id,ItemName from p_productsyssetGrouptab where id = '{0}' and speciesNo='{1}'", projectId, speciesNo));
string sql = "select id,ItemName from p_productsyssetGrouptab where id = '{0}' and speciesNo='{1}'";
if (!string.IsNullOrWhiteSpace(this.MainModuleObj.TableClickSchemeSql)) sql = this.MainModuleObj.TableClickSchemeSql;
DataTable dataTable = MainImpl.GetDataTableResult(string.Format(sql, projectId, speciesNo));
this.projectComBoEdit.Text = "";
this.projectComBoEdit.Properties.Items.Clear();
foreach (DataRow item in dataTable.Rows)
{
ComboBoxModel comboBoxModel = new ComboBoxModel(item)
{
ValueMember = "id",
DisplayMember = "ItemName",
ValueMember = dataTable.Columns[0].ColumnName,
DisplayMember = dataTable.Columns[1].ColumnName,
};
this.projectComBoEdit.Properties.Items.Add(comboBoxModel);
}
@@ -1961,8 +1972,12 @@ namespace Lskj.PubProductSysMge
//}
this.btnUpdate.Enabled = false;
this.btnSave.Enabled = true;
if (SystemInfo.Instance.PubProductSysMgeCopyAndSave)
{
this.OnBtnSaveClick(null, null);
}
}
}
catch (Exception ex)
{