From eb0eff87c9542e6fc6eb960c3d01e634192fb3ff Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期一, 19 九月 2022 09:42:13 +0800
Subject: [PATCH] 优化
---
DAL/基础资料/公用基础资料/ClsGy_Source_View.cs | 82 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 79 insertions(+), 3 deletions(-)
diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Source_View.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Source_View.cs"
index 46a6ac1..9171336 100644
--- "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Source_View.cs"
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Source_View.cs"
@@ -31,19 +31,75 @@
GC.SuppressFinalize(this);
}
//
-
+
//杩斿洖椤圭洰淇℃伅
public override bool GetInfoByID(Int64 sItemID)
{
- DataSet DS ;
+ DataSet DS;
try
{
DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HItemID='" + sItemID + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
- if (DS.Tables[0].Rows.Count == 0)
+ if (DS.Tables[0].Rows.Count == 0)
return false;
else
{
return GetInfo(DS);
+ }
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+
+
+ //杩斿洖椤圭洰淇℃伅 濂ラ偊涓撶敤
+ public bool GetInfoByID_AoBang(Int64 sItemID)
+ {
+ DataSet DS;
+ try
+ {
+ Pub_Control.frmHlpInfo_View ofrm = new Pub_Control.frmHlpInfo_View();
+ ofrm.sTitle = MvarReportTitle;
+ ofrm.sBill = MvarItemKey;
+ ofrm.txtFindInfo.Text = WherePart;
+ DS = oCn.RunProcReturn("select distinct HItemID,b.HNumber ,b.HName from Sc_ICMOBillStatus_Tmp a inner join Gy_Source b on a.HSourceID = b.HItemID Where a.HEMPID =" + sItemID + " or a.HEMPID2 = " + sItemID + " or HEMPID3 = " + sItemID + "", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
+ if (DS.Tables[0].Rows.Count == 0)
+ return false;
+ else
+ {
+ //缁戝畾
+ ofrm.grdShow.DataSource = DS.Tables[0].DefaultView;
+ DS.Dispose();
+ DS = null;
+ ofrm.grdShow.SuspendLayout();
+ ofrm.grdShow.Columns[0].Visible = false;
+ ofrm.ShowDialog();
+ //寰楀埌瀵瑰簲鍒�
+ int HItemIDCol = 0;
+ int HNumberCol = 1;
+ int HNameCol = 2;
+ //
+ if (ofrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
+ {
+ if (ofrm.grdShow.CurrentRow == null)
+ {
+ return false;
+ }
+ oModel = new DBUtility.ClsGy_Base_Model();
+ oModel.HItemID = Pub_Class.ClsPub.isLong(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[0].Value);
+ oModel.HNumber = Pub_Class.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[1].Value);
+ oModel.HName = Pub_Class.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[2].Value);
+ }
+ else
+ {
+ return false;
+ }
+ //
+ ofrm.Dispose();
+ ofrm = null;
+ //
+ return true;
}
}
catch (Exception e)
@@ -117,6 +173,7 @@
omodel.HBarCode = DS.Tables[0].Rows[0]["HBarCodeForBase"].ToString().Trim();
omodel.HType = DS.Tables[0].Rows[0]["HType"].ToString().Trim();
omodel.HEquipFileID_K3 = Convert.ToInt64(DS.Tables[0].Rows[0]["HEquipFileID_K3"]);
+
//omodel.HGroupK3ID = Convert.ToInt64(DS.Tables[0].Rows[0]["HGroupK3ID"]);
//omodel.HGroupID = Convert.ToInt64(DS.Tables[0].Rows[0]["HGroupID"]);
//omodel.HDeptID = Convert.ToInt64(DS.Tables[0].Rows[0]["HDeptID"]);
@@ -135,6 +192,25 @@
}
}
+ //杩斿洖椤圭洰淇℃伅 濂ラ偊涓撶敤
+ public bool GetInfo_AoBang(DataSet DS)
+ {
+ try
+ {
+ omodel = new Model.ClsGy_Source_Model();
+
+ omodel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]);
+ omodel.HNumber = DS.Tables[0].Rows[0]["HNumber"].ToString().Trim();
+ omodel.HName = DS.Tables[0].Rows[0]["HName"].ToString().Trim();
+ return true;
+
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+
/// <summary>
/// 寰楀埌榛樿璧勬簮鏍规嵁閮ㄩ棬
--
Gitblit v1.9.1