Esempio n. 1
0
        public ActionResult NewOrder()
        {
            if (!MusicStore.Models.Module.User.IsAuthenticated) return RedirectToAction("Login", "Account");
            if (MusicStore.Models.Module.User.GetCurrentRole() != MusicStore.Models.Module.User.Klient) return RedirectToAction("Index", "Home");
            Dokument dok = new Dokument();
            dok.StanDokumentu = StanDokumentu.Bufor;
            dok.State = RowState.Added;

            return View(dok);
        }
        private void Display(string mode)
        {
            SPList list = web.GetList(Util.CreateSharePointListStrUrl(web.Url, "PermintaanDokumen"));  //web.Lists[ListId];
            SPListItem item = list.GetItemById(IDP);

            ltrRequestor.Text = item["Created By"].ToString().Split(new string[] { ";#" }, StringSplitOptions.RemoveEmptyEntries)[1];

            if (item["Status"] != null)
                ViewState["Status"] = item["Status"].ToString();
            else
            {
                if (item["ApprovalStatus"] != null)
                    ViewState["Status"] = item["ApprovalStatus"].ToString();
            }

            if (item.Workflows.Count > 0 || ViewState["Status"].ToString() == "Approved")
                btnSaveUpdateRunWf.Visible = false;

            if (mode == "edit")
            {
                btnSaveUpdate.Text = "Update";
                btnSaveUpdateRunWf.Text = "Update & Run Workflow";
            }
            else if (mode == "display")
            {
                btnSaveUpdate.Visible = false;
                btnSaveUpdateRunWf.Visible = false;
            }

            ltrRequestCode.Text = item["Title"].ToString();
            ltrDate.Text = Convert.ToDateTime(item["Tanggal"].ToString()).ToString("dd-MMM-yyyy HH:mm");
            SPFieldUserValue userVal = new SPFieldUserValue(web, item["NamaPeminjam"].ToString().Split(new string[] { ";#" }, StringSplitOptions.RemoveEmptyEntries)[0]);
            peNamaPeminjam.CommaSeparatedAccounts = userVal.User.LoginName;
            peNamaPeminjam.Validate();
            ltrDivisiPeminjam.Text = item["DivisiPeminjam"] == null ? string.Empty : item["DivisiPeminjam"].ToString();
            txtKeterangan.Text = item["Keterangan"] == null ? string.Empty : item["Keterangan"].ToString();

            ltrNamaPeminjam.Text = userVal.User.Name;
            ltrKeterangan.Text = txtKeterangan.Text;

            SPList document = web.GetList(Util.CreateSharePointListStrUrl(web.Url, "PermintaanDokumenDokumen"));
            SPQuery query = new SPQuery();
            query.Query = "<Where>" +
                              "<Eq>" +
                                 "<FieldRef Name='PermintaanDokumen' LookupId='True' />" +
                                 "<Value Type='Lookup'>" + IDP + "</Value>" +
                              "</Eq>" +
                          "</Where>" +
                          "<OrderBy>" +
                            "<FieldRef Name='Created' Ascending='False' />" +
                          "</OrderBy>";
            SPListItemCollection coll = document.GetItems(query);

            List<Dokument> collDokument = new List<Dokument>();
            foreach (SPListItem i in coll)
            {
                Dokument o = new Dokument();
                o.ID = i.ID;
                o.IDTipeDokumen = Convert.ToInt32(i["TipeDokumen"].ToString().Split(new string[] { ";#" }, StringSplitOptions.RemoveEmptyEntries)[0]);
                o.NamaDokumen = i.Title;
                o.SoftcopyOriginal = i["SoftcopyOriginal"].ToString();
                o.TanggalDibutuhkan = Convert.ToDateTime(i["TanggalDibutuhkan"]);
                if (i["TanggalEstimasiPengembalian"] != null)
                    o.TanggalEstimasiPengembalian = Convert.ToDateTime(i["TanggalEstimasiPengembalian"]);
                if (i["TanggalPengembalian"] != null)
                    o.TanggaPengembalian = Convert.ToDateTime(i["TanggalPengembalian"]);
                if (i["StatusTidakDiKembalikan"] != null)
                    o.StatusTidakDikembalikan = Convert.ToBoolean(i["StatusTidakDiKembalikan"]);
                o.TipeDokumen = i["TipeDokumen"].ToString().Split(new string[] { ";#" }, StringSplitOptions.RemoveEmptyEntries)[1];
                o.TujuanPeminjaman = i["TujuanPeminjaman"].ToString();
                if (i["FileUrl"] != null)
                    o.FileUrl = i["FileUrl"].ToString().Split(',')[0];
                collDokument.Add(o);
            }
            ViewState["Dokument"] = collDokument;
            ViewState["DokumentEdit"] = collDokument;
            BindDokumen();

            HiddenControls(mode, ViewState["Status"].ToString());
        }
        protected void dgDokumen_ItemCommand(object source, DataGridCommandEventArgs e)
        {
            List<Dokument> coll = new List<Dokument>();
            if (ViewState["Dokument"] != null)
                coll = ViewState["Dokument"] as List<Dokument>;

            if (e.CommandName == "add")
            {
                HyperLink hypDocumentUrlAdd = e.Item.FindControl("hypDocumentUrlAdd") as HyperLink;
                DropDownList ddlTipeDokumenAdd = e.Item.FindControl("ddlTipeDokumenAdd") as DropDownList;
                DropDownList ddlSoftcopyOriginalAdd = e.Item.FindControl("ddlSoftcopyOriginalAdd") as DropDownList;
                TextBox txtTujuanPeminjamanAdd = e.Item.FindControl("txtTujuanPeminjamanAdd") as TextBox;
                DateTimeControl dtTanggaldibutuhkanAdd = e.Item.FindControl("dtTanggaldibutuhkanAdd") as DateTimeControl;
                Label lblNamaFileAdd = e.Item.FindControl("lblNamaFileAdd") as Label;

                string msg = DokumentValidation(lblNamaFileAdd, ddlTipeDokumenAdd, ddlSoftcopyOriginalAdd, txtTujuanPeminjamanAdd, dtTanggaldibutuhkanAdd);
                if (msg != string.Empty)
                {
                    Util.ShowMessage(Page, msg);
                    return;
                }

                if (isExistInGrid(lblNamaFileAdd.Text, ddlTipeDokumenAdd.SelectedItem.Text, ddlSoftcopyOriginalAdd.SelectedValue))
                {
                    Util.ShowMessage(Page, SR.DataIsExist(lblNamaFileAdd.Text.Trim()));
                    return;
                }

                Dokument o = new Dokument();
                o.NamaDokumen = lblNamaFileAdd.Text.Trim();
                o.IDTipeDokumen = Convert.ToInt32(ddlTipeDokumenAdd.SelectedValue);
                o.TipeDokumen = ddlTipeDokumenAdd.SelectedItem.Text;
                o.SoftcopyOriginal = ddlSoftcopyOriginalAdd.SelectedValue;
                o.TujuanPeminjaman = txtTujuanPeminjamanAdd.Text.Trim();
                o.TanggalDibutuhkan = dtTanggaldibutuhkanAdd.SelectedDate;
                o.FileUrl = hypDocumentUrlAdd.NavigateUrl;

                o.ID = 0;
                coll.Add(o);

                ViewState["Dokument"] = coll;
            }
            if (e.CommandName == "save")
            {
                HyperLink hypDocumentUrlEdit = e.Item.FindControl("hypDocumentUrlEdit") as HyperLink;
                DropDownList ddlTipeDokumenEdit = e.Item.FindControl("ddlTipeDokumenEdit") as DropDownList;
                DropDownList ddlSoftcopyOriginalEdit = e.Item.FindControl("ddlSoftcopyOriginalEdit") as DropDownList;
                TextBox txtTujuanPeminjamanEdit = e.Item.FindControl("txtTujuanPeminjamanEdit") as TextBox;
                DateTimeControl dtTanggaldibutuhkanEdit = e.Item.FindControl("dtTanggaldibutuhkanEdit") as DateTimeControl;
                Label lblNamaFileEdit = e.Item.FindControl("lblNamaFileEdit") as Label;

                string msg = DokumentValidation(lblNamaFileEdit, ddlTipeDokumenEdit, ddlSoftcopyOriginalEdit, txtTujuanPeminjamanEdit, dtTanggaldibutuhkanEdit);
                if (msg != string.Empty)
                {
                    Util.ShowMessage(Page, msg);
                    return;
                }

                if (isExistInGrid(lblNamaFileEdit.Text, ddlTipeDokumenEdit.SelectedItem.Text, ddlSoftcopyOriginalEdit.SelectedValue))
                {
                    Util.ShowMessage(Page, SR.DataIsExist(lblNamaFileEdit.Text.Trim()));
                    return;
                }

                Dokument o = new Dokument();
                o.NamaDokumen = lblNamaFileEdit.Text.Trim();
                o.IDTipeDokumen = Convert.ToInt32(ddlTipeDokumenEdit.SelectedValue);
                o.TipeDokumen = ddlTipeDokumenEdit.SelectedItem.Text;
                o.SoftcopyOriginal = ddlSoftcopyOriginalEdit.SelectedValue;
                o.TujuanPeminjaman = txtTujuanPeminjamanEdit.Text.Trim();
                o.TanggalDibutuhkan = dtTanggaldibutuhkanEdit.SelectedDate;
                o.FileUrl = hypDocumentUrlEdit.NavigateUrl;

                coll[e.Item.ItemIndex] = o;
                ViewState["Dokument"] = coll;

                dgDokumen.EditItemIndex = -1;
                if (ViewState["Status"].ToString() == CUSTODIAN)
                    dgDokumen.ShowFooter = false;
                else
                    dgDokumen.ShowFooter = true;
            }
            if (e.CommandName == "edit")
            {
                dgDokumen.ShowFooter = false;
                dgDokumen.EditItemIndex = e.Item.ItemIndex;
            }
            if (e.CommandName == "cancel")
            {
                dgDokumen.EditItemIndex = -1;
                if (ViewState["Status"].ToString() == CUSTODIAN)
                    dgDokumen.ShowFooter = false;
                else
                    dgDokumen.ShowFooter = true;
            }
            if (e.CommandName == "delete")
            {
                coll.RemoveAt(e.Item.ItemIndex);
                ViewState["Dokument"] = coll;
            }
            if (e.CommandName == "popup")
            {
                ViewState["Index"] = e.Item.ItemIndex;
            }
            BindDokumen();
        }
Esempio n. 4
0
 void LockConflict(SessionBase sharedReadSession)
 {
   string host = null;
   Random r = new Random(5);
   SessionPool sessionPool = new SessionPool(3, () => new ServerClientSession(systemDir, host, 2000, false));
   try
   {
     int iCounter = 0;
     int sessionId1 = -1;
     SessionBase session1 = null;
     for (int i = 0; i < 50; i++)
     {
       try
       {
         session1 = sessionPool.GetSession(out sessionId1);
         session1.BeginUpdate();
         Dokument Doc_A = new Dokument();
         Doc_A.Name = "Test A";
         session1.Persist(Doc_A);
         Console.WriteLine(Doc_A.ToString());
         int sessionId2 = -1;
         SessionBase session2 = null;
         try
         {
           session2 = sessionPool.GetSession(out sessionId2);
           session2.BeginUpdate();
           Dokument Doc_B = new Dokument();
           Doc_B.Name = "Test_B";
           session2.Persist(Doc_B);
           Console.WriteLine(Doc_B.ToString());
           session2.Commit();
         }
         finally
         {
           sessionPool.FreeSession(sessionId2, session2);
         }
         session1.Commit();
         sharedReadSession.ForceDatabaseCacheValidation();
         session1.BeginRead();
         ulong ct = session1.AllObjects<Dokument>(false).Count;
         Console.WriteLine("Number of Dokument found by normal session: " + ct);
         session1.Commit();
         ct = sharedReadSession.AllObjects<Dokument>(false).Count;
         Console.WriteLine("Number of Dokument found by shared read session: " + ct);
       }
       finally
       {
         sessionPool.FreeSession(sessionId1, session1);
       }
       iCounter++;
       Console.WriteLine(" -> " + iCounter.ToString());
     }
   }
   catch (Exception ex)
   {
     Console.WriteLine(ex.Message);
     throw;
   }
 }
Esempio n. 5
0
 public void MultipleThreadsAdding()
 {
   bool doClearAll = SessionBase.ClearAllCachedObjectsWhenDetectingUpdatedDatabase;
   SessionBase.ClearAllCachedObjectsWhenDetectingUpdatedDatabase = false;
   try
   {
     using (SessionNoServer session = new SessionNoServer(systemDir))
     {
       session.BeginUpdate();
       session.RegisterClass(typeof(AutoPlacement)); // build in type but not yet registered as a one
       session.RegisterClass(typeof(ObservableList<int>));
       session.RegisterClass(typeof(Dokument));
       UInt32 dbNum = session.DatabaseNumberOf(typeof(Dokument));
       Database db = session.OpenDatabase(dbNum, false, false);
       if (db == null)
         db = session.NewDatabase(dbNum, 0, typeof(Dokument).ToGenericTypeString());
       Dokument doc = new Dokument();
       session.Persist(doc);
       session.Commit();
     }
     using (ServerClientSessionShared sharedReadSession = new ServerClientSessionShared(systemDir))
     {
       sharedReadSession.BeginRead();
       Parallel.ForEach(Enumerable.Range(1, 3), (num) => LockConflict(sharedReadSession));
     }
   }
   finally
   {
     SessionBase.ClearAllCachedObjectsWhenDetectingUpdatedDatabase = doClearAll;
   }
 }
Esempio n. 6
0
        public async Task <int> Handle(CreateOrUpdateDokumentFürVermittlerCommand command, CancellationToken cancellationToken)
        {
            if (!_currentUserService.IstVermittler)
            {
                throw new UnauthorizedAccessException();
            }

            //Check if passed in Dokumentart exist on the DokumentArt table.
            //New Dokumentarten cannot be created in this method.
            if (!await _insuranceDbContext
                .DokumentArtSet.AnyAsync(das => das.Id == command.DokumentArtId
                                         , cancellationToken))
            {
                throw new NotFoundException($"Die Dokumentart mit der id {command.DokumentArtId} " +
                                            $"existiert nicht");
            }

            //Get Vermittler
            var vermittler = await _insuranceDbContext.Vermittler
                             .Include(v => v.RegistrierungsDokumente)
                             .ThenInclude(rd => rd.DokumentenArt)
                             .FirstOrDefaultAsync(v => v.Id == command.VermittlerId,
                                                  cancellationToken);

            //Check if Requesting Vermittler exists on DB
            if (vermittler == null)
            {
                throw new NotFoundException(nameof(Vermittler), command.VermittlerId);
            }

            //If Vermittler has a Dokument with the same DokumentArt replace it
            if (vermittler.RegistrierungsDokumente
                .Any(rd => rd.DokumentenArt.Id == command.DokumentArtId))
            {
                var dokumentToReplace = vermittler.RegistrierungsDokumente
                                        .First(rd => rd.DokumentenArt.Id == command.DokumentArtId);

                dokumentToReplace.Bearbeitungsstatus = Bearbeitungsstatus.ZuPrüfen;
                dokumentToReplace.Data          = command.Data;
                dokumentToReplace.Name          = command.Name;
                dokumentToReplace.FileExtension =
                    EnumExtensions.ParseEnumFromString <FileExtension>(command.FileExtension);

                await _insuranceDbContext.SaveChangesAsync(cancellationToken);

                return(dokumentToReplace.Id);
            }

            //Dokument is new and is added to Registrierungsdokument for Vermittler
            Dokument dokumentToAdd = new Dokument
            {
                Name          = command.Name,
                DokumentenArt = _insuranceDbContext.DokumentArtSet
                                .First(das => das.Id == command.DokumentArtId),
                Bearbeitungsstatus = Bearbeitungsstatus.ZuPrüfen,
                FileExtension      = EnumExtensions.ParseEnumFromString <FileExtension>(command.FileExtension),
                Data = command.Data
            };

            vermittler.RegistrierungsDokumente.Add(dokumentToAdd);

            await _insuranceDbContext.SaveChangesAsync(cancellationToken);

            return(dokumentToAdd.Id);
        }
Esempio n. 7
0
        private void SubmitData(
            Arkivdel series,
            Klasse primaryClass,
            Klasse secondaryClass,
            AdministrativEnhet administrativeUnit,
            Skjerming screeningCode,
            Dokumenttype documentType,
            string caseFileTitle,
            string caseFileExternalId,
            string caseResponsibleName,
            string caseResponsibleId,
            string registryEntryTitle,
            string registryEntryExternalId)
        {
            #region Case file

            Saksmappe caseFile = new Saksmappe(caseFileTitle, administrativeUnit)
            {
                Saksansvarlig            = caseResponsibleName,
                SaksansvarligBrukerIdent = caseResponsibleId
            };

            EksternId caseFileExternalIdObj = new EksternId(EXTERNAL_SYSTEM, caseFileExternalId);

            #endregion Case file

            #region Registry entry

            Journalpost registryEntry = new Journalpost(registryEntryTitle, Journalposttype.UTGAAENDE_DOKUMENT)
            {
                Skjerming = screeningCode
            };

            registryEntry.VirksomhetsspesifikkeMetadata.AddBsmFieldValues("gr-1", "f-string", "value 1");

            EksternId registryEntryExternalIdObj = new EksternId(EXTERNAL_SYSTEM, registryEntryExternalId);

            Korrespondansepart correspondenceParty =
                new Korrespondansepart(Korrespondanseparttype.AVSENDER, "John Smith");

            #endregion Registry entry

            #region Documents

            //Upload two files

            Dokumentfil mainFile       = UploadDocument(this.testFile1);
            Dokumentfil attachmentFile = UploadDocument(this.testFile2);

            //Link the first document description to the registry entry as main document (HOVEDDOKUMENT).
            //Subsequent document descriptions will be linked as attachments (VEDLEGG).

            Dokument mainDocumentDescription =
                new Dokument("Main Document", TilknyttetRegistreringSom.HOVEDDOKUMENT)
            {
                Dokumenttype = documentType,
            };

            Dokumentversjon mainDocumentVersion =
                new Dokumentversjon(Variantformat.ARKIVFORMAT, ".pdf", mainFile);

            Dokument attachmentDocumentDescription =
                new Dokument("Attachment", TilknyttetRegistreringSom.VEDLEGG)
            {
                Dokumenttype = documentType     //here might as well be used another type
            };

            Dokumentversjon attachmentDocumentVersion =
                new Dokumentversjon(Variantformat.ARKIVFORMAT, ".pdf", attachmentFile);

            #endregion Documents

            NoarkClient client = this.documasterClients.GetNoarkClient();

            TransactionResponse transactionResponse = client.Transaction()
                                                      .Save(caseFile)
                                                      .Link(caseFile.LinkArkivdel(series))
                                                      .Link(caseFile.LinkPrimaerKlasse(primaryClass))
                                                      .Link(caseFile.LinkSekundaerKlasse(secondaryClass))
                                                      .Save(caseFileExternalIdObj)
                                                      .Link(caseFileExternalIdObj.LinkMappe(caseFile))
                                                      .Save(registryEntry)
                                                      .Link(registryEntry.LinkMappe(caseFile))
                                                      .Save(correspondenceParty)
                                                      .Link(correspondenceParty.LinkRegistrering(registryEntry))
                                                      .Save(registryEntryExternalIdObj)
                                                      .Link(registryEntryExternalIdObj.LinkRegistrering(registryEntry))
                                                      .Save(mainDocumentDescription)
                                                      .Link(mainDocumentDescription.LinkRegistrering(registryEntry))
                                                      .Save(mainDocumentVersion)
                                                      .Link(mainDocumentVersion.LinkDokument(mainDocumentDescription))
                                                      .Save(attachmentDocumentDescription)
                                                      .Link(attachmentDocumentDescription.LinkRegistrering(registryEntry))
                                                      .Save(attachmentDocumentVersion)
                                                      .Link(attachmentDocumentVersion.LinkDokument(attachmentDocumentDescription))
                                                      .Commit();

            // When new objects are initialized, a temporary Id is assigned to them.
            // transactionResponse.Saved contains a mapping between the temporary id's and the saved objects with their permanent id's
            Dictionary <string, INoarkEntity> savedObjects = transactionResponse.Saved;

            string template = "{0}: Temporary Id: {1} Permanent Id: {2}";

            Console.WriteLine(String.Format(template, "Case file", caseFile.Id, savedObjects[caseFile.Id].Id));
            Console.WriteLine(String.Format(template, "Registry entry", registryEntry.Id,
                                            savedObjects[registryEntry.Id].Id));
            Console.WriteLine(String.Format(template, "Main document description", mainDocumentDescription.Id,
                                            savedObjects[mainDocumentDescription.Id].Id));
            Console.WriteLine(String.Format(template, "Attachment document description",
                                            attachmentDocumentDescription.Id, savedObjects[attachmentDocumentDescription.Id].Id));
        }
Esempio n. 8
0
 public void ObicanStampac(Dokument d)
 {
     this._o.Stampaj(d);
 }
Esempio n. 9
0
 public void Galeb(Dokument d)
 {
     this._g.Stampaj(d);
     this._g.OtvoriKasu();
 }
Esempio n. 10
0
 public void Mikroeletronika(Dokument d)
 {
     this._m.Stampaj(d);
     this._m.OtvoriKasu();
     this._m.VratiOdgovor();
 }
Esempio n. 11
0
        public ActionResult Podsumowanie(Dokument dok)
        {
            if (!MusicStore.Models.Module.User.IsAuthenticated) return RedirectToAction("Index", "Home");
            if (MusicStore.Models.Module.User.GetCurrentRole() != MusicStore.Models.Module.User.Klient) return RedirectToAction("Index", "Home");
            DbModule module = DbModule.GetInstance();
            string[] koszyk = Request.Cookies["Cart"].Value.ToString().Split(',');
            var dict = new System.Collections.Generic.Dictionary<int, int>();

            if (!String.IsNullOrEmpty(Request.Cookies["Cart"].Value))
                foreach (string Ids in koszyk)
                {
                    int Id = int.Parse(Ids);
                    if (!dict.ContainsKey(Id))
                    {
                        dict.Add(Id, 1);
                    }
                    else
                    {
                        dict[Id] += 1;
                    }
                }

            var dict2 = new System.Collections.Generic.Dictionary<Album, int>();
            decimal wartosc = 0;
            string waluta = "";
            foreach (var obiekt in dict)
            {
                var album = module.Albumy.Where(x => x.Id == obiekt.Key).First();
                dict2.Add(album, obiekt.Value);
                wartosc += album.BruttoValue * obiekt.Value;

                if (waluta == "")
                {
                    waluta = album.BruttoSymbol;
                }
                else if (waluta != album.BruttoSymbol)
                {
                    waluta = "(Wiele walut)";
                    wartosc = 0;
                }
            }
            ViewBag.wartosc = wartosc;
            ViewBag.waluta = waluta;
            ViewBag.Pozycje = dict2;
            return View(dok);
        }
Esempio n. 12
0
        public ActionResult SaveOrder(Dokument dok)
        {
            if (!MusicStore.Models.Module.User.IsAuthenticated) return RedirectToAction("Index", "Home");
            if (MusicStore.Models.Module.User.GetCurrentRole() != MusicStore.Models.Module.User.Klient) return RedirectToAction("Index", "Home");

            DbModule module = DbModule.GetInstance();
            dok.DataZamowienia = DateTime.Now;
            dok.NumerDokumentu = Dokument.GetLastNumber();
            module.AddRow(dok);

            string[] koszyk = Request.Cookies["Cart"].Value.ToString().Split(',');
            var dict = new System.Collections.Generic.Dictionary<int, int>();

            if (!String.IsNullOrEmpty(Request.Cookies["Cart"].Value))
                foreach (string Ids in koszyk)
                {
                    int Id = int.Parse(Ids);
                    if (!dict.ContainsKey(Id))
                    {
                        dict.Add(Id, 1);
                    }
                    else
                    {
                        dict[Id] += 1;
                    }
                }

            var dict2 = new System.Collections.Generic.Dictionary<Album, int>();
            decimal wartosc = 0;
            string waluta = "";
            foreach (var obiekt in dict)
            {
                var album = module.Albumy.Where(x => x.Id == obiekt.Key).First();
                dict2.Add(album, obiekt.Value);
                wartosc += album.BruttoValue * obiekt.Value;

                if (waluta == "")
                {
                    waluta = album.BruttoSymbol;
                }
                else if (waluta != album.BruttoSymbol)
                {
                    waluta = "(Wiele walut)";
                    wartosc = 0;
                }
            }
            int lp = 1;
            foreach(var poz in dict2)
            {
                PozycjaDokumentu pozycja = new PozycjaDokumentu(dok);
                pozycja.AlbumName = poz.Key.Nazwa + " (" + poz.Key.Artysta.Nazwa + ")";
                pozycja.CenaBrutto = poz.Key.BruttoValue;
                pozycja.Ilosc = poz.Value;
                pozycja.Lp = lp;
                pozycja.State = RowState.Added;
                pozycja.Waluta = poz.Key.BruttoSymbol;

                module.AddRow(pozycja);

                var album = poz.Key;
                album.StanIlosc -= pozycja.Ilosc;
                module.Update(album);
                lp++;
            }
            ViewBag.NumerDokumentu = dok.NumerDokumentu;
            return View();
        }