Exemplo n.º 1
0
        private void BrowseBtn_Click(object sender, RoutedEventArgs e)
        {
            if (CurrentContract.PermanentRecord == true)
            {
                ErrorHandler.NotifyUser("سند به ثبت نهایی رسیده است");
                return;
            }
            FileDataObject d = FilingManager.GetFileDataObject(); // check if the file is empty or the selected item is nulland return

            if (d == null)
            {
                return;
            }
            var f = new PaymentFile()
            {
                Index          = 1,
                Name           = d.FileName,
                FileContent    = d.FileContent,
                AttachedDate   = DateTime.Now,
                FileGuid       = Guid.NewGuid(),
                PaymentDraftId = (dataGrid.SelectedItem as PaymentDraft).PaymentDraftId
            };

            DataManagement.AddPaymentDraftFile(f);
            ErrorHandler.NotifyUser("فایل ثبت شد");
        }
        private void BrowseBtn1_Click(object sender, RoutedEventArgs e)
        {
            if (EditBtn.IsEnabled == false)
            {
                ErrorHandler.NotifyUser("برای بارگذاری فایل  پس از تکمیل سند و ثبت آن از طریق جستجو وارد شوید");
                return;
            }
            if (dataGrid1.SelectedIndex == -1)
            {
                return;
            }
            if ((dataGrid1.SelectedItem as ContractFile).FileId > 0)
            {
                return;
            }
            if (CurrentContract.PermanentRecord == true)
            {
                ErrorHandler.NotifyUser("سند به ثبت نهایی رسیده است");
                return;
            }
            FileDataObject temp = FilingManager.GetFileDataObject();

            if (temp == null)
            {
                return;
            }
            ContractFile t = dataGrid1.SelectedItem as ContractFile;

            t.FileContent  = temp.FileContent;
            t.Name         = temp.FileName;
            t.AttachedDate = DateTime.Now;
            DataManagement.AddContractFile(CurrentContract.Contractid, ContractIndex.ComplementOrExtend, t);
            ErrorHandler.NotifyUser(Errors.Saved);
        }
        private void SaveBtn_Click(object sender, RoutedEventArgs e)
        {
            if (CurrentTendering.RequestPermanentCheck == true)
            {
                ErrorHandler.NotifyUser("سند به تایید نهایی رسیده است");
                return;
            }

            if (!FilingManager.HasTenderingFile(CurrentTendering.TenderingId, TenderingIndex.CeoOrder, null, null, this.layoutRoot))
            {
                ErrorHandler.ShowErrorMessage("بارگذاری تصویر برای ثبت الزامی است.");
                return;
            }

            try
            {
                DataManagement.UpdateContractorRequest(CurrentReq);
                ErrorHandler.NotifyUser(ErrorHandler.ErrorMessages["SuccessfulSave"]);

                CurrentTendering.TenderingType = TenderTypeCom.Text;
                DataManagement.UpdateTendering(CurrentTendering);
                DataManagement.UpdateTenderingStage(CurrentTendering, Stages.CEO);
            }
            catch
            {
                ErrorHandler.NotifyUser(ErrorHandler.ErrorMessages["FailedSave"]);
            }
        }
Exemplo n.º 4
0
        private void SaveFile_Click(object sender, RoutedEventArgs e)
        {
            var o = Grid1.SelectedItem as ContractFilesGridItem;

            FilingManager.UploadContractFile(CurrentContract.Contractid, (ContractIndex)o.DocumentIndex, null, this.layoutRoot);
            Grid1.Items.Refresh();
        }
Exemplo n.º 5
0
        private void SaveFile_Click(object sender, RoutedEventArgs e)
        {
            var o = Grid.SelectedItem as UI5GridItems;

            FilingManager.UploadTenderingFile(CurrentTendering.TenderingId, (TenderingIndex)o.DocumentIndex, null, o.Version, this.layoutRoot);
            Grid.Items.Refresh();
        }
        private void DeleteFile_Click(object sender, RoutedEventArgs e)
        {
            if (CurrentTendering.PermanentRecord == true)
            {
                ErrorHandler.NotifyUser(Errors.Permanented);
                return;
            }
            if (SaveBtn.IsEnabled == false)
            {
                ErrorHandler.ShowErrorMessage("امکان انجام این عملیات وجود ندارد");
                return;
            }
            if (!UserData.CurrentAccessRight.TenderingDelete)
            {
                ErrorHandler.ShowErrorMessage(Errors.OperationNotAllowed);
                return;
            }
            var item = NoticeGrid.SelectedItem as Advertisement;

            if (item == null || item.AdvertisementId == 0)
            {
                ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NoFile"]);
                return;
            }
            FilingManager.DeleteTenderingFile(CurrentNotice.TenderingId, (TenderingIndex.Advertisement), null, null, this.layoutRoot, item.AdvertisementId);
        }
 private void ShowFileBtn2_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentReq.ContractorRequestId == 0)
     {
         ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NotSaved"]);
         return;
     }
     FilingManager.DownloadTenderingFile(CurrentTendering.TenderingId, TenderingIndex.PrivateConditions, null, null, this.layoutRoot);
 }
 private void OpenFile1_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentTendering.TenderingType != "محدود دو مرحله اي" && CurrentTendering.TenderingType != "عمومي دو مرحله اي")
     {
         ErrorHandler.ShowErrorMessage("امکان انجام این عملیات وجود ندارد");
         return;
     }
     FilingManager.DownloadTenderingFile(CurrentTendering.TenderingId, TenderingIndex.BiddingCommitteeMeeting, null, null, this.layoutRoot);
 }
 private void SesionRecordAddBtn_Click(object sender, RoutedEventArgs e)
 {
     if (!UserData.CurrentAccessRight.TenderingWrite)
     {
         ErrorHandler.ShowErrorMessage(Errors.OperationNotAllowed);
         return;
     }
     FilingManager.UploadTenderingFile(CurrentTendering.TenderingId, TenderingIndex.Bidding, null, null, this.layoutRoot);
 }
 private void DelBtn_Click(object sender, RoutedEventArgs e)
 {
     if (!UserData.CurrentAccessRight.TenderingDelete)
     {
         ErrorHandler.ShowErrorMessage("امکان انجام این عملیات وجود ندارد");
         return;
     }
     FilingManager.DeleteTenderingFile(CurrentTendering.TenderingId, TenderingIndex.Bidding, null, null, this.layoutRoot);
 }
 private void DelBtn_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentTendering.TenderingId == 0)
     {
         ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NotSaved"]);
         return;
     }
     FilingManager.DeleteTenderingFile(CurrentTendering.TenderingId, TenderingIndex.WarrantyMeeting, null, null, this.layoutRoot);
 }
 private void DeleteBtn_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentTendering.RequestPermanentCheck == true)
     {
         ErrorHandler.NotifyUser("سند به تایید نهایی رسیده است");
         return;
     }
     FilingManager.DeleteTenderingFile(CurrentTendering.TenderingId, TenderingIndex.CommitteDicision, null, null, this.layoutRoot);
 }
 private void DelBtn_Click(object sender, RoutedEventArgs e)
 {
     if (!UserData.CurrentAccessRight.TenderingDelete)
     {
         ErrorHandler.ShowErrorMessage(Errors.OperationNotAllowed);
         return;
     }
     FilingManager.DeleteTenderingFile(CurrentTendering.TenderingId, TenderingIndex.CommitteDicision, null, null, this.layoutRoot);
 }
 private void OpenFile2_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentTendering.TenderingType != "محدود دو مرحله اي" && CurrentTendering.TenderingType != "عمومي دو مرحله اي" && CurrentTendering.HasQualityEvaluation == false)
     {
         ErrorHandler.ShowErrorMessage("این مناقصه ارزیابی کیفی ندارد");
         return;
     }
     FilingManager.DownloadTenderingFile(CurrentTendering.TenderingId, TenderingIndex.TechincalCommitteeMeeting, null, null, this.layoutRoot);
 }
Exemplo n.º 15
0
 private void ShowBtn_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentMeeting.MeetingId == 0)
     {
         ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NotSaved"]);
         return;
     }
     FilingManager.DownloadTenderingFile(CurrentTendering.TenderingId, meeting, null, null, this.layoutRoot, null, CurrentMeeting.MeetingId);
 }
Exemplo n.º 16
0
        private void DeleteFile_Click(object sender, RoutedEventArgs e)
        {
            var o = Grid.SelectedItem as UI5GridItems;

            FilingManager.DeleteTenderingFile(CurrentTendering.TenderingId, (TenderingIndex)o.DocumentIndex, null, o.Version, this.layoutRoot);
            GridList.Remove(o);
            UpdateGridList();

            Grid.Items.Refresh();
        }
        private void ViewFile_Click(object sender, RoutedEventArgs e)
        {
            var item = NoticeGrid.SelectedItem as Advertisement;

            if (item == null || item.AdvertisementId == 0)
            {
                ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NoFile"]);
                return;
            }
            FilingManager.DownloadTenderingFile(CurrentNotice.TenderingId, (TenderingIndex.Advertisement), null, null, this.layoutRoot, item.AdvertisementId);
        }
Exemplo n.º 18
0
        private void ViewFile_Click(object sender, RoutedEventArgs e)
        {
            var item = dataGrid4.SelectedItem as ContractorTenderingDocumentRecieve;

            if (item == null || item.ContractorTenderingBuyId == 0)
            {
                ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NoFile"]);
                return;
            }
            FilingManager.DownloadTenderingFile(CurrentTendering.TenderingId, (TenderingIndex.ContractorRecieveDoc), item.ContractorId, null, this.layoutRoot, null);
        }
Exemplo n.º 19
0
        private void ViewFile_Click(object sender, RoutedEventArgs e)
        {
            var item = dataGrid.SelectedItem as ContractorTenderingSubmitPacket;

            if (item == null || item.ContractorSubmitingDocumentId == 0)
            {
                ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NotSaved"]);
                return;
            }
            FilingManager.DownloadTenderingFile(CurrentTendering.TenderingId, (TenderingIndex.PacketPresent), item.ContractorId, null, this.layoutRoot, null);
        }
        private void ViewFile_Click(object sender, RoutedEventArgs e)
        {
            var item = MainGrid.SelectedItem as ContractorMeetingOpenPacket;

            if (item == null || item.CMOId == 0)
            {
                ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NotSaved"]);
                return;
            }
            FilingManager.DownloadTenderingFile(CurrentTendering.TenderingId, (TenderingIndex.OpenPacketIntroductionLetter), item.ContractorId, null, this.layoutRoot, null);
        }
        private void ViewFile_Click(object sender, RoutedEventArgs e)
        {
            var item = dataGrid.SelectedItem as Warranty;

            if (item == null || item.WarrantyId == 0)
            {
                ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NotSaved"]);
                return;
            }
            FilingManager.DownloadTenderingFile(CurrentTendering.TenderingId, (TenderingIndex.WarrantyDocs), item.ContractorId, null, this.layoutRoot, null, null, item.WarrantyId);
        }
 private void button6_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentTendering.TenderingType != "محدود دو مرحله اي" && CurrentTendering.TenderingType != "عمومي دو مرحله اي" && CurrentTendering.HasQualityEvaluation == false)
     {
         ErrorHandler.ShowErrorMessage("این مناقصه ارزیابی کیفی ندارد");
         return;
     }
     if (!UserData.CurrentAccessRight.TenderingDelete)
     {
         ErrorHandler.ShowErrorMessage(Errors.OperationNotAllowed);
         return;
     }
     FilingManager.DeleteTenderingFile(CurrentTendering.TenderingId, TenderingIndex.TechincalCommitteeMeeting, null, null, this.layoutRoot);
 }
Exemplo n.º 23
0
 private void DelPicBtn_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentTendering.RequestPermanentCheck == true)
     {
         ErrorHandler.NotifyUser("سند به تایید نهایی رسیده است");
         return;
     }
     if (!UserData.CurrentAccessRight.TenderingDelete)
     {
         ErrorHandler.ShowErrorMessage("امکان انجام این عملیات وجود ندارد");
         return;
     }
     FilingManager.DeleteTenderingFile(CurrentTendering.TenderingId, TenderingIndex.CreditControl, null, null, this.layoutRoot);
 }
Exemplo n.º 24
0
 private void AddPicBtn_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentTendering.RequestPermanentCheck == true)
     {
         ErrorHandler.NotifyUser("سند به تایید نهایی رسیده است");
         return;
     }
     if (!UserData.CurrentAccessRight.TenderingWrite)
     {
         ErrorHandler.ShowErrorMessage(Errors.OperationNotAllowed);
         return;
     }
     FilingManager.UploadTenderingFile(CurrentTendering.TenderingId, TenderingIndex.CreditControl, null, null, this.layoutRoot);
 }
 private void button3_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentTendering.TenderingType != "محدود دو مرحله اي" && CurrentTendering.TenderingType != "عمومي دو مرحله اي")
     {
         ErrorHandler.ShowErrorMessage("امکان انجام این عملیات وجود ندارد");
         return;
     }
     if (!UserData.CurrentAccessRight.TenderingDelete)
     {
         ErrorHandler.ShowErrorMessage(Errors.OperationNotAllowed);
         return;
     }
     FilingManager.DeleteTenderingFile(CurrentTendering.TenderingId, TenderingIndex.BiddingCommitteeMeeting, null, null, this.layoutRoot);
 }
Exemplo n.º 26
0
 private void DelBtn_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentMeeting.MeetingId == 0)
     {
         ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NotSaved"]);
         return;
     }
     if (!UserData.CurrentAccessRight.TenderingDelete)
     {
         ErrorHandler.ShowErrorMessage(Errors.OperationNotAllowed);
         return;
     }
     FilingManager.DeleteTenderingFile(CurrentTendering.TenderingId, meeting, null, null, this.layoutRoot, null, CurrentMeeting.MeetingId);
 }
Exemplo n.º 27
0
 private void AddFileBtn_Click(object sender, RoutedEventArgs e)
 {
     if (VersionTxt.Text.Trim() != "")
     {
         FilingManager.UploadTenderingFile(CurrentTendering.TenderingId, (TenderingIndex)DocTypesCom.SelectedValue, null, VersionTxt.Text, this.layoutRoot);
         if (CurrentTendering.TenderingType == "محدود يک مرحله اي" || CurrentTendering.TenderingType == "محدود دو مرحله اي" || CurrentTendering.TenderingType == "ترک تشريفات" || CurrentTendering.TenderingType == "انحصاري")
         {
             DataManagement.UpdateTenderingStage(CurrentTendering, Stages.Notice);
         }
         else
         {
             DataManagement.UpdateTenderingStage(CurrentTendering, Stages.Documents);
         }
         UpdateGridList();
     }
 }
Exemplo n.º 28
0
        private void SaveFile_Click(object sender, RoutedEventArgs e)
        {
            if (button2.IsEnabled == false)
            {
                ErrorHandler.ShowErrorMessage("امکان انجام این عملیات وجود ندارد");
                return;
            }
            if (!UserData.CurrentAccessRight.TenderingWrite)
            {
                ErrorHandler.ShowErrorMessage(Errors.OperationNotAllowed);
                return;
            }
            var o = Grid.SelectedItem as UI5GridItems;

            FilingManager.UploadTenderingFile(CurrentTendering.TenderingId, (TenderingIndex)o.DocumentIndex, null, o.Version, this.layoutRoot);
            Grid.Items.Refresh();
        }
 private void DelBtn1_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentReq.ContractorRequestId == 0)
     {
         ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NotSaved"]);
         return;
     }
     if (!UserData.CurrentAccessRight.TenderingDelete)
     {
         ErrorHandler.ShowErrorMessage("امکان انجام این عملیات وجود ندارد");
         return;
     }
     if (CurrentTendering.RequestPermanentCheck == true)
     {
         ErrorHandler.NotifyUser("سند به تایید نهایی رسیده است");
         return;
     }
     FilingManager.DeleteTenderingFile(CurrentTendering.TenderingId, TenderingIndex.PrivateConditions, null, null, this.layoutRoot);
 }
 private void AddFileBtn2_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentReq.ContractorRequestId == 0)
     {
         ErrorHandler.ShowErrorMessage(ErrorHandler.ErrorMessages["NotSaved"]);
         return;
     }
     if (CurrentTendering.RequestPermanentCheck == true)
     {
         ErrorHandler.NotifyUser("سند به تایید نهایی رسیده است");
         return;
     }
     if (!UserData.CurrentAccessRight.TenderingWrite)
     {
         ErrorHandler.ShowErrorMessage(Errors.OperationNotAllowed);
         return;
     }
     FilingManager.UploadTenderingFile(CurrentTendering.TenderingId, TenderingIndex.PrivateConditions, null, null, this.layoutRoot);
 }