public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is Tender other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) &&
                   ((TransactionId == null && other.TransactionId == null) || (TransactionId?.Equals(other.TransactionId) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((Note == null && other.Note == null) || (Note?.Equals(other.Note) == true)) &&
                   ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) &&
                   ((TipMoney == null && other.TipMoney == null) || (TipMoney?.Equals(other.TipMoney) == true)) &&
                   ((ProcessingFeeMoney == null && other.ProcessingFeeMoney == null) || (ProcessingFeeMoney?.Equals(other.ProcessingFeeMoney) == true)) &&
                   ((CustomerId == null && other.CustomerId == null) || (CustomerId?.Equals(other.CustomerId) == true)) &&
                   ((Type == null && other.Type == null) || (Type?.Equals(other.Type) == true)) &&
                   ((CardDetails == null && other.CardDetails == null) || (CardDetails?.Equals(other.CardDetails) == true)) &&
                   ((CashDetails == null && other.CashDetails == null) || (CashDetails?.Equals(other.CashDetails) == true)) &&
                   ((AdditionalRecipients == null && other.AdditionalRecipients == null) || (AdditionalRecipients?.Equals(other.AdditionalRecipients) == true)) &&
                   ((PaymentId == null && other.PaymentId == null) || (PaymentId?.Equals(other.PaymentId) == true)));
        }
Exemple #2
0
        public ActionResult AddCashDeails(int id, CashDetails cashDetails)
        {
            var concernId = Convert.ToInt32(Session["ConcernId"]);
            var userId    = Convert.ToInt32(Session["UserId"]);

            _sales.AddCashDetails(cashDetails, concernId, userId, id);
            return(RedirectToAction("Orders", "PermessData"));
        }
 public void AddCashDetails(CashDetails cashDetails, int concernID, int userId, int code)
 {
     cashDetails.ConcernId    = concernID;
     cashDetails.Creator      = userId;
     cashDetails.CreationDate = DateTime.Now;
     cashDetails.SICode       = code.ToString();
     _context.CashDetails.Add(cashDetails);
     _context.SaveChanges();
 }
Exemple #4
0
        public ActionResult EditCash(int id, CashDetails cashDetails)
        {
            var concernId = Convert.ToInt32(Session["ConcernId"]);
            var userId    = Convert.ToInt32(Session["UserId"]);

            if (concernId > 0 && userId > 0)
            {
                _sales.UpdateCashDetails(cashDetails, concernId, userId, id);
                return(RedirectToAction("EditOrders", "PermessData", new { Areas = "Permess" }));
            }
            return(RedirectToAction("LogIn", "GlobalData", new { Area = "Global" }));
        }
        public ActionResult SaveBillSettlement(string BS, CashDetails lstCashDetails, string lstCardDetails)
        {
            List <CardDetails> ListItems = serializer.Deserialize <List <CardDetails> >(lstCardDetails);
            BillSettlementDTO  XYZ       = serializer.Deserialize <BillSettlementDTO>(BS);

            XYZ.statusid  = 1;
            XYZ.createdby = Convert.ToInt64(Session["UserId"]);
            var c = objPOSTransaction.SaveBillSettlement(XYZ, lstCashDetails, ListItems);

            return(new JsonResult {
                Data = c, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Exemple #6
0
 public string AddCashDetails(CashDetails obj)
 {
     try
     {
         DALSchedule objSchedule = new DALSchedule();
         string      tranid      = objSchedule.AddCashDeatails(obj).ToString();
         //return 1;
         return(tranid);
     }
     catch (Exception)
     {
         throw;
     }
 }
        public void UpdateCashDetails(CashDetails cashDetails, int concernID, int userId, int code)
        {
            var cash = _context.CashDetails.FirstOrDefault(x => x.SICode == code.ToString());

            cash.BillingDate     = cashDetails.BillingDate;
            cash.BillNo          = cashDetails.BillNo;
            cash.ChalanInfo      = cashDetails.ChalanInfo;
            cash.ComissionUSD    = cashDetails.ComissionUSD;
            cash.CreationDate    = DateTime.Now;
            cash.Creator         = userId;
            cash.Description     = cashDetails.Description;
            cash.FromDestination = cashDetails.FromDestination;
            cash.ToDestination   = cashDetails.ToDestination;
            _context.SaveChanges();
        }
 protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"Id = {(Id == null ? "null" : Id == string.Empty ? "" : Id)}");
     toStringOutput.Add($"LocationId = {(LocationId == null ? "null" : LocationId == string.Empty ? "" : LocationId)}");
     toStringOutput.Add($"TransactionId = {(TransactionId == null ? "null" : TransactionId == string.Empty ? "" : TransactionId)}");
     toStringOutput.Add($"CreatedAt = {(CreatedAt == null ? "null" : CreatedAt == string.Empty ? "" : CreatedAt)}");
     toStringOutput.Add($"Note = {(Note == null ? "null" : Note == string.Empty ? "" : Note)}");
     toStringOutput.Add($"AmountMoney = {(AmountMoney == null ? "null" : AmountMoney.ToString())}");
     toStringOutput.Add($"TipMoney = {(TipMoney == null ? "null" : TipMoney.ToString())}");
     toStringOutput.Add($"ProcessingFeeMoney = {(ProcessingFeeMoney == null ? "null" : ProcessingFeeMoney.ToString())}");
     toStringOutput.Add($"CustomerId = {(CustomerId == null ? "null" : CustomerId == string.Empty ? "" : CustomerId)}");
     toStringOutput.Add($"Type = {(Type == null ? "null" : Type.ToString())}");
     toStringOutput.Add($"CardDetails = {(CardDetails == null ? "null" : CardDetails.ToString())}");
     toStringOutput.Add($"CashDetails = {(CashDetails == null ? "null" : CashDetails.ToString())}");
     toStringOutput.Add($"AdditionalRecipients = {(AdditionalRecipients == null ? "null" : $"[{ string.Join(", ", AdditionalRecipients)} ]")}");
     toStringOutput.Add($"PaymentId = {(PaymentId == null ? "null" : PaymentId == string.Empty ? "" : PaymentId)}");
 }
Exemple #9
0
    private string BookSumoBusService()
    {
        BLSchedule  obj        = new BLSchedule();
        CashDetails objCash    = new CashDetails();
        ArrayList   psgDetails = GetPassengerDeatils();

        try
        {
            objCash.CustName     = psgDetails[0].ToString();
            objCash.EmailID      = txtEmail.Text.ToString();
            objCash.Mobile_no    = txtMobile.Text.ToString();
            objCash.Address      = txtAddress.Text.ToString();
            objCash.Gender       = psgDetails[1].ToString();
            objCash.Age          = psgDetails[2].ToString();
            objCash.session_id   = Convert.ToInt32(ViewState["session_id"].ToString());
            objCash.total_seats  = GetSeats();
            objCash.total_amount = ViewState["payableAmount"] == null?Convert.ToInt32(ViewState["CustomerAmt"].ToString()) : Convert.ToInt32(ViewState["payableAmount"].ToString());

            objCash.ActiveID = 0;
            if (Session["Mode"] != null)
            {
                objCash.Mode = Session["Mode"].ToString();
            }
            objCash.FranCode      = ViewState["FranCode"] == null ? "" : ViewState["FranCode"].ToString().Trim();
            objCash.cust_amount   = Convert.ToInt32(ViewState["CustomerAmt"].ToString());
            objCash.BoardingPoint = ddlBoardingPoints.SelectedItem.Text.ToString();
            objCash.tranid        = "";
            return(obj.AddCashDetails(objCash).ToString());
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
            objCash = null;
            obj     = null;
        }
    }
Exemple #10
0
        public string AddCashDeatails(CashDetails obj)
        {
            DBParams[] dbParams = new DBParams[15];

            dbParams[0] = new DBParams("@CustName", obj.CustName, ParamType.String, ParamDirection.Input);
            dbParams[1] = new DBParams("@EmailID", obj.EmailID, ParamType.String, ParamDirection.Input);
            dbParams[2] = new DBParams("@Mobile_no", obj.Mobile_no, ParamType.String, ParamDirection.Input);
            dbParams[3] = new DBParams("@Address", obj.Address, ParamType.String, ParamDirection.Input);
            //dbParams[4] = new DBParams("@User_session_id", obj.User_session_id, ParamType.Int, ParamDirection.Input);
            dbParams[4]  = new DBParams("@session_id", obj.session_id, ParamType.Int, ParamDirection.Input);
            dbParams[5]  = new DBParams("@total_seat", obj.total_seats, ParamType.String, ParamDirection.Input);
            dbParams[6]  = new DBParams("@total_amount", obj.total_amount, ParamType.Int, ParamDirection.Input);
            dbParams[7]  = new DBParams("@ActiveID", obj.ActiveID, ParamType.Int, ParamDirection.Input);
            dbParams[8]  = new DBParams("@mode", obj.Mode, ParamType.String, ParamDirection.Input);
            dbParams[9]  = new DBParams("@tranid", obj.tranid, ParamType.String, ParamDirection.Output, 20);
            dbParams[10] = new DBParams("@FranCode", obj.FranCode, ParamType.String, ParamDirection.Input);
            dbParams[11] = new DBParams("@cust_Amt", obj.cust_amount, ParamType.Int, ParamDirection.Input);
            dbParams[12] = new DBParams("@boardingPoint", obj.BoardingPoint, ParamType.String, ParamDirection.Input);
            dbParams[13] = new DBParams("@gender", obj.Gender, ParamType.String, ParamDirection.Input);
            dbParams[14] = new DBParams("@age", obj.Age, ParamType.String, ParamDirection.Input);
            string tranid = DALHandler.ExecuteStatementCashEntry(Constants.AddCashDetails, dbParams).ToString();

            return(tranid);
        }
Exemple #11
0
        public override int GetHashCode()
        {
            int hashCode = -1832006143;

            if (Id != null)
            {
                hashCode += Id.GetHashCode();
            }

            if (LocationId != null)
            {
                hashCode += LocationId.GetHashCode();
            }

            if (TransactionId != null)
            {
                hashCode += TransactionId.GetHashCode();
            }

            if (CreatedAt != null)
            {
                hashCode += CreatedAt.GetHashCode();
            }

            if (Note != null)
            {
                hashCode += Note.GetHashCode();
            }

            if (AmountMoney != null)
            {
                hashCode += AmountMoney.GetHashCode();
            }

            if (TipMoney != null)
            {
                hashCode += TipMoney.GetHashCode();
            }

            if (ProcessingFeeMoney != null)
            {
                hashCode += ProcessingFeeMoney.GetHashCode();
            }

            if (CustomerId != null)
            {
                hashCode += CustomerId.GetHashCode();
            }

            if (Type != null)
            {
                hashCode += Type.GetHashCode();
            }

            if (CardDetails != null)
            {
                hashCode += CardDetails.GetHashCode();
            }

            if (CashDetails != null)
            {
                hashCode += CashDetails.GetHashCode();
            }

            if (AdditionalRecipients != null)
            {
                hashCode += AdditionalRecipients.GetHashCode();
            }

            if (PaymentId != null)
            {
                hashCode += PaymentId.GetHashCode();
            }

            return(hashCode);
        }