public bool ShowForm(string DocId)
 {
     dd.DocId = DocId;
     dd.LoadEntity(true);
     //this.DocId = DocId;
     //DocDefault.GetDefaultLayout(DocId, out BrowseLayoutId, out PrintLayoutId,
     //    out DefaultPrintOnSave, out DefaultUsePrintPreview);
     radioGroup1.SelectedIndex = dd.DefaultUsePrintPreview ? 0 : 1;
     DefaultUsePrintPreview    = dd.DefaultUsePrintPreview;
     checkEdit1.Checked        = dd.DefaultPrintOnSave;
     return(ShowDialog() == System.Windows.Forms.DialogResult.OK);
 }
예제 #2
0
        public static void GetDefaultLayout(string DocId, out string BrowseLayoutId,
                                            out string PrintBrowseLayoutId, out bool DefaultUsePrintPreview)
        {
            DocDefault dd = new DocDefault();

            dd.DocId = DocId;
            if (dd.LoadEntity(true))
            {
                BrowseLayoutId         = dd.DefaultBrowseLayoutId;
                PrintBrowseLayoutId    = dd.DefaultPrintBrowseLayoutId;
                DefaultUsePrintPreview = dd.DefaultUsePrintPreview;
            }
            else
            {
                BrowseLayoutId         = string.Empty;
                PrintBrowseLayoutId    = string.Empty;
                DefaultUsePrintPreview = true;
            }
        }
예제 #3
0
        public static void UpdateSelectedPrintBrowseLayout(string DocId,
                                                           string PrintBrowseLayoutId)
        {
            DocDefault dd = new DocDefault();

            dd.DocId = DocId;
            if (dd.LoadEntity())
            {
                dd.DefaultPrintBrowseLayoutId = PrintBrowseLayoutId;
                dd.SaveUpdate();
            }
            else
            {
                dd.SetDefaultValue();
                dd.DocId = DocId;
                dd.DefaultPrintBrowseLayoutId = PrintBrowseLayoutId;
                dd.DefaultPrintOnSave         = false;
                dd.SaveNew();
            }
        }