本文整理汇总了C#中UDS.Components.Database.MakeInParam方法的典型用法代码示例。如果您正苦于以下问题:C# Database.MakeInParam方法的具体用法?C# Database.MakeInParam怎么用?C# Database.MakeInParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UDS.Components.Database
的用法示例。
在下文中一共展示了Database.MakeInParam方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetMyDocument
/// <summary>
/// �õ��ҵ������ĵ�
/// </summary>
/// <param name="UserName">�û���</param>
/// <param name="RightCode">�鿴�ĵ���Ȩ����</param>
/// <returns>����dataReader</returns>
public SqlDataReader GetMyDocument(string UserName,int RightCode)
{
Database data = new Database();
SqlDataReader dataReader = null;
// ִ�д洢���̣�������SqlDataReader����
SqlParameter[] prams = {
data.MakeInParam("@UserName" , SqlDbType.VarChar , 300, UserName),
data.MakeInParam("@RightCode",SqlDbType.Int,4,RightCode)
};
try
{
data.RunProc("sp_GetMyNewDoc",prams,out dataReader);
return dataReader;
}
catch(Exception ex)
{
Error.Log(ex.ToString());
throw new Exception("��ȡ�ҵ��ĵ�����!",ex);
}
//finally
//{
// data = null;
// dataReader = null;
//}
}
示例2: BindGrid
public void BindGrid()
{
SqlDataReader dr; //���Ȩ������
string spName;//�洢������
spName = "";
Database db = new Database();
SqlParameter[] prams = new SqlParameter[1];
switch(DisplayType)
{
case "0":
prams[0] = db.MakeInParam("@PositionID",SqlDbType.Int,4,Int32.Parse(strObjID));
spName = "sp_GetPositionRightList";
break;
case "1":
prams[0] = db.MakeInParam("@Teamid",SqlDbType.Int,4,Int32.Parse(strObjID));
spName = "sp_GetTeamRightList";
break;
case "2":
prams[0] = db.MakeInParam("@RoleID",SqlDbType.Int,4,Int32.Parse(strObjID));
spName = "sp_GetRoleRightList";
break;
default:
break;
//������
}
db.RunProc(spName,prams,out dr);
DataTable dt =Tools.ConvertDataReaderToDataTable(dr);
RightsGrid.DataSource = dt.DefaultView;
RightsGrid.DataBind();
}
示例3: AdminBBS
/// <summary>
/// �ж��Ƿ��й���Ȩ��
/// </summary>
/// <param name="username">�û���</param>
/// <returns>bool</returns>
public bool AdminBBS(string username,int classid)
{
if(classid!=0)
{
int actid = 8;
Database db = new Database();
SqlParameter[] prams = {
db.MakeInParam("@Class_ID",SqlDbType.Int,4,classid),
db.MakeInParam("@Username",SqlDbType.VarChar,100,username),
db.MakeInParam("@Act_ID",SqlDbType.Int,4,actid),
db.MakeOutParam("@ReturnValue",SqlDbType.Int,4)
};
try
{
db.RunProc("sp_GetAccessPermission",prams);
// ����������
// return(true);
return((Int32.Parse(prams[3].Value.ToString())==1)?true:false);
}
catch(Exception ex)
{
Error.Log(ex.Message);
throw new Exception("BBSȨ���жϴ���!",ex);
}
}
else
return(false);
}
示例4: AddBoardMaster
public void AddBoardMaster(int boardid,int staffid)
{
Database data = new Database ();
SqlParameter[] prams = {
data.MakeInParam("@BoardID", SqlDbType.Int, 4,boardid),
data.MakeInParam("@StaffID", SqlDbType.Int, 4,staffid)
};
data.RunProc ("sp_BBS_SetupBoardMaster",prams);
}
示例5: AddDutyTime
/// <summary>
/// ��ӿ���ʱ��
/// </summary>
/// <param name="id">����id</param>
/// <param name="ondutytime">�ϰ�ʱ��</param>
/// <param name="offdutytime">�°�ʱ��</param>
/// <returns></returns>
public static int AddDutyTime(long DepartmentID,DateTime ondutytime,DateTime offdutytime)
{
Database db = new Database();
SqlParameter[] prams = {
db.MakeInParam("@departmentid",SqlDbType.Int,4,DepartmentID),
db.MakeInParam("@ondutytime",SqlDbType.DateTime,8,ondutytime),
db.MakeInParam("@offdutytime",SqlDbType.DateTime,8,offdutytime)
};
return (db.RunProc("sp_WA_AddDepartmentDutyTime",prams));
}
示例6: AddBBSCatalog
//string CatalogName,string CatalogDescription
//��uds_bbs_catalog��,������¼
public bool AddBBSCatalog(BBSCatalog BBSCatalog)
{
//���� CatalogName ��ʾBBS�е�title , ���� CatalogDescription ��ʾBBS�е�content
//���洢���̴��ݲ���
Database data = new Database();
SqlParameter[] prams = {
data.MakeInParam("@title", SqlDbType.VarChar, 300, BBSCatalog.CatalogName),
data.MakeInParam("@content", SqlDbType.NText, 16, BBSCatalog.CatalogDescription),
};
data.RunProc ("sp_BBS_AddCatalog",prams);
return true;
}
示例7: BindGrid
private void BindGrid()
{
SqlDataReader dr; //������������
Database db = new Database();
SqlParameter[] prams = {
db.MakeInParam("@Dept_ID",SqlDbType.Int,4,DeptID),
db.MakeInParam("@Dimission",SqlDbType.Bit,1,DisplayType)
};
db.RunProc("sp_GetStaffInDepartment",prams,out dr);
DataTable dt =Tools.ConvertDataReaderToDataTable(dr);
dbStaffList.DataSource = dt.DefaultView;
dbStaffList.DataBind();
}
示例8: Add
/// <summary>
/// ��Ŀ���
/// </summary>
public void Add(int ParentID,string ProjectName,string ProjectRemark,string Wright,int Status,int Scale,DateTime StartDate,DateTime EndDate)
{
// �������ݿ�����༰DataReader
Database data = new Database();
// ִ�д洢���̣�������SqlDataReader����
SqlParameter[] prams = {
data.MakeInParam("@ParentID" , SqlDbType.Int, 20, ParentID),
data.MakeInParam("@ProjectName" , SqlDbType.NVarChar, 20, ProjectName.Trim()),
data.MakeInParam("@ProjectRemark" , SqlDbType.NVarChar, 400, ProjectRemark.Trim()),
data.MakeInParam("@Wright" , SqlDbType.NVarChar, 40, Wright),
data.MakeInParam("@Status" , SqlDbType.Int, 40, Status),
data.MakeInParam("@Scale" , SqlDbType.Int, 20, Scale),
data.MakeInParam("@StartDate" , SqlDbType.DateTime, 30, StartDate),
data.MakeInParam("@EndDate" , SqlDbType.DateTime, 30, EndDate)
};
try
{
data.RunProc("sp_AddProject",prams);
}
catch(Exception ex)
{
Error.Log(ex.ToString());
throw new Exception("��Ŀ��ӳ���",ex);
}
finally
{
data = null;
}
}
示例9: cmdSubmit_ServerClick
private void cmdSubmit_ServerClick(object sender, System.EventArgs e)
{
if(this.cbRemind.Checked==true)
sms_all();
UDS.Components.Database db = new UDS.Components.Database();
SqlParameter[] prams = {
db.MakeInParam("@StaffIDS",SqlDbType.VarChar,300,selectedID),
db.MakeInParam("@NewPositionID",SqlDbType.Int,4,Int32.Parse(cboPosition.Items[cboPosition.SelectedIndex].Value))
};
db.RunProc("sp_StaffMove",prams);
if(ReturnPage ==0)
Response.Redirect(backfilepath+"?PositionID="+PositionID+"&displayType="+displayType);
else
Response.Redirect("../Staff/ManageStaff.aspx?DisplayType=0");
}
示例10: GetClassDetail
/// <summary>
/// ��ȡij�ڵ���ϸ��Ϣ
/// </summary>
/// <param name="ClassID">��ĿID</param>
public SqlDataReader GetClassDetail(int ClassID)
{
SqlDataReader dataReader = null;
Database data = new Database();
SqlParameter[] prams =
{
data.MakeInParam("@ClassID", SqlDbType.Int, 20 ,ClassID)
};
try
{
data.RunProc("sp_GetClass", prams, out dataReader);
return dataReader;
}
catch (Exception ex)
{
Error.Log(ex.ToString());
return null;
}
//finally
//{
// data.Close();
// data.Dispose();
// dataReader.Close();
// dataReader.Dispose();
//}
}
示例11: Delete
/// <summary>
/// ɾ��ijĿ¼
/// </summary>
/// <param name="ClassID">��ĿID</param>
public void Delete(int ClassID)
{
Database data = new Database();
SqlParameter[] prams = {
data.MakeInParam("@TeamID" , SqlDbType.Int, 20, ClassID),
};
try
{
data.RunProc("sp_DeleteTeam", prams);
}
catch (Exception ex)
{
Error.Log(ex.ToString());
}
finally
{
if (data != null)
{
data.Close();
data.Dispose();
}
}
}
示例12: BindGrid
private void BindGrid()
{
SqlDataReader dr=null; //������������
Database db = new Database();
try
{
SqlParameter[] prams = {
db.MakeInParam("@StaffType",SqlDbType.Bit,1,DisplayType)
};
db.RunProc("sp_GetStaffisneedkey", prams, out dr);
DataTable dt = Tools.ConvertDataReaderToDataTable(dr);
dbStaffList.DataSource = dt.DefaultView;
dbStaffList.DataBind();
}
finally
{
if (db != null)
{
db.Close();
}
if (dr != null)
{
dr.Close();
}
}
}
示例13: Bangding
private void Bangding()
{
SqlDataReader dr;
Database db = new Database();
SqlParameter[] parms = {
db.MakeInParam("@StyleID",SqlDbType.Int ,4,StyleID),
};
db.RunProc("sp_Flow_GetStyle",parms,out dr);
if(dr.Read())
{
txtStyleName.Text = dr["Style_Name"].ToString();
txtStyleRemark.Text = dr["Style_Remark"].ToString();
lblTemplate.Text = "<a href='" + @"Template\" + dr["Template"].ToString() + "'>" + dr["Template"].ToString() + "</a>";
if(dr["Template"].ToString()=="")
Template.Visible = false;
else
Template.Visible = true;
}
else
{
Template.Visible = false;
}
if(db!=null)
{
db.Close();
db = null;
}
dr.Close();
dr = null;
}
示例14: BindGrid
private void BindGrid()
{
SqlDataReader dr; //������������
Database db = new Database();
SqlParameter[] prams = {
db.MakeInParam("@StaffType",SqlDbType.Bit,1,DisplayType)
};
db.RunProc("sp_GetAllStaff",prams,out dr);
DataTable dt =Tools.ConvertDataReaderToDataTable(dr);
dbStaffList.DataSource = dt.DefaultView;
dbStaffList.DataBind();
if(DisplayType==0)
{
// lbOnline.BackColor = Color.FromArgb(0xCCCCCC);
// lbOffLine.BackColor =Color.FromArgb(0xFFFFFF);
cmdRehab.Visible = false;
cmdDimission.Visible = true;
cmdChangePosition.Visible =true;
}
else
{
// lbOnline.BackColor =Color.FromArgb(0xFFFFFF);
// lbOffLine.BackColor =Color.FromArgb(0xCCCCCC);
cmdRehab.Visible = true;
cmdDimission.Visible = false;
cmdChangePosition.Visible =false;
}
}
示例15: Bangding
private void Bangding()
{
SqlDataReader dr = null; //存放人物的数据
Database mySQL = new Database();
try
{
SqlParameter[] parameters = {
mySQL.MakeInParam("@NewsID",SqlDbType.Int ,4,0)
};
mySQL.RunProc("sp_Flow_GetNews", parameters, out dr);
DataTable dt = Tools.ConvertDataReaderToDataTable(dr);
dgStyleListAdmin.DataSource = dt.DefaultView;
dgStyleListAdmin.DataBind();
}
finally
{
if (mySQL != null)
{
mySQL.Close();
}
if (dr != null)
{
dr.Close();
}
}
}