本文整理汇总了C#中Requisition类的典型用法代码示例。如果您正苦于以下问题:C# Requisition类的具体用法?C# Requisition怎么用?C# Requisition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Requisition类属于命名空间,在下文中一共展示了Requisition类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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");
}
}
示例3: OnSizeRequested
protected override void OnSizeRequested (ref Requisition requisition)
{
base.OnSizeRequested (ref requisition);
requisition.Width = (int) primary.Width;
requisition.Height = (int) primary.Height;
}
示例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);
}
}
示例5: OnSizeRequested
protected override void OnSizeRequested(ref Requisition requisition)
{
if (this.Child != null)
{
requisition = this.Child.SizeRequest();
}
}
示例6: OnSizeRequested
protected override void OnSizeRequested (ref Requisition requisition)
{
if (child != null)
requisition = child.SizeRequest ();
else
base.OnSizeRequested (ref requisition);
}
示例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);
}
示例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;
}
示例9: OnSizeRequested
protected override void OnSizeRequested (ref Requisition requisition)
{
base.OnSizeRequested (ref requisition);
if (wRequest > 0) {
requisition.Width = wRequest;
}
}
示例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);
}
}
示例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;
}
}
示例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 ();
}
示例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;
}
}
示例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");
}
示例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);
}