コード例 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            var brak = new TypeForm();

            brak.Show();
            Close();
        }
コード例 #2
0
 /// <summary>
 /// Función para añadir JSLink a las librerias
 /// </summary>        
 /// <param name="list">Nombre de la lista</param>
 /// <param name="urlJS">Ubicación donde esta el fichero JS que se renderizara</param>
 /// <param name="typeForm">Typo de formulario donde se aplicara:Edit,New,Display,View</param>
 /// <returns></returns>
 public static bool AddJSLinkToLibrary(this SPList list, string urlJS, TypeForm typeForm)
 {
     try
     {
         var result = false;                
         var urlForm = GetTypeForm(list).Values.FirstOrDefault();
         var form = list.ParentWeb.GetFile(urlForm);
         var webPartManager =
             form.GetLimitedWebPartManager(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
         if (webPartManager.WebParts.Count > 0)
         {
             if (TypeForm.View == typeForm)
             {
                 var webPart = webPartManager.WebParts[0] as XsltListViewWebPart;
                 webPart.JSLink = urlJS;
                 webPartManager.SaveChanges(webPart);
             }
             else
             {
                 var webPart = webPartManager.WebParts[0] as ListFormWebPart;
                 webPart.JSLink = urlJS;
                 webPartManager.SaveChanges(webPart);
             }
             result = true;
         }
         webPartManager.Web.Dispose();
         return result;
     }
     catch (Exception exception)
     {
         Logger.Error(string.Concat("Error AddJSLinkToLibrary", exception.Message));
         return false;
     }
 }
コード例 #3
0
ファイル: Design.cs プロジェクト: rainfc/Enmarcha-SharePoint
 /// <summary>
 /// Función para añadir JSLink a las librerias
 /// </summary>
 /// <param name="list">Nombre de la lista</param>
 /// <param name="urlJS">Ubicación donde esta el fichero JS que se renderizara</param>
 /// <param name="typeForm">Typo de formulario donde se aplicara:Edit,New,Display,View</param>
 /// <returns></returns>
 public static bool AddJSLinkToLibrary(this SPList list, string urlJS, TypeForm typeForm)
 {
     try
     {
         var result         = false;
         var urlForm        = GetTypeForm(list).Values.FirstOrDefault();
         var form           = list.ParentWeb.GetFile(urlForm);
         var webPartManager =
             form.GetLimitedWebPartManager(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
         if (webPartManager.WebParts.Count > 0)
         {
             if (TypeForm.View == typeForm)
             {
                 var webPart = webPartManager.WebParts[0] as XsltListViewWebPart;
                 webPart.JSLink = urlJS;
                 webPartManager.SaveChanges(webPart);
             }
             else
             {
                 var webPart = webPartManager.WebParts[0] as ListFormWebPart;
                 webPart.JSLink = urlJS;
                 webPartManager.SaveChanges(webPart);
             }
             result = true;
         }
         webPartManager.Web.Dispose();
         return(result);
     }
     catch (Exception exception)
     {
         Logger.Error(string.Concat("Error AddJSLinkToLibrary", exception.Message));
         return(false);
     }
 }
コード例 #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            dataBase.typeupd(id, textBox2.Text);
            var brak = new TypeForm();

            brak.Show();
            Close();
        }
コード例 #5
0
        public EvaluacionFrm(TypeForm type, MetaType mtype, DEvaluacion evaluacion)
        {
            init();

            Type     = type;
            MType    = mtype;
            DataFill = evaluacion;
        }
コード例 #6
0
        public MetaFrm(TypeForm type, MetaType mtype, DMeta meta)
        {
            init();

            Type     = type;
            MType    = mtype;
            DataFill = meta;
        }
コード例 #7
0
 public WindowStatistic(TypeForm type_, string connection, string currentAdmin, int id_user = 0)
 {
     InitializeComponent();
     Connection   = connection;
     Type_        = type_;
     CurrentAdmin = currentAdmin;
     Id_user      = id_user;
     backWorker   = ((BackgroundWorker)this.FindResource("backgroundWorker"));
 }
コード例 #8
0
 public WindowStatistic(TypeForm type_, string connection, string currentAdmin, int id_user = 0)
 {
     InitializeComponent();
     Connection = connection;
     Type_ = type_;
     CurrentAdmin = currentAdmin;
     Id_user = id_user;
     backWorker = ((BackgroundWorker)this.FindResource("backgroundWorker"));
 }
コード例 #9
0
        public RespuestaPrestacionFrm(DPrestacion prestacion, TypeForm type)
        {
            InitializeComponent();

            Prestacion = prestacion;
            Type       = type;

            txtPorcentajePrestacion.KeyDown += new KeyEventHandler(Validaciones.TextBox_KeyDown);
        }
コード例 #10
0
        private void OpenForm(TypeForm type)
        {
            Form form = (type == TypeForm.Add ? new AddClientForm() : new EditClientForm());

            form.ShowDialog(this);

            ShowClient();
            lbCount.Text = Clients.Count.ToString();
        }
コード例 #11
0
        public ToolStripMenuItem toolStripMenu(TypeForm type, ToolStripMenuItem toolStrip)
        {
            ToolStripMenuItem toolStripMenuItem = new ToolStripMenuItem();

            toolStripMenuItem.Name = String.Format("{0}{1}", type, toolStrip.Name);
            toolStripMenuItem.Text = toolStripMenuItem.Name;
            toolStripMenuItem.Size = new Size(154, 24);
            toolStrip.DropDownItems.AddRange(new ToolStripItem[] { toolStripMenuItem });
            return(toolStripMenuItem);
        }
コード例 #12
0
ファイル: Type.cs プロジェクト: jstark/dradis
        //
        private TypeSpec(string value)
        {
            form = TypeForm.Array;

            TypeSpec indexType = new TypeSpec(TypeForm.Subrange);
            // FIXME: Predefined
            // indexType.SetAttribute(TypeKey.SubrangeBaseType, Predefined.IntegerType);
            indexType.SetAttribute(TypeKey.SubrangeMinValue, 1);
            indexType.SetAttribute(TypeKey.SubrangeMaxValue, value.Length);
            SetAttribute(TypeKey.ArrayIndexType, indexType);
            // FIXME: Predefined
            // SetAttribute(TypeKey.ArrayElementType, Predefined.CharType);
            SetAttribute(TypeKey.ArrayElementCount, value.Length);
        }
コード例 #13
0
ファイル: MenuEvent.cs プロジェクト: Stich626/WindowsForms
        private void settings(TypeForm type)
        {
            bool flag = true;

            for (int i = 0; i < FormType.mdiParent.MdiChildren.Length; i++)
            {
                if (FormType.mdiParent.MdiChildren[i] is Settings)
                {
                    Settings settings = (Settings)FormType.mdiParent.MdiChildren[i];
                    if (settings.typeForm == type)
                    {
                        settings.Activate();
                        flag = false;
                    }
                }
            }
            if (flag)
            {
                new Settings(type).Show();
            }
        }
コード例 #14
0
 public Document(TypeForm type)
 {
     typeForm = type;
     new FormCreate(this);
 }
コード例 #15
0
 public Settings(TypeForm type)
 {
     typeForm = type;
     new FormCreate(this);
 }
コード例 #16
0
 public Registry(TypeForm formType)
 {
     typeForm = formType;
     new FormCreate(this);
 }
コード例 #17
0
ファイル: Type.cs プロジェクト: jstark/dradis
 //
 private TypeSpec(TypeForm f)
 {
     form = f;
 }
コード例 #18
0
 /// <summary>
 /// Обновление или добавление нового типа формы
 /// </summary>
 /// <param name="typeForm"></param>
 /// <returns></returns>
 public async Task <ResultCrmDb> AddOrEditTypeForm(TypeForm typeForm)
 {
     return(await AddOrEditModel(typeForm, _reportDbContext.TypeForm));
 }
コード例 #19
0
ファイル: Type.cs プロジェクト: jstark/dradis
 public static TypeSpec CreateType(TypeForm form)
 {
     return new TypeSpec(form);
 }
コード例 #20
0
ファイル: ObjectForm.cs プロジェクト: AlexAbramov/gis
        private void typeButton_Click(object sender, System.EventArgs e)
        {
            TypeForm typeForm = new TypeForm(app, gobj.Type);

            typeForm.ShowDialog(this);
        }
コード例 #21
0
        public async Task <IActionResult> AddTypeForm([FromBody] TypeForm typeForm)
        {
            var result = await _reportManager.AddOrEditTypeForm(typeForm);

            return(Tools.CreateResult(true, "", result));
        }
コード例 #22
0
 private void RecurceAddModels(List <FormModelDto> forms, List <TypeForm> typeForms, List <SolutionModel> models, TypeForm parent, ref int i, ref int parentId)
 {
     foreach (var typeForm in typeForms.Where(f => f.ParentId == parent?.Id))
     {
         var model = new SolutionModel();
         model.Id       = i;
         model.IdModel  = -1;
         model.Expanded = true;
         model.Text     = typeForm.DisplayName;
         model.ParentId = typeForm.ParentId == null ? 0 : parentId;
         var formsAdd = forms.Where(f => f.TypeFormId == typeForm.Id).ToArray();
         if (formsAdd.Length > 0)
         {
             models.Add(model);
         }
         parentId = i;
         i++;
         foreach (var formModelDto in formsAdd)
         {
             var solFormDto = new SolutionModel();
             solFormDto.Id           = i;
             solFormDto.Text         = formModelDto.Caption;
             solFormDto.ParentId     = model.Id;
             solFormDto.Expanded     = true;
             solFormDto.IdModel      = formModelDto.Id;
             solFormDto.TableName    = formModelDto.TableName;
             solFormDto.VueComponent = string.IsNullOrEmpty(formModelDto.VueComponent)
                 ? "DesignerDictionary"
                 : formModelDto.VueComponent;
             models.Add(solFormDto);
             i++;
         }
         RecurceAddModels(forms, typeForms, models, typeForm, ref i, ref parentId);
     }
 }
コード例 #23
0
        private void btnType_Click(object sender, EventArgs e)
        {
            TypeForm typeForm = new TypeForm();

            typeForm.Show();
        }