我在oracle 11g中有一个包如下:
CREATE OR REPLACE PACKAGE "HRS.PKG_TRAINING_SP" as
TYPE T_CURSOR IS REF CURSOR;
procedure GETPERSONNELTRAINIGLIST(
personnel_Id_in in string,
base_date_in in string,
is_current_in in number,
lst OUT T_CURSOR );
end;
Run Code Online (Sandbox Code Playgroud)
如何GETPERSONNELTRAINIGLIST使用Entity Framework(代码优先)执行上述过程package()?
注意:我正在使用Entity Framwork 6.0(代码优先)和devart EF Providerfor Oracle.
更新: 我使用以下代码:
var param1 = new OracleParameter("personnel_Id_in", OracleDbType.VarChar, "c5eb5589-8fee-47b6-85ad-261a0307cc16", ParameterDirection.Input);
var param2 = new OracleParameter("base_date_in", OracleDbType.VarChar, "1112", ParameterDirection.Input);
var param3 = new OracleParameter("is_current_in", OracleDbType.Number, 1, ParameterDirection.Input);
var ATests =
db.Database.SqlQuery<ATest>(
"BEGIN PKG_TRAINING_SP.GETPERSONNELTRAINIGLIST(:personnel_Id_in, :base_date_in, :is_current_in); end;",
param1, param2, param3).ToList();
Run Code Online (Sandbox Code Playgroud)
但低于错误: …
我正在使用c#WinForms.我弹出一个保存对话框,然后是一个消息框,表示已成功保存.
我刚刚意识到如果用户点击取消,我的消息框仍然会出现.
如何判断用户何时单击保存对话框上的取消按钮,然后在取消时执行某些操作?
基于此答案,我可以从类中获取描述属性,Property如下所示:
public class A
{
[Description("My Property")]
public string MyProperty { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我可以获得Description价值,如下:
// result: My Property
var foo = AttributeHelper.GetPropertyAttributeValue<A, string, DescriptionAttribute, string>(x => x.MyProperty, y => y.Description);
Run Code Online (Sandbox Code Playgroud)
现在,我必须在此帮助程序中进行哪些更改才能获取描述,cosnt fields如下所示:
public class A
{
[Description("Const Field")]
public const string ConstField = "My Const";
}
// output: Const Field
var foo = AttributeHelper.GetPropertyAttributeValue<A, string, DescriptionAttribute, string>(x => x.ConstField, y => y.Description);
Run Code Online (Sandbox Code Playgroud) 我对Winforms很新,我想知道如何使用MaskedTextBox来确保用户只输入数值(包括小数).
我使用"/ ^ [ - +]?[0-9] +(.[0-9] +)?$ /"尝试了屏蔽功能,并且没有成功.即使使用普通的文本框,我想要的只是数字/小数值
我正在使用ASP.NET C#网格视图,我想在控件中编辑在同一页面上显示的数据。但是当我编写网格视图行编辑事件时,它会在网格视图行中显示文本框,请问有人可以帮助我如何使用rowediting事件在网格视图中禁用内联编辑吗?
<asp:GridView ID="gvItems" runat="server" AutoGenerateColumns="False" AllowPaging="True"
BorderStyle="Solid" BorderWidth="1px" CellPadding="4" ForeColor="#333333" GridLines="None"
OnPageIndexChanging="gvItems_PageIndexChanging" Width="901px"
OnRowCommand="gvItems_RowCommand" OnSelectedIndexChanged="gvItems_SelectedIndexChanged" OnRowDataBound="gvItems_RowDataBound" OnRowEditing="gvItems_RowEditing">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:ButtonField Text="Edit" CommandName="Change" />
<asp:ButtonField Text="Addend" CommandName="Addend" />
<asp:BoundField DataField="ItemID" HeaderText="ID" />
<asp:BoundField DataField="Project" HeaderText="Project" SortExpression="Project" />
<asp:BoundField DataField="Type" HeaderText="Type" />
<asp:BoundField DataField="Release" HeaderText="Release" />
<asp:BoundField DataField="Priority" HeaderText="Priority" />
<asp:BoundField DataField="Severity" HeaderText="Severity" />
<asp:BoundField DataField="Client" HeaderText="Client" />
<asp:BoundField DataField="Status" HeaderText="Status" />
<asp:BoundField DataField="Subject" HeaderText="Subject" />
<asp:BoundField DataField="CreatedDate" DataFormatString="{0:d}" HeaderText="Created Date" />
<asp:TemplateField>
<ItemTemplate>
<!--To fire the OnRowEditing event.--> …Run Code Online (Sandbox Code Playgroud) 我在 asp.net 中有一个 RadioButtonList。我正在尝试做一件简单的事情,即在更改列表中的单选按钮时显示或隐藏 div。但事件 OnSelectedIndexChanged 没有触发。我不明白原因。这是代码
<asp:RadioButtonList ID="CityStateZip" runat="server" ForeColor="#333300" AutoPostBack="true" RepeatDirection="Horizontal" Width="274px" CausesValidation="true" ValidationGroup="SchoolSearchGroup" OnSelectedIndexChanged="CityStateZip_SelectedIndexChanged">
<asp:ListItem Value="1" Text="City and State" />
<asp:ListItem Value="2" Text="Zip Code" />
</asp:RadioButtonList>
<div id="zipcodediv" runat="server" visible="false" style="margin-left:75px">
code.........
</div>
<div id="citystatediv" runat="server" style="margin-left:75px; width: 708px;">
code........
</div>
Run Code Online (Sandbox Code Playgroud)
背后的代码
protected void CityStateZip_SelectedIndexChanged(Object sender,EventArgs e)
{
if (CityStateZip.SelectedValue == "1")
{
zipcodediv.Visible = false;
citystatediv.Visible = true;
}
if (CityStateZip.SelectedValue == "2")
{
citystatediv.Visible = false;
zipcodediv.Visible = true;
}
}
Run Code Online (Sandbox Code Playgroud) 我的应用程序适用于位置。所以我需要打开定位服务。我看到有关在iOS平台上检查位置服务状态的问题,但是有没有办法在共享项目中检查这一点?
我正在寻找一种事件类型解决方案,如果用户关闭位置服务,应用程序将停止正在执行的操作并要求用户再次打开位置。
我需要一个解决方案,从SharePoint服务器上存在的XSN模板创建InfoPath实例表单,我正在使用此方法,但这会在我们可能没有写入权限的服务器的临时目录中提取模板文件.有更好的解决方案吗?
我想改变一个ListBox 项目的颜色.我的代码似乎不起作用.它只是将类的名称空间添加到ListBox项目中.
class myListboxItem
{
public Color ItemColor { get; set; }
public string Message { get; set; }
public myListboxItem(Color c, string m)
{
ItemColor = c;
Message = m;
}
}
Run Code Online (Sandbox Code Playgroud)
将项添加到的代码ListBox:
listBox1.Items.Add(new myListboxItem(Color.Red,"SKIPPED: " + partThreeOfPath));
Run Code Online (Sandbox Code Playgroud)
这会ListBox在黑色中添加一个项目AddFoldersToClientFolder.myListboxItem.
c# ×7
winforms ×3
asp.net ×2
.net ×1
devart ×1
infopath ×1
infopath2010 ×1
listbox ×1
location ×1
oracle ×1
oracle11g ×1
reflection ×1
service ×1
sharepoint ×1
xamarin ×1