| | |
| | | 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) |
| | |
| | | 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"]); |
| | |
| | | } |
| | | } |
| | | |
| | | //è¿å项ç®ä¿¡æ¯ 奥é¦ä¸ç¨ |
| | | 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> |
| | | /// å¾å°é»è®¤èµæºæ ¹æ®é¨é¨ |