private void ���Դ洢����ToolStripMenuItem_Click(object sender, EventArgs e) { Database db = new Database("Data Source=.;Persist Security Info=True;User ID=sa;Password=sa;Initial Catalog=RewardLife;");//TestForSmartTools HR_JC //db.AddStoreProcedure("CustOrderHist2"); //db.AddStoreProcedure("CustOrderHist3"); db.GetAllStoreProcedure(); //db.AddStoreProcedure("CustOrderHist2"); //db.GetStoreProcedure("CustOrderHist2").NeedReturnValue = true; //db.GetStoreProcedure("CustOrderHist2").ProcExecuteReturnType = Model.StoreProcedure.ExecuteReturnType.DataTable; //db.AddStoreProcedure("CustOrderHist3"); //db.GetStoreProcedure("CustOrderHist3").NeedReturnValue = false; //db.GetStoreProcedure("CustOrderHist3").ProcExecuteReturnType = Model.StoreProcedure.ExecuteReturnType.Scalar; SqlStorProcExecCode sec = new SqlStorProcExecCode(db.StoreProcedures, false, true, null, null, null, null); ShowCSharpCode scc = new ShowCSharpCode(sec.GetCode()); scc.Show(dp); }
private void ���Դ洢����ToolStripMenuItem_Click(object sender, EventArgs e) { Database db = new Database("Data Source=.;Initial Catalog=NewSystem;Integrated Security=True");//TestForSmartTools HR_JC //db.AddStoreProcedure("CustOrderHist2"); //db.AddStoreProcedure("CustOrderHist3"); db.GetAllStoreProcedure(); foreach ( Model.StoreProcedure sp in db.StoreProcedures ) { if (sp.Name=="GetUserMenu") { sp.ProcExecuteReturnType = Model.StoreProcedure.ExecuteReturnType.DataTable; } else { db.StoreProcedures.Remove(sp); } } //db.GetStoreProcedure("GetUserMenu"); //db.AddStoreProcedure("CustOrderHist2"); //db.GetStoreProcedure("CustOrderHist2").NeedReturnValue = true; //db.GetStoreProcedure("CustOrderHist2").ProcExecuteReturnType = Model.StoreProcedure.ExecuteReturnType.DataTable; //db.AddStoreProcedure("CustOrderHist3"); //db.GetStoreProcedure("CustOrderHist3").NeedReturnValue = false; //db.GetStoreProcedure("CustOrderHist3").ProcExecuteReturnType = Model.StoreProcedure.ExecuteReturnType.Scalar; SqlStorProcExecCode sec = new SqlStorProcExecCode(db.StoreProcedures, true, false, null, null, null, "SqlHelper"); ShowCSharpCode scc = new ShowCSharpCode(sec.GetCode()); scc.Show(dp); }