using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CoreFS.CA06;
using Core.Mes.Client.Common;
namespace Core.LgMes.Client.LgDeviceManager
{
public partial class FrmLgDevFunctions : Core.Mes.Client.Common.frmStyleBase//CoreFS.CA06.FrmBase////frmStyleBase
{
public FrmLgDevFunctions()
{
InitializeComponent();
}
//查询/ServerName-客户端名称/MethodName-客户端类名/ServerParams-条件
public DataSet QueryFunctions(string ServerName, string MethodName, string ServerParams)
{
CoreClientParam ccp = new CoreClientParam();
ccp.ServerName = ServerName;
ccp.MethodName = MethodName;
ccp.ServerParams = new Object[] { ServerParams };
DataTable dt = new DataTable();
ccp.SourceDataTable = dt;
ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
DataSet ds = new DataSet();
ds.Tables.Add(dt);
return ds;
}
///
/// 主窗体传递数组
///
///
///
///
///
public DataSet QueryArray(string ServerName, string MethodName, object[] ServerParams)
{
CoreClientParam ccp = new CoreClientParam();
ccp.ServerName = ServerName;
ccp.MethodName = MethodName;
ccp.ServerParams = ServerParams;
DataTable dt = new DataTable();
ccp.SourceDataTable = dt;
ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
DataSet ds = new DataSet();
ds.Tables.Add(dt);
return ds;
}
///
/// 增加、删除、修改
///
/// 服务端名称>
/// 服务端方法名称>
/// 传数组值>
public string NoQueryFunctions(string ServerName, string MethodName, object[] ServerParams)
{
//string strerr = "";
CoreClientParam ccp_K = new CoreClientParam();
ccp_K.ServerName = ServerName;
ccp_K.MethodName = MethodName;
ccp_K.ServerParams = ServerParams;
ExecuteNonQuery(ccp_K, CoreInvokeType.Internal);
//strerr = ccp_K.ReturnInfo.ToString();
//strerr=ccp_K.ReturnInfo.ToString();
return ccp_K.ReturnInfo.ToString();
}
///
/// 调用存储过程
///
/// 服务端名称>
/// 服务端方法名称>
/// 传数组值>
public void ProcedureFunctions(string ServerName, string MethodName, object[] ServerParams, out string strErr, out string msg)
{
CoreClientParam ccp = new CoreClientParam();
ccp.ServerName = ServerName;
ccp.MethodName = MethodName;
ccp.ServerParams = ServerParams;
ExecuteNonQuery(ccp, CoreInvokeType.Internal);
System.Collections.ArrayList al = (System.Collections.ArrayList)ccp.ReturnObject;
strErr = al[0].ToString();
msg = al[1].ToString();
}
///
/// 子窗体调用//查询/ServerName-客户端名称/MethodName-客户端类名/ServerParams-条件
///
///
///
///
///
public DataSet QueryToFunions(string ServerName, string MethodName, string ServerParams,OpeBase opb )
{
CoreClientParam ccp = new CoreClientParam();
ccp.ServerName = ServerName;
ccp.MethodName = MethodName;
ccp.ServerParams = new Object[] { ServerParams };
DataTable dt = new DataTable();
ccp.SourceDataTable = dt;
opb.ExecuteQueryToDataTable(ccp,CoreInvokeType.Internal);
DataSet ds = new DataSet();
ds.Tables.Add(dt);
return ds;
}
///
/// 子窗体查询传数组
///
///
///
///
///
///
public DataSet QueryArrayFunions(string ServerName, string MethodName, object[] ServerParams, OpeBase opb)
{
CoreClientParam ccp = new CoreClientParam();
ccp.ServerName = ServerName;
ccp.MethodName = MethodName;
ccp.ServerParams = ServerParams;
DataTable dt = new DataTable();
ccp.SourceDataTable = dt;
opb.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
DataSet ds = new DataSet();
ds.Tables.Add(dt);
return ds;
}
///
/// 子窗体查询固定ServerName,MethodName
///
///
///
///
///
///
public DataSet QueryFixedFunions(string ServerParams, OpeBase opb)
{
CoreClientParam ccp = new CoreClientParam();
ccp.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
ccp.MethodName = "QueryMethods";
ccp.ServerParams =new object[]{ ServerParams};
DataTable dt = new DataTable();
ccp.SourceDataTable = dt;
opb.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
DataSet ds = new DataSet();
ds.Tables.Add(dt);
return ds;
}
///
/// 子窗体增加、删除、修改
///
/// 服务端名称>
/// 服务端方法名称>
/// 传数组值>
public string NoQueryToF(string ServerName, string MethodName, object[] ServerParams,OpeBase opb)
{
//string strerr = "";
CoreClientParam ccp_K = new CoreClientParam();
ccp_K.ServerName = ServerName;
ccp_K.MethodName = MethodName;
ccp_K.ServerParams = ServerParams;
opb.ExecuteNonQuery(ccp_K, CoreInvokeType.Internal);
//strerr = ccp_K.ReturnInfo.ToString();
return ccp_K.ReturnInfo.ToString();
}
///
/// 子窗体传执行sql
///
/// 服务端名称>
/// 服务端方法名称>
/// 传数组值>
public string NoQueryExecutive(string ServerParams, OpeBase opb)
{
//string strerr = "";
CoreClientParam ccp_K = new CoreClientParam();
ccp_K.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
ccp_K.MethodName = "UpdateMethods";
ccp_K.ServerParams = new object[]{ServerParams};
opb.ExecuteNonQuery(ccp_K, CoreInvokeType.Internal);
//strerr = ccp_K.ReturnInfo.ToString();
return ccp_K.ReturnInfo.ToString();
}
public void NoQuery(string ServerParams, OpeBase opb, out string strErr, out string msg)
{
CoreClientParam ccp_K = new CoreClientParam();
ccp_K.ServerName = "Core.LgMes.Server.DEV.Methods.DEVPublicMethods";
ccp_K.MethodName = "UpdateMethods";
ccp_K.ServerParams = new object[] { ServerParams };
opb.ExecuteNonQuery(ccp_K, CoreInvokeType.Internal);
//strerr = ccp_K.ReturnInfo.ToString();
System.Collections.ArrayList al = (System.Collections.ArrayList)ccp_K.ReturnObject;
strErr = al[0].ToString();
msg = al[1].ToString();
}
///
/// 子窗体调用存储过程
///
/// 服务端名称>
/// 服务端方法名称>
/// 传数组值>
public void ProcedureZ(string ServerName, string MethodName, object[] ServerParams, OpeBase opb, out string strErr, out string msg)
{
CoreClientParam ccp = new CoreClientParam();
ccp.ServerName = ServerName;
ccp.MethodName = MethodName;
ccp.ServerParams = ServerParams;
opb.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
System.Collections.ArrayList al = (System.Collections.ArrayList)ccp.ReturnObject;
strErr = al[0].ToString();
msg = al[1].ToString();
}
}
}