SVN r1073

SVN-Revision: r1073
This commit is contained in:
cyf
2025-12-05 05:38:12 +00:00
parent d9b0743ee5
commit cb1f3b71c5
+22 -12
View File
@@ -568,6 +568,7 @@ namespace Lskj.PubProductSysMge
left join P_ProductsysFieldsSetTab b on a.dbname = b.DataFields
where a.groupid = '{0}' and b.modid ='201004_04' and a.ban = 0
order by orderid", projectId);
//dataSourceSql = string.Format(@"select * from p_productsyssettab where groupid = '{0}' and ban = 0 order by orderid", projectId);
dataTable = MainImpl.GetDataTableResult(dataSourceSql);
int x = 10;
int y = 10;
@@ -698,17 +699,21 @@ namespace Lskj.PubProductSysMge
baseControl.ReadOnly = setModel.ProhibitEdited;
this.pl_Top.Controls.Add(baseControl);
this.ControlList.Add(setModel);
if (!this.TableNameList.ContainsKey(setModel.SaveModeCode))
if (!this.TableNameList.ContainsKey(setModel.SaveModeCode) && !string.IsNullOrWhiteSpace(setModel.SaveModeCode))
{
DataRow modelRow = MainImpl.GetSystemdllTab(setModel.SaveModeCode);//获取模块信息
if (modelRow == null)
{
MessageUtil.Show("模块编号[" + setModel.SaveModeCode + "],配置错误!\r\n该模块信息未找到!");
}
else
{
ModuleModel sysModel = new ModuleModel(modelRow);// 系统模块实体对象
this.TableNameList.Add(setModel.SaveModeCode, sysModel);
}
}
if (x + baseControl.Width + 15 + baseControl.Width > this.splitMainContainer.Panel2.Width)
{
x = 10;
@@ -1056,8 +1061,6 @@ namespace Lskj.PubProductSysMge
string nodeName = this.treeLeftViewEx.TreeView.SelectedNode != null ? this.treeLeftViewEx.TreeView.SelectedNode.Name : "";
this.speciesNoEdit.Text = "";
this.speciesNameEdit.Text = "";
//this.projectComBoEdit.Text = "";
//this.projectComBoEdit.Tag = "";
this.btnUpdate.Enabled = false;
this.btnSave.Enabled = true;
this.MainControlObj.ResetControlValue();
@@ -1065,16 +1068,12 @@ namespace Lskj.PubProductSysMge
this.ControlList.Clear();
try
{
//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)) + "";
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;
//this.projectComBoEdit.Tag = projectId;
this.projectComBoEdit.Text = "";
this.projectComBoEdit.Properties.Items.Clear();
if (e.Node.Nodes.Count == 0)
@@ -1101,6 +1100,7 @@ namespace Lskj.PubProductSysMge
{
where = string.Format(" and {0} like '{1}%'", this.ParentUnionField, e.Node.Name);
}
if (this.MainModuleObj.LeafNodeRefresh && e.Node.Nodes.Count != 0) return;
if (nodeName == e.Node.Name)
{
this.SetMainGridView(where, false, false);
@@ -1474,6 +1474,10 @@ namespace Lskj.PubProductSysMge
NewVer = saveTableModel.NewVer
};
int resultFb = BaseModuleImpl.SaveBasePanelData(saveModelFb);
if (resultFb != 1)
{
MessageUtil.Show("附表保存失败" + "\r\n" + saveModelFb.FaultMsg);
}
}
}
@@ -1543,13 +1547,15 @@ namespace Lskj.PubProductSysMge
}
if (this.VerifyNull(this.pl_Top))
{
DataRow focusRow = this.gcMain.GridView.GetFocusedDataRow();
//DataRow focusRow = this.gcMain.GridView.GetFocusedDataRow();
string Autogrowcolumn = BaseImpl.GetResult(string.Format("SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.columns WHERE TABLE_NAME='{0}' AND COLUMNPROPERTY(OBJECT_ID('{0}'),COLUMN_NAME,'IsIdentity')=1", this.MainModuleObj.MenuTable)) + "";
DataTable tableColumns = BaseImpl.GetTableColumns(this.MainModuleObj.MenuTable);
string newBillNo = focusRow["productid"] + "";
//string newBillNo = focusRow["productid"] + "";
string primaryKey = BaseImpl.GetBasePrimaryKey(this.Model.ModuleCode);
ControlModel model = this.MainControlObj._models.FirstOrDefault(x => x.FieldName == primaryKey);
string parentValue = focusRow["speciesNo"] + "";
string newBillNo = this.MainControlObj.GetControlValue(model.FieldName);
//string parentValue = focusRow["speciesNo"] + "";
string parentValue = this.speciesNoEdit.Text;
//string newBillNo = BaseImpl.GetDefaultValue(model.Default, parentValue);
List<string> keyList = new List<string>() { "speciesno", "operatorname", "operatedate", "smartbmfa" };
StringBuilder sqlBuilder = new StringBuilder();
@@ -1657,7 +1663,7 @@ namespace Lskj.PubProductSysMge
}
}
if (!string.IsNullOrWhiteSpace(sqlBuilder + ""))
if (!string.IsNullOrWhiteSpace(sqlBuilderFb + ""))
{
ModuleModel saveTableModel = TableNameList[modeCode];
string tablename = TableNameList[modeCode].MenuTable;
@@ -1674,6 +1680,10 @@ namespace Lskj.PubProductSysMge
NewVer = saveTableModel.NewVer
};
int resultFb = BaseModuleImpl.SaveBasePanelData(saveModelFb);
if (resultFb != 1)
{
MessageUtil.Show("附表保存失败" + "\r\n" + saveModelFb.FaultMsg);
}
}
}
@@ -1697,7 +1707,7 @@ namespace Lskj.PubProductSysMge
}
MessageUtil.Show(ResourceKeys.SaveSuccess);
string where = null;
string nodeName = focusRow["speciesNo"] + "";
string nodeName = parentValue;//focusRow["speciesNo"] + "";
if (string.IsNullOrWhiteSpace(this.ParentUnionField))
{
where = string.Format(" and {0} = N'{1}'", this.treeLeftViewEx.TreeNodeKeyField, nodeName);