本文整理汇总了C#中Ext.Net.JFunction类的典型用法代码示例。如果您正苦于以下问题:C# JFunction类的具体用法?C# JFunction怎么用?C# JFunction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JFunction类属于Ext.Net命名空间,在下文中一共展示了JFunction类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: getPreciarios
protected void getPreciarios()
{
string cliente = Cookies.GetCookie("cookieClienteID").Value;
var success = new JFunction { Fn = "onBuscar_Sucursal" };
if (cliente != null && !cliente.Trim().Equals(""))
{
List<Preciario> lPreciarios = PreciarioBusiness.ObtenerPreciariosActivosPorCliente(cliente);
if (lPreciarios.Count() > 0)
{
sPreciarios.DataSource = lPreciarios;
sPreciarios.DataBind();
}
else
{
X.Msg.Alert("ATENCIÓN", "<p align='center'>EL CLIENTE: "+cliente+" ES INDEFINIDO.</p>", success).Show();
}
}
}
开发者ID:JYovan,项目名称:PROJECT_APP,代码行数:18,代码来源:FormaBuscaPreciariosActivos.aspx.cs
示例2: imgbtnGuardar_Click
//.........这里部分代码省略.........
Usuario oUsuario = (Usuario)Session["Usuario"];
oPreciario.Usuario = oUsuario.ID;
oPreciario.Estatus = strEstatus;
oPreciario.Sucursal = strSucursal;
//8. Insertar en la base de datos
oPreciario.ID = PreciarioBusiness.Insertar(oPreciario);
string categoria = "";
string subcategoria = "";
string subsubcategoria = "";
foreach (PreciarioConcepto sd in lDetallePreciario)
{
//9. Insertar Categoria
if (sd.Tipo.Equals("1"))
{
PreciarioCategoria c = new PreciarioCategoria();
c.Clave = sd.Clave;
c.Preciario = oPreciario.ID;
c.Descripcion = sd.Descripcion;
c.Usuario = oUsuario.ID;
c.Estatus = sd.Estatus;
c.FechaAlta =Convert.ToDateTime(sd.FechaAlta);
categoria =PreciarioCategoriaBuisness.Insertar(c);
}
//10. Insertar SubCategoria
if (sd.Tipo.Equals("2"))
{
PreciarioSubCategoria sc = new PreciarioSubCategoria();
sc.Clave = sd.Clave;
sc.Preciario = oPreciario.ID;
sc.Descripcion = sd.Descripcion;
sc.Categoria = categoria;
sc.Usuario = oUsuario.ID;
sc.Estatus = sd.Estatus;
sc.FechaAlta = Convert.ToDateTime(sd.FechaAlta);
subcategoria= PreciarioSubCategoriaBusiness.Insertar(sc);
}
//11. Insertar SubSubCategoria
if (sd.Tipo.Equals("3"))
{
PreciarioSubSubCategoria ssc = new PreciarioSubSubCategoria();
ssc.Clave = sd.Clave;
ssc.Preciario = oPreciario.ID;
ssc.Descripcion = sd.Descripcion;
ssc.Categoria = categoria;
ssc.SubCategoria = subcategoria;
ssc.Usuario = oUsuario.ID;
ssc.Estatus = sd.Estatus;
ssc.FechaAlta = Convert.ToDateTime(sd.FechaAlta);
subsubcategoria= PreciarioSubSubCategoriaBusiness.Insertar(ssc);
}
//12. Insertar Concepto
if (sd.Tipo.Equals(""))
{
PreciarioConcepto pc = new PreciarioConcepto();
pc.Clave = sd.Clave;
pc.Preciario = oPreciario.ID;
pc.Descripcion = sd.Descripcion;
pc.Unidad = sd.Unidad;
pc.Cantidad = sd.Cantidad;
pc.Utilizada = 0;
pc.Costo = sd.Costo;
pc.Importe = sd.Importe;
pc.Importefinal = 0;
pc.Categoria = categoria;
pc.SubCategoria = subcategoria;
pc.SubSubCategoria = subsubcategoria;
pc.Usuario = oUsuario.ID;
pc.Estatus = sd.Estatus;
pc.FechaAlta = sd.FechaAlta;
PreciarioConceptoBusiness.Insertar(pc);
}
}
//13. Mandar mensaje con el código del Preciario
var success = new JFunction { Fn = "imgbtnGuardar_Click_Success" };
X.Msg.Alert("Registro completo", "<p align='center'>Preciario registrada con ID: <br/>" + oPreciario.ID + ".</p>", success).Show();
}
else
{
//14. Valida que archivo guardar
if (fufArchivoExcel.FileName.Equals(""))
oPreciario.Archivo = strArchivo;
else
oPreciario.Archivo = fufArchivoExcel.FileName;
//15. Tomamos la sucursal y estatus como parametro independiente por que ya esta desabilitada
oPreciario.ID = strcookieEditarPreciario;
oPreciario.Sucursal = strSucursal;
oPreciario.Estatus = strEstatus;
//16. Actualizar los datos del Preciario
PreciarioBusiness.Actualizar(oPreciario);
//17. Mandar mensaje con el código del preciario
var success = new JFunction { Fn = "imgbtnGuardar_Click_Success" };
X.Msg.Alert("Actualización completa", "<p align='center'>Se han actualizado los datos del preciario <br/>" + oPreciario.ID + ".</p>", success).Show();
}
}
开发者ID:JYovan,项目名称:PROJECT_APP,代码行数:101,代码来源:FormaPreciario.aspx.cs
示例3: FilterBy
public virtual void FilterBy(JFunction fn, string scope)
{
this.Call("filterBy", new JRawValue(fn.ToScript()), new JRawValue(scope));
}
开发者ID:hh22333,项目名称:Ext.NET.Community,代码行数:4,代码来源:StoreBase.cs
示例4: Each
public virtual void Each(JFunction fn)
{
this.Call("each", new JRawValue(fn.ToScript()));
}
开发者ID:hh22333,项目名称:Ext.NET.Community,代码行数:4,代码来源:StoreBase.cs
示例5: FindBy
/// <summary>
/// Find the index of the first matching Record in this Store by a function. If the function returns true it is considered a match.
/// </summary>
/// <param name="fn">The function to be called. It will be passed the following parameters:
/// record : Ext.data.Model
/// The record to test for filtering. Access field values using Ext.data.Model.get.
/// id : Object
/// The ID of the Record passed.
/// </param>
/// <returns></returns>
public virtual ModelProxy FindBy(JFunction fn)
{
if (fn.Args == null || fn.Args.Length == 0)
{
fn.Args = new string[] { "record", "id" };
}
string pattern = string.Format("findBy({0})", fn);
return new ModelProxy(this, pattern);
}
开发者ID:hh22333,项目名称:Ext.NET.Community,代码行数:19,代码来源:StoreBase.cs
示例6: Subscribe
/* Public Methods
-----------------------------------------------------------------------------------------------*/
/// <summary>
///
/// </summary>
/// <param name="name"></param>
/// <param name="fn"></param>
public virtual void Subscribe(string name, JFunction fn)
{
this.Call("subscribe", name, new JRawValue(fn.ToScript()));
}
开发者ID:hpj1106,项目名称:Ext.NET.Community,代码行数:12,代码来源:MessageBus.cs
示例7: Cascade
/// <summary>
/// Cascades down the component/container heirarchy from this component (passed in the first call), calling the specified function with each component.
/// </summary>
/// <param name="fn">The function to call</param>
/// <param name="scope">The scope of the function (defaults to current component)</param>
public virtual void Cascade(JFunction fn, string scope)
{
this.Call("cascade", JRawValue.From(fn.ToScript()), JRawValue.From(scope));
}
开发者ID:hh22333,项目名称:Ext.NET.Community,代码行数:9,代码来源:AbstractContainer.cs
示例8: Confirm
public MessageBox Confirm(string title, string msg, JFunction fn, string scope)
{
MessageBoxConfig config = new MessageBoxConfig();
config.Title = title;
config.Message = msg;
config.Buttons = Button.YESNO;
config.Fn = fn;
config.Scope = scope;
config.Icon = Icon.QUESTION;
return this.Configure(config);
}
开发者ID:emayk,项目名称:Ext.NET.Pro,代码行数:12,代码来源:MessageBox.Confirm.cs
示例9: Hide
/// <summary>
/// Hides this Component, setting it to invisible using the configured hideMode.
/// </summary>
/// <param name="animateTarget">only valid for floating Components such as Windows or ToolTips, or regular Components which have been configured with floating: true.. The target to which the Component should animate while hiding (defaults to null with no animation)</param>
/// <param name="callback">A callback function to call after the Component is hidden.</param>
/// <param name="scope">The scope (this reference) in which the callback is executed. Defaults to this Component.</param>
public virtual void Hide(ComponentBase animateTarget, JFunction callback, string scope)
{
this.Call("hide", new JRawValue(animateTarget.ClientID), callback, new JRawValue(scope));
}
开发者ID:emayk,项目名称:Ext.NET.Pro,代码行数:10,代码来源:ComponentBase.cs
示例10: Prompt
/// <summary>
/// Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt). The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked (could also be the top-right close button) and the text that was entered will be passed as the two parameters to the callback.
/// </summary>
/// <param name="title">The title bar text</param>
/// <param name="msg">The message box body text</param>
/// <param name="fn">(optional) The callback function invoked after the message box is closed</param>
public MessageBox Prompt(string title, string msg, JFunction fn)
{
return this.Prompt(title, msg, fn, "");
}
开发者ID:hpj1106,项目名称:Ext.NET.Community,代码行数:10,代码来源:MessageBox.Prompt.cs
示例11: imgbtnGuardar_Click
//.........这里部分代码省略.........
break;
case "txtfProveedorEnergia":
oSucursal.ProveedorEnergia = sd.Value;
break;
case "nfSuperficie":
oSucursal.Superficie = Convert.ToInt32(sd.Value);
break;
case "txtfCoordinadorNombre":
oSucursal.CoordinadorNombre = sd.Value;
break;
case "txtfCoordinadorAPaterno":
oSucursal.CoordinadorAPaterno = sd.Value;
break;
case "txtfCoordinadorAMaterno":
oSucursal.CoordinadorAMaterno = sd.Value;
break;
case "txtfCalle":
oSucursal.Calle = sd.Value;
break;
case "txtfEntreCalles":
oSucursal.EntreCalles = sd.Value;
break;
case "txtfNoExterior":
oSucursal.NoExterior = sd.Value;
break;
case "txtfNoInterior":
oSucursal.NoInterior = sd.Value;
break;
//case "txtfCodigoPostal":
// oSucursal.CodigoPostal = Convert.ToInt32(sd.Value);
// break;
//case "cmbColonia":
// oSucursal.Colonia = sd.Value;
// break;
//case "cmbEstado":
// oSucursal.Estado = sd.Value;
// break;
//case "cmbMunicipio":
// oSucursal.Municipio = sd.Value;
// break;
case "cmbProveedor":
oSucursal.Contratista = sd.Value;
break;
case "dfInicioObra":
oSucursal.InicioObra = Convert.ToDateTime(sd.Value);
break;
case "dfFechaAlta":
oSucursal.FechaAlta = Convert.ToDateTime(sd.Value);
break;
case "cmbEstatus":
oSucursal.Estatus = sd.Value;
break;
case "cmbEmpresaSupervisora":
oSucursal.EmpresaSupervisora = sd.Value == null || sd.Value.Equals("") ? "" : sd.Value;
break;
case "cmbTipoConcepto":
oSucursal.TipoConcepto = sd.Value == null || sd.Value.Equals("") ? "" : sd.Value;
break;
case "txtTipoObra":
oSucursal.TipoObra = sd.Value == null || sd.Value.Equals("") ? "" : sd.Value;
break;
}
}
oSucursal.FinObra = Convert.ToDateTime(strFinObra);
oSucursal.SemanasObra = Convert.ToInt16(strSemanasObra);
string strcookieCliente = Cookies.GetCookie("cookieEditarCliente").Value != null || Cookies.GetCookie("cookieEditarCliente").Value.Length > 0 ? Cookies.GetCookie("cookieEditarCliente").Value : "";
oSucursal.Cliente = strcookieCliente;
if(strcookieCliente != null && !strcookieCliente.Equals("")){
oSucursal.Cliente = strcookieCliente;
}
//4. Validar si es nuevo o es uno existente
if (strcookieEditarSucursal.Equals("Nuevo"))
{
//5. Insertar en la base de datos
oSucursal.FechaAlta = DateTime.Now;
oSucursal.Estatus = "ALTA";
if (SucursalBusiness.ObtenerCREnSucursales(oSucursal.CR, strcookieCliente))
{
var success = new JFunction { Fn = "imgbtnGuardar_Click_SuccessCR" };
X.Msg.Alert("Alerta", "<p align='center'>El cliente ya posee esta sucursal registrada con CR: <br/>" + oSucursal.CR + ".</p>", success).Show();
}else{
oSucursal.ID = SucursalBusiness.Insertar(oSucursal);
//6. Mandar mensaje con el código del proveedor
var success = new JFunction { Fn = "imgbtnGuardar_Click_Success" };
X.Msg.Alert("Registro completo", "<p align='center'>Sucursal registrada con ID: <br/>" + oSucursal.ID + ".</p>", success).Show();
}
}
else
{
oSucursal.ID = strcookieEditarSucursal;
oSucursal.Estatus = strEstatus;
//7. Actualizar los datos del proveedor
SucursalBusiness.Actualizar(oSucursal);
//8. Mandar mensaje con el código del proveedor
var success = new JFunction { Fn = "imgbtnGuardar_Click_Success" };
X.Msg.Alert("Actualización completa", "<p align='center'>Se han actualizado los datos de la sucursal <br/>" + oSucursal.ID + ".</p>", success).Show();
}
}
开发者ID:JYovan,项目名称:PROJECT_APP,代码行数:101,代码来源:FormaSucursal.aspx.cs
示例12: WriteJson
public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, JsonSerializer serializer)
{
if (value != null && value is ComponentDirectEvent)
{
ComponentDirectEvent directEvent = (ComponentDirectEvent)value;
if (!directEvent.IsDefault)
{
Control owner = null;
MessageBusDirectEvent busEvent = directEvent as MessageBusDirectEvent;
if (this.Owner is BaseItem)
{
owner = ((BaseItem)this.Owner).Owner;
}
else if (this.Owner is Control)
{
owner = (Control)this.Owner;
}
directEvent.Owner = owner;
directEvent.ExtraParams.Owner = owner;
foreach (Parameter param in directEvent.ExtraParams)
{
param.Owner = owner;
}
HandlerConfig cfg = directEvent.GetListenerConfig();
if (cfg.Delay == 0 && directEvent.HasOwnDelay)
{
cfg.Delay = -1;
}
string deScope = directEvent.Scope;
directEvent.ClearListenerConfig();
string configObject = new ClientConfig().SerializeInternal(directEvent, directEvent.Owner);
StringBuilder cfgObj = new StringBuilder(configObject.Length + 64);
cfgObj.Append(configObject);
cfgObj.Remove(cfgObj.Length - 1, 1);
cfgObj.AppendFormat("{0}control:this", configObject.Length > 2 ? "," : "");
if (busEvent != null)
{
cfgObj.Append(",eventType:'bus'");
}
if (busEvent == null)
{
if (this.PropertyName != "Click")
{
cfgObj.AppendFormat(",action:'{0}'", this.PropertyName);
}
}
else
{
cfgObj.AppendFormat(",action:'{0}:'+name", busEvent.Name);
}
cfgObj.Append("}");
if (this.PropertyName.IsNotEmpty())
{
directEvent.SetArgumentList(this.Owner.GetType().GetProperty(this.PropertyName));
}
JFunction jFunction = new JFunction("Ext.net.directRequest(".ConcatWith(cfgObj.ToString(), ");"), directEvent.ArgumentList.ToArray());
string scope = deScope.IsEmpty() || deScope == "this" ? "" : deScope;
StringBuilder sb = new StringBuilder();
sb.Append("{");
sb.Append("fn:").Append(jFunction.ToScript()).Append(",");
if (scope.Length > 0)
{
sb.Append("scope:").Append(scope).Append(",");
}
if (busEvent != null)
{
if (busEvent.Bus.IsNotEmpty())
{
sb.Append("bus:'").Append(busEvent.Bus).Append("',");
}
if (busEvent.Name.IsNotEmpty())
{
sb.Append("name:'").Append(busEvent.Name).Append("',");
}
}
string cfgStr = cfg.Serialize();
if (cfgStr != "{}")
{
//.........这里部分代码省略.........
开发者ID:hh22333,项目名称:Ext.NET.Community,代码行数:101,代码来源:DirectEventJsonConverter.cs
示例13: Mon
public virtual void Mon(Observable el, string eventName, JFunction fn, string scope)
{
this.Call("mon", new JRawValue(el.ClientID), eventName, fn, new JRawValue(scope));
}
开发者ID:rajjan,项目名称:Ext.NET.Community,代码行数:4,代码来源:Observable.cs
示例14: Show
public virtual void Show(string animTarget, JFunction callback)
{
this.Call("show", animTarget, callback);
}
开发者ID:emayk,项目名称:Ext.NET.Pro,代码行数:4,代码来源:ComponentBase.cs
示例15: SetArrowHandler
/// <summary>
/// Assigns this button's click handler
/// </summary>
/// <param name="function">The function to call when the arrow is clicked</param>
public virtual void SetArrowHandler(JFunction function)
{
this.Call("setArrowHandler", new JRawValue(function.ToScript()));
}
开发者ID:emayk,项目名称:Ext.NET.Pro,代码行数:8,代码来源:SplitButtonBase.cs
示例16: AddListener
public virtual void AddListener(string eventName, JFunction fn)
{
this.AddListener(eventName, fn.ToScript());
}
开发者ID:rajjan,项目名称:Ext.NET.Community,代码行数:4,代码来源:Observable.cs
示例17: On
public virtual void On(string eventName, JFunction fn, string scope)
{
this.AddListener(eventName, "<raw>" + fn.ToScript(), scope);
}
开发者ID:rajjan,项目名称:Ext.NET.Community,代码行数:4,代码来源:Observable.cs
示例18: GuaranteeRange
public virtual void GuaranteeRange(int start, int end, JFunction callback)
{
this.Call("guaranteeRange", start, end, JRawValue.From(callback.ToScript()));
}
开发者ID:hh22333,项目名称:Ext.NET.Community,代码行数:4,代码来源:StoreBase.cs
注:本文中的Ext.Net.JFunction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论