private void button2_Click(object sender, EventArgs e) { var brak = new TypeForm(); brak.Show(); Close(); }
/// <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; } }
/// <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); } }
private void button1_Click(object sender, EventArgs e) { dataBase.typeupd(id, textBox2.Text); var brak = new TypeForm(); brak.Show(); Close(); }
public EvaluacionFrm(TypeForm type, MetaType mtype, DEvaluacion evaluacion) { init(); Type = type; MType = mtype; DataFill = evaluacion; }
public MetaFrm(TypeForm type, MetaType mtype, DMeta meta) { init(); Type = type; MType = mtype; DataFill = meta; }
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")); }
public RespuestaPrestacionFrm(DPrestacion prestacion, TypeForm type) { InitializeComponent(); Prestacion = prestacion; Type = type; txtPorcentajePrestacion.KeyDown += new KeyEventHandler(Validaciones.TextBox_KeyDown); }
private void OpenForm(TypeForm type) { Form form = (type == TypeForm.Add ? new AddClientForm() : new EditClientForm()); form.ShowDialog(this); ShowClient(); lbCount.Text = Clients.Count.ToString(); }
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); }
// 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); }
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(); } }
public Document(TypeForm type) { typeForm = type; new FormCreate(this); }
public Settings(TypeForm type) { typeForm = type; new FormCreate(this); }
public Registry(TypeForm formType) { typeForm = formType; new FormCreate(this); }
// private TypeSpec(TypeForm f) { form = f; }
/// <summary> /// Обновление или добавление нового типа формы /// </summary> /// <param name="typeForm"></param> /// <returns></returns> public async Task <ResultCrmDb> AddOrEditTypeForm(TypeForm typeForm) { return(await AddOrEditModel(typeForm, _reportDbContext.TypeForm)); }
public static TypeSpec CreateType(TypeForm form) { return new TypeSpec(form); }
private void typeButton_Click(object sender, System.EventArgs e) { TypeForm typeForm = new TypeForm(app, gobj.Type); typeForm.ShowDialog(this); }
public async Task <IActionResult> AddTypeForm([FromBody] TypeForm typeForm) { var result = await _reportManager.AddOrEditTypeForm(typeForm); return(Tools.CreateResult(true, "", result)); }
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); } }
private void btnType_Click(object sender, EventArgs e) { TypeForm typeForm = new TypeForm(); typeForm.Show(); }