Beispiel #1
0
        public override int GetHashCode()
        {
            unchecked {
                int hash = 17;
                hash = hash * 23 + Status.GetHashCode();
                hash = hash * 23 + Amount.GetHashCode();
                hash = hash * 23 + Currency.GetHashCode();
                hash = hash * 23 + Description.GetHashCode();
                hash = hash * 23 + Capture.GetHashCode();
                hash = hash * 23 + Authorized.GetHashCode();
                hash = hash * 23 + Reversed.GetHashCode();
                hash = hash * 23 + Paid.GetHashCode();
                hash = hash * 23 + Transaction.GetHashCode();
                hash = hash * 23 + Card.GetHashCode();
                hash = hash * 23 + Refunded.GetHashCode();
                hash = hash * 23 + Refunds.GetHashCode();
                hash = hash * 23 + FailureCode.GetHashCode();
                hash = hash * 23 + FailureMessage.GetHashCode();
                hash = hash * 23 + Customer.GetHashCode();
                hash = hash * 23 + IP.GetHashCode();
                hash = hash * 23 + Dispute.GetHashCode();
                hash = hash * 23 + ReturnURI.GetHashCode();
                hash = hash * 23 + AuthorizeURI.GetHashCode();

                return(hash);
            }
        }
Beispiel #2
0
        public override int GetHashCode()
        {
            unchecked {
                int hash = 17;
                if (Recipient != default(string))
                {
                    hash = hash * 23 + Recipient.GetHashCode();
                }
                if (BankAccount != default(BankAccount))
                {
                    hash = hash * 23 + BankAccount.GetHashCode();
                }
                if (Sent != default(bool))
                {
                    hash = hash * 23 + Sent.GetHashCode();
                }
                if (Paid != default(bool))
                {
                    hash = hash * 23 + Paid.GetHashCode();
                }
                if (Fee != default(long))
                {
                    hash = hash * 23 + Fee.GetHashCode();
                }
                if (Amount != default(long))
                {
                    hash = hash * 23 + Amount.GetHashCode();
                }
                if (Currency != default(string))
                {
                    hash = hash * 23 + Currency.GetHashCode();
                }
                if (FailFast != default(bool))
                {
                    hash = hash * 23 + FailFast.GetHashCode();
                }
                if (FailureCode != default(string))
                {
                    hash = hash * 23 + FailureCode.GetHashCode();
                }
                if (FailureMessage != default(string))
                {
                    hash = hash * 23 + FailureMessage.GetHashCode();
                }
                if (Transaction != default(string))
                {
                    hash = hash * 23 + Transaction.GetHashCode();
                }

                return(hash);
            }
        }
Beispiel #3
0
        public override int GetHashCode()
        {
            unchecked {
                int hash = 17;
                hash = hash * 23 + Recipient.GetHashCode();
                hash = hash * 23 + BankAccount.GetHashCode();
                hash = hash * 23 + Sent.GetHashCode();
                hash = hash * 23 + Paid.GetHashCode();
                hash = hash * 23 + Fee.GetHashCode();
                hash = hash * 23 + Amount.GetHashCode();
                hash = hash * 23 + Currency.GetHashCode();
                hash = hash * 23 + FailureCode.GetHashCode();
                hash = hash * 23 + FailureMessage.GetHashCode();
                hash = hash * 23 + Transaction.GetHashCode();

                return(hash);
            }
        }
Beispiel #4
0
 public FailureByDesignException(FailureCode code, string message = "Failure By Design")
     : base(message)
 {
     Code = code;
 }
        // GET: /ServiceOrderProcess/

        public ActionResult ServiceOrderProcess()
        {
            string userName = "";

            TempData["ServiceOrderId"]  = Session["SID"];
            TempData["WorkOrderSiteId"] = Session["SiteID"];
            userName = User.Identity.Name.ToString().Split('\\')[1];
            SerivceOrderPartLine    serivceOrderPartLineObject = new SerivceOrderPartLine();
            ServiceOrderLine        serivceOrderLineObject     = new ServiceOrderLine();
            List <ServiceOrderLine> serviceOrderLineList       = new List <ServiceOrderLine>();

            try
            {
                if (HttpContext.Session != null)
                {
                    if (Session["SiteID"] == null)
                    {
                        return(RedirectToAction("ServiceOrderWithHistory"));
                    }
                }
                if (TempData["ServiceOrderId"] != null)
                {
                    serivceOrderLineObject.ServiceOrderLineList = serviceOrderLineList;
                    serivceOrderPartLineObject.ServiceOrderLine = serivceOrderLineObject;

                    FailureCode failureCodeObject = new FailureCode();
                    IEnumerable <FailureCode> failureCodeCollection = failureCodeObject.GetFailureCode(userName);
                    failureCodeObject.FailureCodeList = new SelectList(failureCodeCollection, "FailureCodeNo", "FailureDescription", null);
                    ViewData["FailureCodeList"]       = failureCodeObject.FailureCodeList;

                    PartDetails partDetails = new PartDetails();
                    partDetails.PartDetailsList = new SelectList(partDetails.GetItemNumbers(userName), "ItemNumber", "ItemNumber", null);
                    ViewData["PartNumberList"]  = partDetails.PartDetailsList;

                    LineProperty LinePropertyObject = new LineProperty();
                    IEnumerable <LineProperty> LinePropertyCollection = LinePropertyObject.GetLineProperty(userName);
                    LinePropertyObject.LinePropertyList = new SelectList(LinePropertyCollection, "LinePropertyCode", "LinePropertyDescription", null);
                    ViewData["LinePropertyList"]        = LinePropertyObject.LinePropertyList;



                    IEnumerable <SerivceOrderPartLine> serviceOrderPartLineCollection = null;

                    serviceOrderPartLineCollection = serivceOrderPartLineObject.GetSerialNumberByServiceOrder(TempData["ServiceOrderId"].ToString(), userName);


                    serivceOrderPartLineObject.ServiceOrderPartLineList = new SelectList(serviceOrderPartLineCollection, "ServiceObjectRelation", "SerialNumber", null);


                    ViewData["SORelationList"]        = serivceOrderPartLineObject.ServiceOrderPartLineList;
                    ViewData["WorkSerialNumberList"]  = serivceOrderPartLineObject.ServiceOrderPartLineList;
                    ViewData["ServiceOrderPartLines"] = GetServiceOrderPartLinesByServiceOrderID(TempData["ServiceOrderId"].ToString());


                    ServiceOrder ServiceOrder = new ServiceOrder();
                    ServiceOrder.ServiceOrderList            = GetServiceOrderDetailsByServiceOrder(TempData["WorkOrderSiteId"].ToString(), TempData["ServiceOrderId"].ToString());
                    serivceOrderPartLineObject.ServiceOrders = ServiceOrder;
                    ViewData["ServiceOrderLineinProcess"]    = serivceOrderPartLineObject.ServiceOrders.ServiceOrderList;

                    ServiceTechnician serviceTechnician = new ServiceTechnician();
                    IEnumerable <ServiceTechnician> serviceTechnicianCollection = null;
                    serviceTechnicianCollection = serviceTechnician.GetTechnicians(userName);

                    if (!String.IsNullOrEmpty(TempData["Technician"].ToString()))
                    {
                        serviceTechnician.ServiceTechnicianList = new SelectList(serviceTechnicianCollection, "ServiceTechnicianNo", "ServiceTechnicianName", serviceTechnicianCollection.First <ServiceTechnician>().ServiceTechnicianNo = TempData["Technician"].ToString());
                    }
                    else
                    {
                        serviceTechnician.ServiceTechnicianList = new SelectList(serviceTechnicianCollection, "ServiceTechnicianNo", "ServiceTechnicianName", null);
                    }
                    ViewData["ServiceTechnicianLoadList"] = serviceTechnician.ServiceTechnicianList;

                    Site site = new Site();
                    IEnumerable <Site> siteCollection = null;
                    siteCollection = site.GetSites(userName);
                    if (!String.IsNullOrEmpty(TempData["WorkOrderSiteId"].ToString()))
                    {
                        site.SiteList = new SelectList(siteCollection, "SiteId", "SiteName", siteCollection.First <Site>().SiteID = TempData["WorkOrderSiteId"].ToString());
                    }
                    else
                    {
                        site.SiteList = new SelectList(siteCollection, "SiteId", "SiteName", siteCollection.First <Site>().SiteID);
                    }


                    ViewData["siteList"]          = site.SiteList;
                    ViewData["TranasactionTypes"] = TransactionType.GetTransactionTypes();
                    TempData.Keep();
                }
                else
                {
                    return(RedirectToAction("ServiceOrderWithHistory"));
                    // return View("ServiceOrderWithHistory", serivceOrderPartLineObject);
                    //throw new Exception("Select the service order number in Service Order with history page");
                }
            }
            catch (Exception ex)
            {
                TempData.Keep();
                ExceptionLog.LogException(ex, userName);
                // throw new Exception("Select the service order number in Service Order with history page");
                //return RedirectToAction("ServiceOrderWithHistory");
                //  return Json("Select the service order number in Service Order with history page",JsonRequestBehavior.AllowGet);
            }

            return(View(serivceOrderPartLineObject));
        }
Beispiel #6
0
        public override int GetHashCode()
        {
            unchecked {
                int hash = 17;
                if (Status != default(ChargeStatus))
                {
                    hash = hash * 23 + Status.GetHashCode();
                }
                if (Amount != default(long))
                {
                    hash = hash * 23 + Amount.GetHashCode();
                }
                if (Currency != default(string))
                {
                    hash = hash * 23 + Currency.GetHashCode();
                }
                if (Description != default(string))
                {
                    hash = hash * 23 + Description.GetHashCode();
                }
                if (Metadata != default(IDictionary <string, object>))
                {
                    hash = hash * 23 + Metadata.GetHashCode();
                }
                if (Capture != default(bool))
                {
                    hash = hash * 23 + Capture.GetHashCode();
                }
                if (Authorized != default(bool))
                {
                    hash = hash * 23 + Authorized.GetHashCode();
                }
                if (Reversed != default(bool))
                {
                    hash = hash * 23 + Reversed.GetHashCode();
                }
                if (Paid != default(bool))
                {
                    hash = hash * 23 + Paid.GetHashCode();
                }
                if (Transaction != default(string))
                {
                    hash = hash * 23 + Transaction.GetHashCode();
                }
                if (SourceOfFund != default(SourceOfFunds))
                {
                    hash = hash * 23 + SourceOfFund.GetHashCode();
                }
                if (Card != default(Card))
                {
                    hash = hash * 23 + Card.GetHashCode();
                }
                if (Refunded != default(long))
                {
                    hash = hash * 23 + Refunded.GetHashCode();
                }
                if (Refunds != default(ScopedList <Refund>))
                {
                    hash = hash * 23 + Refunds.GetHashCode();
                }
                if (FailureCode != default(string))
                {
                    hash = hash * 23 + FailureCode.GetHashCode();
                }
                if (FailureMessage != default(string))
                {
                    hash = hash * 23 + FailureMessage.GetHashCode();
                }
                if (Customer != default(string))
                {
                    hash = hash * 23 + Customer.GetHashCode();
                }
                if (IP != default(string))
                {
                    hash = hash * 23 + IP.GetHashCode();
                }
                if (Dispute != default(Dispute))
                {
                    hash = hash * 23 + Dispute.GetHashCode();
                }
                if (ReturnURI != default(string))
                {
                    hash = hash * 23 + ReturnURI.GetHashCode();
                }
                if (AuthorizeURI != default(string))
                {
                    hash = hash * 23 + AuthorizeURI.GetHashCode();
                }
                if (Offsite != default(OffsiteTypes))
                {
                    hash = hash * 23 + Offsite.GetHashCode();
                }
                if (InstallmentTerms != default(int))
                {
                    hash = hash * 23 + InstallmentTerms.GetHashCode();
                }

                return(hash);
            }
        }