Exemplo n.º 1
0
        private bool grdPrintForms_Restore()
        {
            RFMCursorWait.Set(true);
            RFMCursorWait.LockWindowUpdate(FindForm().Handle);
            oPartnerRootCur.ClearOne();

            oPrintFormList.ClearError();
            oPrintFormList.ClearFilters();
            oPrintFormList.ID = null;

            // собираем условия
            grdPrintForms_Partners.DataSource = null;

            grdPrintForms.GetGridState();

            oPrintFormList.FillData();
            grdPrintForms.IsLockRowChanged = true;
            grdPrintForms.Restore(oPrintFormList.MainTable);
            tmrRestore.Enabled = true;

            RFMCursorWait.LockWindowUpdate(IntPtr.Zero);
            RFMCursorWait.Set(false);

            return(oPrintFormList.ErrorNumber == 0);
        }
Exemplo n.º 2
0
 private bool CheckPF_Form(string sPF_BillName, string sPF_BillType, string sPF_Type_Text)
 {
     oPrintForm.ClearFilters();
     oPrintForm.FilterPF_Name = sPF_BillName;
     oPrintForm.FilterPF_Type = sPF_BillType;
     oPrintForm.FillData();
     if (oPrintForm.ErrorNumber != 0 || oPrintForm.MainTable == null)
     {
         RFMMessage.MessageBoxError("Ошибка при получении данных о печатных формах...");
         return(false);
     }
     if (oPrintForm.MainTable.Rows.Count == 0)
     {
         if (RFMMessage.MessageBoxYesNo("ВНИМАНИЕ!\n\n" +
                                        "В списке шаблонов печатных форм не найден шаблон \"" + sPF_BillName + "\" (тип " + sPF_BillType + ")...\n\n" +
                                        "Все-таки сохранить данные?") != DialogResult.Yes)
         {
             return(false);
         }
     }
     return(true);
 }