コード例 #1
0
        public ActionResult UpdateInvoiceICByFileID(string FileInvoiceList, int fileID)
        {
            try
            {
                int FileId = fileID;
                List <InvoiceICDetail> objInvoiceICDetail = new List <InvoiceICDetail>();
                string[] arr = FileInvoiceList.Split(',');
                for (int i = 0; i < arr.Length - 1; i++)
                {
                    string          _ia          = arr[i];
                    string[]        arrFields    = _ia.Split('-');
                    InvoiceICDetail objInvoiceIC = new InvoiceICDetail
                    {
                        FileID       = Convert.ToInt32(arrFields[0]),
                        InvoiceID    = Convert.ToInt32(arrFields[1]),
                        InvoiceICAmt = Convert.ToDecimal(arrFields[2]),
                    };
                    objInvoiceICDetail.Add(objInvoiceIC);
                }
                var validate = _invoice.UpdateInvoiceICAmt(Mapper.Map <IEnumerable <LMGEDI.Core.Data.Model.InvoiceICDetail> >(objInvoiceICDetail));


                var getAllInvoices = _invoice.GetInvoiceICRecord(FileId);
                InvoiceICViewModel invoiceViewModel = new LMGEDIApp.Domain.Models.InvoiceModel.InvoiceICViewModel();
                invoiceViewModel.InvoiceICDetails = Mapper.Map <IEnumerable <InvoiceICDetail> >(getAllInvoices);
                return(Json(invoiceViewModel));
            }
            catch (Exception ex)
            {
                _arCommonService.CreateErrorLog(ex.Message, ex.StackTrace);
                return(View());
            }
        }
コード例 #2
0
ファイル: InvoiceRepository.cs プロジェクト: buyonlinemahi/AR
        public int UpdateInvoiceICAmtAccFileIdInvoiceID(InvoiceICDetail objInvoiceICDetail)
        {
            SqlParameter _FileID       = new SqlParameter("@FileId", objInvoiceICDetail.FileID);
            SqlParameter _InvoiceID    = new SqlParameter("@InvoiceID", objInvoiceICDetail.InvoiceID);
            SqlParameter _InvoiceICAmt = new SqlParameter("@InvoiceICAmt", objInvoiceICDetail.InvoiceICAmt);

            return(Context.Database.ExecuteSqlCommand(Constant.StoredProcedureConst.InvoiceRepositoryProcedure.UpdateICAmtAccFileIdInvID, _FileID, _InvoiceID, _InvoiceICAmt));
        }