本文整理汇总了C#中Requisition类的典型用法代码示例。如果您正苦于以下问题:C# Requisition类的具体用法?C# Requisition怎么用?C# Requisition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Requisition类属于命名空间,在下文中一共展示了Requisition类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: btnSubmit_Click
protected void btnSubmit_Click(object sender, EventArgs e)
{
Requisition req = new Requisition();
req.Req_Form_No = empCtrl.generateID(ur.Dept_ID);
req.Request_Date = DateTime.Now;
req.Emp_ID = ur.Emp_ID;
req.Approval_Status = 1;
req.Approval_By =null;
req.Approval_Date = null;
req.Req_Status = null;
req.Notification = false;
req.Prior = false;
empCtrl.submitRequisition(req);
foreach (GridViewRow row in itemDetailsGrid.Rows)
{
Requisition_Detail rd = new Requisition_Detail();
rd.Req_Form_No = req.Req_Form_No;
rd.Item_Code = row.Cells[1].Text;
rd.Description = row.Cells[2].Text;
rd.Qty = Convert.ToInt32((row.Cells[3]).Text);
empCtrl.submitRequisitionDetails(rd);
}
this.itemDetailsGrid.DataSource = null;
User u = new User();
u.Emp_ID = ur.Emp_ID;
empCtrl.sendEmailToDeptHead(u);
data = new List<fields>();
lblStatus.Text = "The Requisition was submitted successfully";
ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", "alert('Record saved successfully.');window.location='Emp-Welcom.aspx';", true);
}
开发者ID:kaungmyat,项目名称:university_stationary,代码行数:32,代码来源:EmployeeRequisition.aspx.cs
示例2: btnApprove_Click
protected void btnApprove_Click(object sender, EventArgs e)
{
List<Requisition> RqList = new List<Requisition>();
List<Requisition> RqrejList = new List<Requisition>();
string EmpID = ur.Emp_ID;
string DeptID = ur.Dept_ID;
foreach (GridViewRow row in gvReqList.Rows)
{
CheckBox chk = (CheckBox)row.FindControl("chkSelect");
if (chk.Checked)
{
Requisition req = new Requisition();
req.Req_Form_No = row.Cells[2].Text;
req.Approval_Status = 2;
RqList.Add(req);
}
else
{
Requisition req = new Requisition();
req.Req_Form_No = row.Cells[2].Text;
RqrejList.Add(req);
}
}
string Req_No = approve.generateID(DeptID);
arControl.approveSelectedRequisitions(RqList, Req_No, EmpID, DeptID, RqrejList);
if (RqrejList.Count() > 0)
{
Session["DepId"] = DeptID;
Response.Redirect("rejectReq.aspx");
}
}
开发者ID:kaungmyat,项目名称:university_stationary,代码行数:31,代码来源:listOfPendingReq.aspx.cs
示例3: OnSizeRequested
protected override void OnSizeRequested (ref Requisition requisition)
{
base.OnSizeRequested (ref requisition);
requisition.Width = (int) primary.Width;
requisition.Height = (int) primary.Height;
}
开发者ID:vvarshne,项目名称:monodevelop,代码行数:7,代码来源:DockBarItem.cs
示例4: actionCreateRequisition
public Message actionCreateRequisition(Requisition objIn)
{
objIn.datetime_requested = DateTime.Now;
objIn.status = 0;
try
{
data.Requisitions.AddObject(objIn);
Stationery stationery = data.Stationeries.Where(o => o.id == objIn.stationery).SingleOrDefault();
User employee = data.Users.Where(o=> o.id == objIn.user_obj).SingleOrDefault();
Department dept = data.Departments.Where(o=> o.id == objIn.department).SingleOrDefault();
User head = data.Users.Where(o=> o.id == dept.department_head).SingleOrDefault();
String email_title = "Stationery Requesting from " + employee.firstname + " " + employee.lastname;
String email_body = "<p>Hello " + head.firstname + " " + head.lastname + ",</p>" +
"<p>The following item is requested from " + employee.firstname + " " + employee.lastname + ".</p>" +
"<p><b>Stationery Name : " + stationery.stationery_name + "<br />" +
"Quantity : " + objIn.quantity + " " + stationery.unit_of_measure+ "</b></p>" +
"<p>Please click the following link to login to your account and approve.<br /> " +
Configs.APP_URL_ROOT+
"<br />Thank you,<br/> Logic University.<p>This is system generated mail. Please do not reply.</p>";
Helper.sendMail(head.email, "[email protected]", email_title, email_body);
return this.getNewDefaultMessageForDBOperations(data.SaveChanges() == 1);
}
catch (Exception e)
{
return this.getNewDefaultMessageForException(e);
}
}
开发者ID:TheinHtikeAung,项目名称:Stationery-Store-Inventory-System,代码行数:31,代码来源:RequisitionController.cs
示例5: OnSizeRequested
protected override void OnSizeRequested(ref Requisition requisition)
{
if (this.Child != null)
{
requisition = this.Child.SizeRequest();
}
}
开发者ID:rajsite,项目名称:lvcef,代码行数:7,代码来源:WebNavigationBox.cs
示例6: OnSizeRequested
protected override void OnSizeRequested (ref Requisition requisition)
{
if (child != null)
requisition = child.SizeRequest ();
else
base.OnSizeRequested (ref requisition);
}
开发者ID:msiyer,项目名称:Pinta,代码行数:7,代码来源:FilledAreaBin.cs
示例7: OnSizeRequested
protected override void OnSizeRequested (ref Requisition requisition)
{
base.OnSizeRequested (ref requisition);
const int upperBound = 20;
if (Allocation.Width > 0 && Math.Abs (Allocation.Width - requisition.Width) < upperBound)
requisition.Width = Math.Max (Allocation.Width, requisition.Width);
}
开发者ID:nocache,项目名称:monodevelop,代码行数:7,代码来源:MonoDevelopStatusBar.cs
示例8: OnSizeRequested
protected override void OnSizeRequested (ref Requisition req)
{
base.OnSizeRequested (ref req);
if (req.Width <= 0)
req.Width = minSize;
if (req.Height <= 0)
req.Height = minSize;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:8,代码来源:Placeholder.cs
示例9: OnSizeRequested
protected override void OnSizeRequested (ref Requisition requisition)
{
base.OnSizeRequested (ref requisition);
if (wRequest > 0) {
requisition.Width = wRequest;
}
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:8,代码来源:OverlayMessageWindow.cs
示例10: OnSizeRequested
protected override void OnSizeRequested (ref Requisition requisition)
{
base.OnSizeRequested (ref requisition);
if (SizeFunc != null) {
requisition.Width = Math.Min (SizeFunc (), textEditor.Allocation.Width - border * 2);
}
}
开发者ID:xinfushe,项目名称:monodevelop,代码行数:9,代码来源:OverlayMessageWindow.cs
示例11: OnSizeRequested
protected override void OnSizeRequested (ref Requisition req)
{
if (Orientation == Orientation.Horizontal) {
req.Width = GripSize + MarginLeft + MarginRight;
req.Height = 0;
} else {
req.Width = 0;
req.Height = GripSize + MarginLeft + MarginRight;
}
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:10,代码来源:DockGrip.cs
示例12: OnSizeRequested
protected override void OnSizeRequested (ref Requisition requisition)
{
base.OnSizeRequested (ref requisition);
if (box.Child != null) {
requisition = box.Child.SizeRequest ();
requisition.Height += 2 * box.Child.Style?.YThickness ?? 0;
}
else
requisition = box.SizeRequest ();
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:10,代码来源:TreeViewCellContainer.cs
示例13: OnSizeRequested
protected override void OnSizeRequested (ref Requisition requisition)
{
if (child != null) {
requisition = child.SizeRequest ();
requisition.Width += leftMargin + rightMargin + leftPadding + rightPadding;
requisition.Height += topMargin + bottomMargin + topPadding + bottomPadding;
} else {
requisition.Width = 0;
requisition.Height = 0;
}
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:11,代码来源:HeaderBox.cs
示例14: btnOk_Click
protected void btnOk_Click(object sender, EventArgs e)
{
reasone = txtReasone.Text;
foreach (GridViewRow row in gvRejectedRequest.Rows)
{
Requisition req = new Requisition();
req.Req_Form_No = row.Cells[0].Text;
req.Approval_Status = 0;
req.Rej_Comment = reasone;
erControl.updateRejectedRequisition(req);
}
Response.Redirect("Head-welcome.aspx");
}
开发者ID:kaungmyat,项目名称:university_stationary,代码行数:14,代码来源:HeadRejectRequisition.aspx.cs
示例15: OnSizeRequested
protected override void OnSizeRequested (ref Requisition req)
{
Requisition headerReq, tileReq;
headerReq = header.SizeRequest ();
tileReq.Width = tileReq.Height = 0;
foreach (Widget w in AllTiles) {
tileReq = w.SizeRequest ();
req.Width = Math.Max (req.Width, tileReq.Width);
req.Height = Math.Max (req.Height, tileReq.Height);
}
req.Height = (Expanded) ?
headerReq.Height + PageSize * tileReq.Height :
headerReq.Height + 2;
req.Width = Math.Max (headerReq.Width + headerReq.Height,
tileReq.Width + 2 * headerReq.Height);
req.Width += (int)(2 * BorderWidth);
req.Height += (int)(2 * BorderWidth);
}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:23,代码来源:ListCategory.cs
示例16: OnSizeRequested
protected override void OnSizeRequested (ref Requisition req)
{
Requisition headerReq, tileReq;
req.Height = req.Width = 0;
headerReq = header.SizeRequest ();
tileReq.Width = tileReq.Height = 0;
foreach (Widget w in AllTiles) {
tileReq = w.SizeRequest ();
req.Width = Math.Max (req.Width, tileReq.Width);
req.Height = Math.Max (req.Height, tileReq.Height);
}
// req is now the max width/height of a single tile. Indent
// req.Width, and use that as our width request, so that the
// minimum width you can resize the category to is wide enough to
// fit a whole column. But request a req.Height that is only tall
// enough to fit PageSize tiles if we get the number of columns
// we'd wanted. (OnSizeAllocated will force a recalculation with
// fewer columns if we don't get enough width.)
req.Width += 2 * headerReq.Height;
req.Height *= (PageSize + Columns - 1) / Columns;
if (!Expanded)
req.Height = 2; // keep a thin line of background.
// Add height for the header, and update the width if the header
// is wider than the tile area
req.Height += headerReq.Height;
req.Width = Math.Max (req.Width, headerReq.Width);
// Handle BorderWidth
req.Width += (int)(2 * BorderWidth);
req.Height += (int)(2 * BorderWidth);
}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:37,代码来源:TileCategory.cs
示例17: OnSizeRequested
protected override void OnSizeRequested(ref Requisition req)
{
req.Width = req.Height = 0;
foreach (WidgetPosition pos in widgets) {
Requisition wreq = pos.Widget.SizeRequest ();
if (placement == Placement.Top || placement == Placement.Bottom) {
if (pos.X + wreq.Width > req.Width)
req.Width = pos.X + wreq.Width;
if (pos.Y + wreq.Height > req.Height)
req.Height = pos.Y + wreq.Height;
} else {
if (pos.Y + wreq.Width > req.Width)
req.Width = pos.Y + wreq.Width;
if (pos.X + wreq.Height > req.Height)
req.Height = pos.X + wreq.Height;
}
}
if (placement == Placement.Top || placement == Placement.Bottom)
req.Width = 0;
else
req.Height = 0;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:22,代码来源:FixedPanel.cs
示例18: OnSizeRequested
protected override void OnSizeRequested(ref Requisition requisition)
{
requisition.Width = (int) btnNormal.Size.Width;
requisition.Height = (int) btnNormal.Size.Height + 2;
base.OnSizeRequested (ref requisition);
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:6,代码来源:RoundButton.cs
示例19: OnSizeRequested
protected override void OnSizeRequested (ref Requisition req)
{
// The Toplevel check is done to ensure that this widget is anchored,
// otherwise the Realize call will fail.
if (!child.IsRealized && Toplevel is Gtk.Window)
child.Realize ();
req = child.SizeRequest ();
// Make some room for the border
req.Width += padding * 2 + selectionBorder * 2;
req.Height += padding * 2 + selectionBorder * 2;
selectionBox.SizeRequest ();
if (selectionBox.Allocation.Width > req.Width)
req.Width = selectionBox.Allocation.Width;
if (selectionBox.Allocation.Height > req.Height)
req.Height = selectionBox.Allocation.Height;
foreach (TopLevelChild tchild in topLevels) {
Gtk.Requisition treq = tchild.Child.SizeRequest ();
if (tchild.X + treq.Width > req.Width)
req.Width = tchild.X + treq.Width;
if (tchild.Y + treq.Height > req.Height)
req.Height = tchild.Y + treq.Height;
}
}
开发者ID:kdubau,项目名称:monodevelop,代码行数:25,代码来源:WidgetDesignerBackend.cs
示例20: OnSizeReq
void OnSizeReq (object o, SizeRequestedArgs a)
{
if (!AllowResize) {
a.RetVal = false;
QueueDraw ();
return;
}
currentSizeRequest = a.Requisition;
Rectangle alloc = child.Allocation;
int nw = alloc.Width;
int nh = alloc.Height;
if (a.Requisition.Width > nw) nw = a.Requisition.Width;
if (a.Requisition.Height > nh) nh = a.Requisition.Height;
if (nw != alloc.Width || nh != alloc.Height) {
int ow = child.WidthRequest;
int oh = child.HeightRequest;
child.SetSizeRequest (nw, nh);
if (ow > nw)
child.WidthRequest = ow;
if (oh > nh)
child.HeightRequest = oh;
QueueDraw ();
}
}
开发者ID:kdubau,项目名称:monodevelop,代码行数:28,代码来源:WidgetDesignerBackend.cs
注:本文中的Requisition类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论