public ActionResult CreateDetails(string id)
        {
            MainApplication model = new MainApplication();

            model.userCredentialList = _IUserCredentialService.GetUserCredentialsByEmail(UserEmail);
            model.modulelist         = _ModuleService.getAllModules();
            model.CompanyCode        = CompanyCode;
            model.CompanyName        = CompanyName;
            model.FinancialYear      = FinancialYear;

            int Id = Decode(id);

            model.OutwardToTailorDetails  = _OutwardToTailorService.GetDetailsById(Id);
            model.OutwardToTailorItemList = _OutwardToTailorItemService.GetRowsByCode(model.OutwardToTailorDetails.OutwardCode);

            string previousouttotailor = TempData["PreviousOutToTailor"].ToString();

            if (TempData["PreviousOutToTailor"].ToString() != model.OutwardToTailorDetails.OutwardCode)
            {
                ViewData["OutwardToTailorChanged"] = previousouttotailor + " is replaced with " + model.OutwardToTailorDetails.OutwardCode + " because " + previousouttotailor + " is acquired by another person";
            }
            TempData["PreviousOutToTailor"] = previousouttotailor;

            return(View(model));
        }
        //DISPLAY BILL ITEM DETAILS IN MAIN PAGE
        public ActionResult GetOutwardToTailorItemDetails(string OutwardNo)
        {
            MainApplication model = new MainApplication();

            model.OutwardToTailorDetails  = _OutwardToTailorService.GetDetailsByCode(OutwardNo);
            model.OutwardToTailorItemList = _OutwardToTailorItemService.GetRowsByCode(OutwardNo);
            return(View(model));
        }