Пример #1
0
        public ActionResult Save(LCMLCRetirement dataSet)
        {
            _userId = Convert.ToInt32(Session["UserID"]);

            objValMssg = objDalLCRetirement.SaveLCM_LCRetirement(dataSet, _userId, "LCRetirement/LCRetirement");
            return(Json(new { msg = objValMssg }));
        }
Пример #2
0
 public ActionResult SaveAndUpdate(LCMLCRetirement model)
 {
     objValMssg = model.LCRetirementID == 0 ? objDalLCRetirement.SaveLCM_LCRetirement(model, Convert.ToInt32(Session["UserID"]), "LCMLCRetirement/LCMLCRetirement") :
                  objDalLCRetirement.UpdateLCM_LCRetirement(model, Convert.ToInt32(Session["UserID"]));
     return(Json(new { msg = objValMssg }));
 }
Пример #3
0
        public ActionResult GetLcmRetirementByLCRetirementID(string LCRetirementID)
        {
            int id = Convert.ToInt32(LCRetirementID);
            LCM_LCRetirement dataSet = objRepository.LcmRetirementRpository.GetByID(id);

            LCMLCRetirement ob = new LCMLCRetirement();

            ob.LCNo             = dataSet.LCNo;
            ob.LCID             = Convert.ToInt32(dataSet.LCID);
            ob.LCRetirementID   = dataSet.LCRetirementID;
            ob.LCRetirementNo   = dataSet.LCRetirementNo;
            ob.LCRetirementDate = dataSet.LCRetirementDate == null ? "":Convert.ToDateTime(dataSet.LCRetirementDate).ToString("dd/MM/yyyy");
            ob.BillValue        = dataSet.BillValue;

            ob.LCRCurrency      = dataSet.LCRCurrency;
            ob.ExchangeRate     = dataSet.ExchangeRate == null ? 0 : dataSet.ExchangeRate;
            ob.ExchangeCurrency = dataSet.ExchangeCurrency;

            if (dataSet.ExchangeValue == null)
            {
                ob.ExchangeValue = 0;
            }
            else
            {
                ob.ExchangeValue = (decimal)dataSet.ExchangeValue;
            }

            if (dataSet.LessMargin == null)
            {
                ob.LessMargin = 0;
            }
            else
            {
                ob.LessMargin = (decimal)dataSet.LessMargin;
            }

            ob.InterestPersent = dataSet.InterestPersent;
            ob.InterestAmount  = (decimal)dataSet.InterestAmount;


            if (dataSet.OtherCharge == null)
            {
                ob.OtherCharge = 0;
            }
            else
            {
                ob.OtherCharge = dataSet.OtherCharge;
            }

            if (dataSet.BankCommissionAmt == null)
            {
                ob.BankCommissionAmt = 0;
            }
            else
            {
                ob.BankCommissionAmt = (decimal)dataSet.BankCommissionAmt;
            }


            if (dataSet.SwiftCharge == null)
            {
                ob.SwiftCharge = 0;
            }
            else
            {
                ob.SwiftCharge = (decimal)dataSet.SwiftCharge;
            }


            if (dataSet.TotalAmount == null)
            {
                ob.TotalAmount = 0;
            }
            else
            {
                ob.TotalAmount = (decimal)dataSet.TotalAmount;
            }


            if (dataSet.GrandTotal == null)
            {
                ob.GrandTotal = 0;
            }
            else
            {
                ob.GrandTotal = (decimal)dataSet.GrandTotal;
            }

            ob.RecordStatus = dataSet.RecordStatus;
            ob.Remarks      = dataSet.Remarks;

            return(Json(ob, JsonRequestBehavior.AllowGet));
        }
Пример #4
0
        public ActionResult SearchAllDataOfLcRetirement(string LCRetirementID)
        {
            int             lcRetirementId = Convert.ToInt32(LCRetirementID);
            var             lcInfo         = objRepository.LcmRetirementRpository.GetByID(lcRetirementId);
            LCMLCRetirement ob             = new LCMLCRetirement();

            if (lcInfo != null)
            {
                ob.LCRetirementID   = lcInfo.LCRetirementID;
                ob.LCRetirementNo   = lcInfo.LCRetirementNo;
                ob.LessMargin       = lcInfo.LessMargin;
                ob.LCRetirementDate = lcInfo.LCRetirementDate == null ? " " : Convert.ToDateTime(lcInfo.LCRetirementDate).ToString("dd/MM/yyyy");//temp.LCRetirementDate == null ? " " : Convert.ToDateTime(temp.LCRetirementDate).ToString("dd/MM/yyyy")
                ob.LCID             = lcInfo.LCID;
                ob.LCNo             = lcInfo.LCNo;
                var    id       = objRepository.CurrencyRepository.GetByID(lcInfo.LCRCurrency).CurrencyID;
                string currency = "";
                if (id != null)
                {
                    currency = objRepository.CurrencyRepository.GetByID(id).CurrencyName;
                }
                ob.CurrencyName     = currency;//lcInfo.Sys_Currency.CurrencyName;
                ob.ExchangeRate     = lcInfo.ExchangeRate;
                ob.ExchangeCurrency = lcInfo.ExchangeCurrency;
                ob.InterestAmount   = lcInfo.InterestAmount;
                ob.InterestPersent  = lcInfo.InterestPersent;
                ob.BillValue        = lcInfo.BillValue;
                ob.Remarks          = lcInfo.Remarks;
                ob.RecordStatus     = lcInfo.RecordStatus;


                if (lcInfo.ExchangeValue == null)
                {
                    ob.ExchangeValue = 0;
                }
                else
                {
                    ob.ExchangeValue = (decimal)lcInfo.ExchangeValue;
                }

                if (lcInfo.LessMargin == null)
                {
                    ob.LessMargin = 0;
                }
                else
                {
                    ob.LessMargin = (decimal)lcInfo.LessMargin;
                }


                if (lcInfo.OtherCharge == null)
                {
                    ob.OtherCharge = 0;
                }
                else
                {
                    ob.OtherCharge = lcInfo.OtherCharge;
                }

                if (lcInfo.BankCommissionAmt == null)
                {
                    ob.BankCommissionAmt = 0;
                }
                else
                {
                    ob.BankCommissionAmt = lcInfo.BankCommissionAmt;
                }


                if (lcInfo.SwiftCharge == null)
                {
                    ob.SwiftCharge = 0;
                }
                else
                {
                    ob.SwiftCharge = lcInfo.SwiftCharge;
                }


                if (lcInfo.TotalAmount == null)
                {
                    ob.TotalAmount = 0;
                }
                else
                {
                    ob.TotalAmount = lcInfo.TotalAmount;
                }


                if (lcInfo.GrandTotal == null)
                {
                    ob.GrandTotal = 0;
                }
                else
                {
                    ob.GrandTotal = lcInfo.GrandTotal;
                }
            }
            return(Json(ob, JsonRequestBehavior.AllowGet));
        }