using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using System.Data;
|
|
namespace DAL
|
{
|
public class ClsGy_Supplier_Extend_View:DBUtility.ClsGy_Base_View
|
{
|
|
//
|
public Model.ClsGy_Supplier_Extend_Model omodel = new Model.ClsGy_Supplier_Extend_Model();
|
SQLHelper.ClsCNK3 oCn = new SQLHelper.ClsCNK3();
|
|
public ClsGy_Supplier_Extend_View()
|
{
|
base.MvarReportTitle = "供应商扩展设置";
|
base.MvarItemKey = "h_v_Gy_Supplier_UserList";
|
base.SQLName = "Select hcusid HItemID,hcusnumber 供应商代码,hcusname 供应商 from h_v_Gy_Supplier_UserList where HStopflag=0 Order by hcusnumber ";
|
base.SQLList = "Select * from " + MvarItemKey + " ";
|
}
|
//
|
public void Dispose()
|
{
|
GC.SuppressFinalize(this);
|
}
|
//
|
|
//返回项目信息
|
public override bool GetInfoByID(Int64 sItemID)
|
{
|
DataSet DS ;
|
try
|
{
|
DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where hcusid='" + sItemID + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
|
if (DS.Tables[0].Rows.Count == 0)
|
return false;
|
else
|
{
|
return GetInfo(DS);
|
}
|
}
|
catch (Exception e)
|
{
|
throw (e);
|
}
|
}
|
//根据代码返回项目信息
|
public override bool GetInfoByNumber(string sNumber)
|
{
|
DataSet DS;
|
try
|
{
|
DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where hcusnumber='" + sNumber + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
|
if (DS.Tables[0].Rows.Count == 0)
|
return false;
|
else
|
{
|
return GetInfo(DS);
|
}
|
}
|
catch (Exception e)
|
{
|
throw (e);
|
}
|
}
|
//返回项目信息
|
public override bool GetInfo(DataSet DS)
|
{
|
try
|
{
|
omodel = new Model.ClsGy_Supplier_Extend_Model();
|
omodel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["hcusid"]);
|
omodel.HNumber = DS.Tables[0].Rows[0]["hcusnumber"].ToString().Trim();
|
omodel.HName = DS.Tables[0].Rows[0]["hcusname"].ToString().Trim();
|
omodel.HStopflag = DBUtility.ClsPub.isBool(DS.Tables[0].Rows[0]["HStopflag"]);
|
omodel.HUserID = DBUtility.ClsPub.isLong(DS.Tables[0].Rows[0]["FuserID"]);
|
omodel.HPassWord = DS.Tables[0].Rows[0]["hpassword"].ToString().Trim();
|
return true;
|
|
}
|
catch (Exception e)
|
{
|
throw (e);
|
}
|
}
|
}
|
}
|