private List<string> ValidateTranForNextStep(Tran tran, int statusFrom, int statusTo) { if(statusFrom == 1 && statusTo == 2 ) { return ValidateTranToBeOperations(tran); } else if (statusFrom == 2 && statusTo == 3) { return ValidateTranToBeAccountant(tran); } else if (statusFrom == 3 && statusTo == 4) { return ValidateTranToBeCompleted(tran); } return new List<string>(); }
private List<string> ValidateTranToBeCompleted(Tran tran) { List<string> errors = new List<string>(); if (tran.CourierID == null) { errors.Add("Courier is Missing"); } if (tran.BookingDate == null) { errors.Add("Booking Date is Missing"); } if (tran.BLNo == null) { errors.Add("B/L Number is Missing"); } if (tran.ConsigneeID == null) { errors.Add("Consignee is Missing"); } if (tran.ETD == null) { errors.Add("ETD is Missing"); } if (tran.TranDetail.PaymentFinished == false) { errors.Add("Payment finsihed flag is not set, there is still amount of money remaining"); } //var oNetResult = CheckOriginNet(tran.FeesInOriginNet); //if (oNetResult.Count > 0) //{ // errors.AddRange(oNetResult); //} //var oSellingResult = CheckOriginSelling(tran.FeesInOriginSelling); //if (oSellingResult.Count > 0) //{ // errors.AddRange(oSellingResult); //} return errors; }
private List<string> ValidateTranToBeOperations(Tran tran) { List<string> errors = new List<string>(); return errors; }
private List<string> ValidateTranToBeAccountant(Tran tran) { List<string> errors = new List<string>(); return errors; }