예제 #1
0
        public ActionResult SearchWetBlueIssueNo(string search)
        {
            search = search.ToUpper();
            var data   = _dalWBIStoreSelectionObj.SearchMasterInfo();
            var result = (from temp in data
                          where ((temp.WBSelectionNo.ToUpper().StartsWith(search) || temp.WBSelectionNo.ToUpper() == search))
                          select new
            {
                IssueID = temp.IssueID,
                WBSIssueItemID = temp.WBSIssueItemID,
                SelectionNo = temp.WBSelectionNo,
                SelectionDate = temp.SelectionDate,
                SelectedBy = repository.SysUserRepository.Get(filter: ob => ob.UserID == temp.SelectedBy).FirstOrDefault().FirstName,
                IssueNo = temp.IssueNo,
                IssueDate = temp.IssueDate,
                IssueCategory = "After Production",
                //StoreID = temp.StoreID,
                //StoreName = temp.StoreName,
                //RecordStatus = temp.RecordStatus,
                IssueFrom = temp.IssueFrom,
                IssueTo = temp.IssueTo,
                IssueFromName = repository.StoreRepository.Get(filter: ob => ob.StoreID == temp.IssueFrom).FirstOrDefault().StoreName,
                IssueToName = repository.StoreRepository.Get(filter: ob => ob.StoreID == temp.IssueTo).FirstOrDefault().StoreName,
                RecordStatus = DalCommon.ReturnRecordStatus(temp.RecordStatus),
            }).ToList();


            return(Json(result, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public ActionResult SearchLcmCnFBillInfoByLCNo(string search)//InsuranceNo
        {
            var lcInfo = (from temp in repository.ExpCnfBill.Get().Where(ob => ob.CnfBillNo.StartsWith(search) || ob.CnfBillNo == search)
                          join temp2 in repository.ExpCommercialInvoiceRepository.Get() on temp.CIID equals temp2.CIID
                          join temp3 in repository.ExpPackingListRepository.Get() on temp.PLID equals temp3.PLID
                          join temp4 in repository.SysBuyerRepository.Get() on temp.CnfAgentID equals temp4.BuyerID
                          join temp5 in repository.EXPCommercialInvoicePIRepository.Get() on temp2.CIID equals temp5.CIID
                          join temp6 in repository.ExpLCOpening.Get() on temp5.LCID equals temp6.LCID
                          select new
            {
                CnfBillID = temp.CnfBillID,
                CnfBillNo = temp.CnfBillNo,
                CnfAgentID = temp.CnfAgentID == null ? 0 : temp.CnfAgentID,
                LCID = temp6.LCID == null ? 0 : temp6.LCID,
                LCNo = temp6.LCNo,
                CIID = temp2.CIID == null ? 0 : temp2.CIID,
                CINo = temp2.CINo,
                PLID = temp3.PLID == null ? 0 : temp3.PLID,
                PLNo = temp3.PLNo,
                BuyerCode = temp4.BuyerCode,
                BuyerName = temp4.BuyerName,
                RecordStatus = DalCommon.ReturnRecordStatus(temp.RecordStatus),
            }).OrderByDescending(ob => ob.CnfBillID);

            return(Json(lcInfo, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        // ##################### Search Start ##############


        public ActionResult GetLcmRetirementInfo()
        {
            var listLcmRetirementInfo = (from temp in objRepository.LcmRetirementRpository.Get().AsEnumerable()
                                         join temp2 in objRepository.LCOpeningRepository.Get() on temp.LCID equals temp2.LCID
                                         join temp3 in objRepository.PRQ_ChemicalPIRepository.Get() on temp2.PIID equals temp3.PIID
                                         join temp4 in objRepository.SysSupplierRepository.Get() on temp3.SupplierID equals temp4.SupplierID

                                         select new
            {
                LCRetirementID = temp.LCRetirementID,
                LCRetirementNo = temp.LCRetirementNo,
                LCRetirementDate = temp.LCRetirementDate == null ? " " : Convert.ToDateTime(temp.LCRetirementDate).ToString("dd/MM/yyyy"),                      //temp.LCRetirementDate,
                LCID = temp.LCID,
                LCNo = temp.LCNo,
                LCDate = temp2.LCDate == null ? " " : Convert.ToDateTime(temp2.LCDate).ToString("dd/MM/yyyy"),
                SupplierID = temp4.SupplierName,
                SupplierName = temp4.SupplierName,
                BillValue = temp.BillValue,
                LessMargin = temp.LessMargin,
                ExchangeCurrency = temp.ExchangeCurrency,
                LCRCurrency = temp.LCRCurrency,
                RecordStatus = DalCommon.ReturnRecordStatus(temp.RecordStatus),  //temp.RecordStatus,
            }).OrderByDescending(ob => ob.LCRetirementID);                       //obLCOpeningDAL.GetLCOpeningInfo();

            return(Json(listLcmRetirementInfo, JsonRequestBehavior.AllowGet));
        }
        public ActionResult GetBillOfLadingListA()
        {
            var pl = _unit.ExpBillOfLadingRepository.Get().Select(ob => new
            {
                ob.BLID,
                ob.BLNo,
                ob.RefBLNo,
                ob.Shipper,
                ShipperCode = ob.Shipper == null ? "" : _unit.SysBuyerRepository.GetByID(ob.Shipper).BuyerCode,
                ShipperName = ob.Shipper == null ? "" : _unit.SysBuyerRepository.GetByID(ob.Shipper).BuyerName,
                BLDate      = string.Format("{0:dd/MM/yyyy}", ob.BLDate),
                ob.CIID,
                CINo    = ob.CIID == null ? "" : _unit.ExpCommercialInvoiceRepository.GetByID(ob.CIID).CINo,
                CIRefNo = ob.CIID == null ? "" : _unit.ExpCommercialInvoiceRepository.GetByID(ob.CIID).CIRefNo,
                CIDate  = ob.CIID == null ? "" : string.Format("{0:dd/MM/yyyy}",
                                                               _unit.ExpCommercialInvoiceRepository.GetByID(ob.CIID).CIDate),
                OrdDeliveryMode = ob.CIID == null ? "" : DalCommon.ReturnOrderDeliveryMode(
                    _unit.ExpCommercialInvoiceRepository.GetByID(ob.CIID).OrdDeliveryMode),
                ShipmentFrom = ob.CIID == null ? "" : _unit.ExpCommercialInvoiceRepository.GetByID(ob.CIID).ShipmentFrom,
                ShipmentTo   = ob.CIID == null ? "" : _unit.ExpCommercialInvoiceRepository.GetByID(ob.CIID).ShipmentTo,
                RecordStatus = ob.CIID == null ? "" : DalCommon.ReturnRecordStatus(_unit.ExpBillOfLadingRepository.GetByID(ob.BLID).RecordStatus)
            }).ToList();

            return(Json(pl.OrderByDescending(ob => ob.BLID), JsonRequestBehavior.AllowGet));
        }
예제 #5
0
        public ActionResult SearchLCInfoByLCNo(string search)//InsuranceNo
        {
            var lcInfo = (from temp in repository.ExpLCOpening.Get().Where(ob => ob.LCNo.StartsWith(search) || ob.LCNo == search).AsEnumerable()
                          join temp2 in repository.BankRepository.Get() on temp.LCOpeningBank equals temp2.BankID
                          join temp3 in repository.BranchRepository.Get() on temp.AdvisingBank equals temp3.BranchID
                          join temp4 in repository.ExpLeatherPI.Get() on temp.PIID equals temp4.PIID


                          select new
            {
                LCID = temp.LCID,
                LCNo = temp.LCNo,
                PIID = temp.PIID,
                PINo = temp4.PINo,
                LCDate = Convert.ToDateTime(temp.LCDate).ToString("dd/MM/yyyy"),
                LCAmount = temp.LCAmount,
                LCOpeningBank = temp.LCOpeningBank,
                BankID = temp2.BankID,
                BankCode = temp2.BankCode,
                BankName = temp2.BankName,
                //AdvisingBankName = temp3.BranchName,
                BranchID = temp3.BranchID,
                BanchCode = temp3.BanchCode,
                BranchName = temp3.BranchName,
                AdvisingBankName = temp3.BranchName,
                RecordStatus = DalCommon.ReturnRecordStatus(temp.RecordStatus),
            }).OrderByDescending(ob => ob.LCID);

            return(Json(lcInfo, JsonRequestBehavior.AllowGet));
        }
예제 #6
0
        public ActionResult SearchLcmLimInfoByLCNo(string search)//InsuranceNo
        {
            var lcInfo = (from temp in objRepository.LimInfoRepository.Get().Where(ob => ob.LCNo.StartsWith(search) || ob.LCNo == search).AsEnumerable()
                          join temp2 in objRepository.BankRepository.Get() on temp.LimBankID equals temp2.BankID
                          join temp3 in objRepository.BranchRepository.Get() on temp.LimBranchID equals temp3.BranchID
                          select new
            {
                LimBankID = temp.LimBankID,
                LimBranchID = temp.LimBranchID,
                LimID = temp.LimID,
                LimNo = temp.LimNo,
                LCID = temp.LCID,
                LCNo = temp.LCNo,
                LimLimit = temp.LimLimit,
                LimBalance = temp.LimBalance,
                BranchID = temp3.BranchID,              //temp.LCNo,
                BankID = temp2.BankID,
                BankCode = temp2.BankCode,
                BankName = temp2.BankName,
                BanchCode = temp3.BanchCode,
                BranchName = temp3.BranchName,
                RecordStatus = DalCommon.ReturnRecordStatus(temp.RecordStatus)
            }).OrderByDescending(ob => ob.LimID);

            return(Json(lcInfo, JsonRequestBehavior.AllowGet));
        }
예제 #7
0
        // ##################### Search Start ##############
        public ActionResult GetLcmLimInfo()
        {
            var listLcmLimInfo = (from temp in objRepository.LimInfoRepository.Get().AsEnumerable()
                                  join temp2 in objRepository.BankRepository.Get() on temp.LimBankID equals temp2.BankID
                                  join temp3 in objRepository.BranchRepository.Get() on temp.LimBranchID equals temp3.BranchID
                                  select new
            {
                LimID = temp.LimID,
                LCNo = temp.LCNo,
                LimNo = temp.LimNo,
                BankID = temp2.BankID,
                BranchID = temp3.BranchID,                      //temp.LCNo,
                BankCode = temp2.BankCode,
                BankName = temp2.BankName,
                BanchCode = temp3.BanchCode,
                BranchName = temp3.BranchName,
                LimBankID = temp.LimBankID,
                LimLimit = temp.LimLimit,
                LimBalance = temp.LimBalance,
                LimBranchID = temp.LimBranchID,
                LCID = temp.LCID,
                RecordStatus = DalCommon.ReturnRecordStatus(temp.RecordStatus),
            }).OrderByDescending(ob => ob.LimID);                       //obLCOpeningDAL.GetLCOpeningInfo();

            return(Json(listLcmLimInfo, JsonRequestBehavior.AllowGet));
        }
예제 #8
0
        public ActionResult SearchLcmCnFBillInfoByLCNo(string search)//InsuranceNo
        {
            var lcInfo = (from temp in objRepository.ExpBankLoanRepository.Get().Where(ob => ob.RunningStatus == "RNG").AsEnumerable()
                          join temp2 in objRepository.BankRepository.Get() on temp.BankID equals temp2.BankID
                          join temp3 in objRepository.BranchRepository.Get() on temp.BranchID equals temp3.BranchID
                          join temp4 in objRepository.SysTransHeadRepository.Get() on temp.LoanHead equals temp4.HeadID

                          select new
            {
                BankLoanID = temp.BankLoanID == null ? 0 : temp.BankLoanID,
                BankLoanNo = temp.BankLoanNo == null ? "" : temp.BankLoanNo,
                LoanHead = temp.LoanHead == null ? 0 : temp.LoanHead,
                HeadID = temp4.HeadID == null ? 0 : temp4.HeadID,
                HeadName = temp4.HeadName == null ? "" : temp4.HeadName,
                BankID = temp.BankID == null ? 0 : temp.BankID,
                BankCode = temp2.BankCode == null ? "" : temp2.BankCode,
                BankName = temp2.BankName == null ? "" : temp2.BankName,
                BranchID = temp.BranchID == null ? 0 : temp.BranchID,
                BanchCode = temp3.BanchCode == null ? "" : temp3.BanchCode,
                BranchName = temp3.BranchName == null ? "" : temp3.BranchName,
                LoanAmt = temp.LoanAmt == null ? 0 : temp.LoanAmt,
                RunningStatus = temp.RunningStatus == null ? "" : temp.RunningStatus,
                ApprovalNote = temp.ApprovalNote == null ? "" : temp.ApprovalNote,
                RecordStatus = DalCommon.ReturnRecordStatus(temp.RecordStatus),
            }).OrderByDescending(ob => ob.BankLoanID);

            return(Json(lcInfo, JsonRequestBehavior.AllowGet));
        }
        // ##################### Save & Update End ##############

        // ##################### Search Start ##############
        public ActionResult GetInsuranceInfo()
        {
            var listLcmLimInfo = (from temp in objRepository.EXPDeliveryChallanRepository.Get().AsEnumerable()
                                  //join temp2 in objRepository.EXPDeliveryChallanCIRepository.Get() on temp.DeliverChallanID equals temp2.DeliverChallanID
                                  //join temp3 in objRepository.ExpCommercialInvoiceRepository.Get() on temp2.CIID equals temp3.CIID
                                  //join temp4 in objRepository.ExpPackingListRepository.Get() on temp2.PLID equals temp4.PLID
                                  select new
            {
                DeliverChallanID = temp.DeliverChallanID,
                DeliverChallanNo = temp.DeliverChallanNo,
                DeliverChallanDate = Convert.ToDateTime(temp.DeliverChallanDate).ToString("dd/MM/yyyy"),                      //temp.DeliverChallanDate,
                TruckNo = temp.TruckNo,
                DeliveryChallanNote = temp.DeliveryChallanNote,

                //CIID = temp2.CIID,
                //CINo = temp3.CINo,
                //CIAmount = temp3.CIAmount,
                //CIDate = Convert.ToDateTime(temp3.CIDate).ToString("dd/MM/yyyy"),
                //PLID = temp2.PLID,
                //PLNo = temp4.PLNo,
                //PLDate = Convert.ToDateTime(temp4.PLDate).ToString("dd/MM/yyyy"),
                RecordStatus = DalCommon.ReturnRecordStatus(temp.RecordStatus),
            }).OrderByDescending(ob => ob.DeliverChallanID);                       //obLCOpeningDAL.GetLCOpeningInfo();

            return(Json(listLcmLimInfo, JsonRequestBehavior.AllowGet));
        }
예제 #10
0
        public ActionResult GetIssue()
        {
            var issues = _unit.CrustLeatherIssue.Get().Select(issue => new
            {
                issue.CrustLeatherIssueID,
                issue.CrustLeatherIssueNo,
                CrustLeatherIssueDate = string.Format("{0:dd/MM/yyyy}", issue.CrustLeatherIssueDate),
                RecordStatus          = DalCommon.ReturnRecordStatus(issue.RecordStatus)
            }).ToList();

            return(Json(issues.OrderBy(ob => ob.CrustLeatherIssueDate), JsonRequestBehavior.AllowGet));
        }
예제 #11
0
        public ActionResult GetComInv()
        {
            var comInvs = _unit.CommercialInvoiceRepository.Get().Select(comInv => new
            {
                comInv.CIID, comInv.CINo, comInv.LCID, comInv.LCNo,
                CIDate = string.Format("{0:dd/MM/yyyy}", comInv.CIDate),
                _unit.LCOpeningRepository.GetByID(comInv.LCID).PINo,
                RecordStatus = DalCommon.ReturnRecordStatus(comInv.RecordStatus)
            }).ToList();

            return(Json(comInvs.OrderByDescending(ob => ob.CIID), JsonRequestBehavior.AllowGet));
        }
예제 #12
0
        public ActionResult GetExpCIList()
        {
            var data = from t in _repository.ExpCommercialInvoiceRepository.Get()
                       select new
            {
                CIID         = t.CIID,
                CINo         = t.CINo,
                CIDate       = Convert.ToDateTime(t.CIDate).ToString("dd/MM/yyyy"),
                RecordStatus = DalCommon.ReturnRecordStatus(t.RecordStatus)
            };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
예제 #13
0
        public ActionResult GetExportCnfBillList()
        {
            var data = from t in _repository.ExpCnfBill.Get()
                       select new
            {
                CnfBillID    = t.CnfBillID,
                CnfBillNo    = t.CnfBillNo,
                CnfBillDate  = Convert.ToDateTime(t.CnfBillDate).ToString("dd/MM/yyyy"),
                RecordStatus = DalCommon.ReturnRecordStatus(t.RecordStatus)
            };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
예제 #14
0
        public ActionResult GetBuyerOrder(int buyerId)
        {
            var orders = _unit.SlsBuyerOrederRepository.Get().Where(ob => ob.BuyerID == buyerId).ToList();
            var result = orders.Select(order => new
            {
                order.BuyerOrderID,
                order.BuyerOrderNo,
                BuyerOrderDate = string.Format("{0:dd/MM/yyyy}", order.BuyerOrderDate),
                RecordStatus   = DalCommon.ReturnRecordStatus(order.RecordStatus)
            }).ToList();

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
예제 #15
0
        public ActionResult GetExportLCRetirementList()
        {
            var data = from t in _repository.EXPLCRetirementRepository.Get()
                       select new
            {
                LCRetirementID   = t.LCRetirementID,
                LCRetirementNo   = t.LCRetirementNo,
                LCRetirementDate = Convert.ToDateTime(t.LCRetirementDate).ToString("dd/MM/yyyy"),
                RecordStatus     = DalCommon.ReturnRecordStatus(t.RecordStatus)
            };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
예제 #16
0
        public ActionResult GetExportDeliveryChallanList()
        {
            var data = from t in _repository.EXPDeliveryChallanRepository.Get()
                       select new
            {
                DeliverChallanID   = t.DeliverChallanID,
                DeliverChallanNo   = t.DeliverChallanNo,
                DeliverChallanDate = Convert.ToDateTime(t.DeliverChallanDate).ToString("dd/MM/yyyy"),
                RecordStatus       = DalCommon.ReturnRecordStatus(t.RecordStatus)
            };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public ActionResult GetTransChln()
        {
            var transChlns = _context.EXP_TransportChallan.ToList();
            var result     = transChlns.Select(chln => new
            {
                chln.TransportChallanID,
                chln.TransportChallanNo,
                chln.TransportChallanRef,
                TransportChallanDate = string.Format("{0:dd/MM/yyyy}", chln.TransportChallanDate),
                RecordStatus         = DalCommon.ReturnRecordStatus(chln.RecordStatus)
            }).ToList();

            return(Json(result.OrderByDescending(ob => ob.TransportChallanID), JsonRequestBehavior.AllowGet));
        }
        public ActionResult GetDlvryChln()
        {
            var dlvryChlns = _unit.EXPDeliveryChallanRepository.Get().ToList();
            var result     = dlvryChlns.Select(chln => new
            {
                chln.DeliverChallanID,
                chln.DeliverChallanNo,
                chln.DeliverChallanRef,
                DeliverChallanDate = string.Format("{0:dd/MM/yyyy}", chln.DeliverChallanDate),
                RecordStatus       = DalCommon.ReturnRecordStatus(chln.RecordStatus)
            }).ToList();

            return(Json(result.OrderByDescending(ob => ob.DeliverChallanID), JsonRequestBehavior.AllowGet));
        }
예제 #19
0
        public ActionResult BuyerOrder(long buyerId)
        {
            var orders = _unit.SlsBuyerOrederRepository.Get().Where(ob => ob.BuyerID == buyerId)
                         .Select(order => new
            {
                order.BuyerOrderID,
                order.BuyerOrderNo,
                BuyerOrderDate = string.Format("{0:dd-mm-yyyy}", order.BuyerOrderDate),
                order.BuyerOrderStatus,
                BuyerName    = order.BuyerID == null ? "" : _unit.SysBuyerRepository.GetByID(order.BuyerID).BuyerName,
                RecordStatus = DalCommon.ReturnRecordStatus(order.RecordStatus)
            }).ToList();

            return(Json(orders.OrderByDescending(ob => ob.BuyerOrderID), JsonRequestBehavior.AllowGet));
        }
예제 #20
0
        public ActionResult GetComInv()
        {
            var comInv = _unit.ExpCommercialInvoiceRepository.Get().ToList();
            var result = comInv.Select(inv => new
            {
                inv.CIID,
                inv.CINo,
                inv.CIRefNo,
                CIDate          = string.Format("{0:dd/MM/yyyy}", inv.CIDate),
                OrdDeliveryMode = DalCommon.ReturnOrderDeliveryMode(inv.OrdDeliveryMode),
                RecordStatus    = DalCommon.ReturnRecordStatus(inv.RecordStatus)
            });

            return(Json(result.OrderByDescending(ob => ob.CIID), JsonRequestBehavior.AllowGet));
        }
예제 #21
0
        public ActionResult GetBillOfLadingMin()
        {
            var blEntityMin = _unit.BillOfLadingRepository.Get().ToList();
            var blModelMin  = blEntityMin.Select(item => new BillOfLadingMin
            {
                Blid         = item.BLID, BlNo = item.BLNo, BlDate = string.Format("{0:dd/MM/yyyy}", item.BLDate), LcNo = item.LCNo,
                LcDate       = string.Format("{0:dd/MM/yyyy}", _unit.LCOpeningRepository.GetByID(item.LCID).LCDate),
                SupplierName = _unit.SysSupplierRepository.GetByID(_unit.PRQ_ChemicalPIRepository.GetByID(_unit.LCOpeningRepository.GetByID(item.LCID).PIID).SupplierID).SupplierName,
                PiNo         = _unit.LCOpeningRepository.GetByID(item.LCID).PINo,
                CiNo         = item.CIID == null ? "" : _unit.CommercialInvoiceRepository.GetByID(item.CIID).CINo,
                RecordStatus = DalCommon.ReturnRecordStatus(item.RecordStatus)
            }).ToList();

            return(Json(blModelMin.OrderByDescending(ob => ob.Blid), JsonRequestBehavior.AllowGet));
        }
        public ActionResult GetLcBasicInfo()
        {
            var lcBasic = _unit.LCOpeningRepository.Get().Where(ob => /*ob.RecordStatus == "CNF" &&*/ ob.LCStatus == "RNG")
                          .ToList();

            var lstLcBasicsInfo = lcBasic.Select(item => new LcBasics
            {
                LCID         = item.LCID,
                LCNo         = item.LCNo,
                RecordStatus = DalCommon.ReturnRecordStatus(item.RecordStatus),
                LCDate       = item.LCDate.ToString("dd-MMM-yyyy")
            }).ToList();

            return(Json(lstLcBasicsInfo.OrderByDescending(ob => ob.LCID), JsonRequestBehavior.AllowGet));
        }
예제 #23
0
        public ActionResult GetExpFormList()
        {
            var expFrms = _unit.ExportFormRepository.Get().ToList();
            var result  = expFrms.Select(expFrm => new
            {
                expFrm.ExportFormID,
                expFrm.ExportFormNo,
                ExportFormDate4 = string.Format("{0:dd/MM/yyyy}", expFrm.ExportFormDate4),
                DealerName      = expFrm.DealerID == null ? "" : _unit.BranchRepository.GetByID(expFrm.DealerID).BranchName,
                CINo            = expFrm.CIID == null ? "" : _unit.ExpCommercialInvoiceRepository.GetByID(expFrm.CIID).CINo,
                PLNo            = expFrm.PLID == null ? "" : _unit.ExpPackingListRepository.GetByID(expFrm.PLID).PLNo,
                RecordStatus    = DalCommon.ReturnRecordStatus(expFrm.RecordStatus)
            }).ToList();

            return(Json(result.OrderByDescending(ob => ob.ExportFormID), JsonRequestBehavior.AllowGet));
        }
        public ActionResult GetBillForSearch(string billNo)
        {
            var bills  = _context.Prq_SupplierBill.Where(m => m.IsDelete == false && m.SupplierBillNo.StartsWith(billNo)).ToList();
            var result = bills.Select(bill => new
            {
                bill.SupplierBillID,
                bill.SupplierBillNo,
                bill.SupplierID,
                _unit.SysSupplierRepository.GetByID(bill.SupplierID).SupplierName,
                BillDate = string.Format("{0:dd/mm/yyyy}", bill.BillDate),
                bill.PurchaseYear,
                RecordStatus = DalCommon.ReturnRecordStatus(bill.RecordStatus)
            }).ToList();

            return(Json(result.OrderBy(ob => ob.SupplierName), JsonRequestBehavior.AllowGet));
        }
예제 #25
0
        public ActionResult GetPackingListB(long ciid)
        {
            var pl = _unit.ExpPackingListRepository.Get().Where(ob => ob.CIID == ciid).Select(ob => new
            {
                ob.PLID,
                ob.PLNo,
                ob.CIID,
                CINo         = ob.CIID == null ? "" : _unit.ExpCommercialInvoiceRepository.GetByID(ob.CIID).CINo,
                CIRefNo      = ob.CIID == null ? "" : _unit.ExpCommercialInvoiceRepository.GetByID(ob.CIID).CIRefNo,
                CIDate       = ob.CIID == null ? "" : string.Format("{0:dd/MM/yyyy}", _unit.ExpCommercialInvoiceRepository.GetByID(ob.CIID).CIDate),
                PLDate       = string.Format("{0:dd/MM/yyyy}", ob.PLDate),
                RecordStatus = DalCommon.ReturnRecordStatus(ob.RecordStatus)
            }).ToList();

            return(Json(pl.OrderByDescending(ob => ob.PLID), JsonRequestBehavior.AllowGet));
        }
예제 #26
0
        public ActionResult SearchLcmInsuranceByInsuranceNo(string search)
        {
            var lcInfo = from temp in repo.LcmInsuranceRpository.Get().Where(ob => (ob.InsuranceNo.StartsWith(search) || ob.InsuranceNo == search))
                         select new {
                InsuranceID     = temp.InsuranceID,
                InsuranceNo     = temp.InsuranceNo,
                LCNo            = temp.LCNo,
                CoverNoteDate   = temp.CoverNoteDate,
                CIID            = Convert.ToInt32(temp.CIID),
                CINo            = temp.CINo,
                TotalPaidAmount = (temp.PaidAmount + temp.StampDutyAmount),
                RecordStatus    = DalCommon.ReturnRecordStatus(temp.RecordStatus)
            };

            return(Json(lcInfo, JsonRequestBehavior.AllowGet));
        }
        public ActionResult GetBillPay()
        {
            var bills  = _unit.ChemicalLocalPurchaseBillPaymentRepository.Get().ToList();
            var result = bills.Select(bill => new LocalPurchaseBillPayMin
            {
                PaymentID    = bill.PaymentID,
                PaymentNo    = bill.PaymentNo,
                PaymentDate  = string.Format("{0:dd/MM/yyyy}", bill.PaymentDate),
                SupplierID   = bill.SupplierID,
                SupplierCode = bill.SupplierID == 0 ? "": _unit.SysSupplierRepository.GetByID(bill.SupplierID).SupplierCode,
                SupplierName = bill.SupplierID == 0 ? "": _unit.SysSupplierRepository.GetByID(bill.SupplierID).SupplierName,
                RecordStatus = DalCommon.ReturnRecordStatus(bill.RecordStatus)
            });

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
예제 #28
0
        public ActionResult GetBills()
        {
            var bills = _unit.ChemicalLocalPurchaseBillRepository.Get()
                        .Select(bill => new LocalPurchaseBillMin
            {
                BillID       = bill.BillID,
                BillNo       = bill.BillNo,
                BillDate     = string.Format("{0:dd/MM/yyyy}", bill.BillDate),
                SupplierName = bill.SupplierID == null ?
                               "" : _unit.SysSupplierRepository.GetByID(bill.SupplierID).SupplierName,
                SupplierBillNo = bill.SupplierBillNo,
                RecordStatus   = DalCommon.ReturnRecordStatus(bill.RecordStatus)
            }).ToList();

            return(Json(bills.OrderByDescending(ob => ob.BillID), JsonRequestBehavior.AllowGet));
        }
예제 #29
0
        // ##################### Search Start ##############
        public ActionResult GetLcmRetirementInfo()
        {
            var listLcmRetirementInfo = from temp in objRepository.EXPLCRetirementRepository.Get()
                                        select new
            {
                LCID             = temp.LCID,
                LCNo             = temp.LCNo,
                LCRetirementID   = temp.LCRetirementID,
                LCRetirementNo   = temp.LCRetirementNo,
                LCRetirementDate = string.Format("{0:dd/MM/yyyy}", temp.LCRetirementDate),                                  //temp.LCRetirementDate,
                BillValue        = temp.BillValue,
                RecordStatus     = DalCommon.ReturnRecordStatus(temp.RecordStatus),
            };                                     //obLCOpeningDAL.GetLCOpeningInfo();

            return(Json(listLcmRetirementInfo, JsonRequestBehavior.AllowGet));
        }
예제 #30
0
        public ActionResult GetOrderForSearch(string orderNo)
        {
            var bills  = _context.SLS_BuyerOrder.Where(m => m.OrderNo.StartsWith(orderNo)).ToList();
            var result = bills.Select(order => new
            {
                order.BuyerOrderID,
                order.BuyerOrderNo,
                order.OrderNo,
                BuyerOrderDate = string.Format("{0:dd/MM/yyyy}", order.BuyerOrderDate),
                order.BuyerID,
                BuyerName    = order.BuyerID == null ? "" : _unit.SysBuyerRepository.GetByID(order.BuyerID).BuyerName,
                RecordStatus = DalCommon.ReturnRecordStatus(order.RecordStatus)
            }).ToList();

            return(Json(result.OrderByDescending(ob => ob.BuyerOrderID), JsonRequestBehavior.AllowGet));
        }