Commit inicial Ventas Productivo
This commit is contained in:
73
CGame/CatConceptoGastoCorte.aspx.cs
Normal file
73
CGame/CatConceptoGastoCorte.aspx.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class CGame_CatConceptoGastoCorte : ClsPaginas
|
||||
{
|
||||
|
||||
|
||||
|
||||
#region Propiedades
|
||||
|
||||
private int CveConceptoGastoCorte
|
||||
{
|
||||
get { return (ViewState["CveConceptoGastoCorte"] == null) ? 0 : Convert.ToInt32(ViewState["CveConceptoGastoCorte"]); }
|
||||
set { ViewState["CveConceptoGastoCorte"] = value; }
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaConcepto();
|
||||
}
|
||||
}
|
||||
protected void CargaConcepto()
|
||||
{
|
||||
ClsCGame ObjCGame = new ClsCGame();
|
||||
if (ObjCGame.GetConceptoGastoCorte(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvConcepto.DataSource = ObjCGame.DtResultados;
|
||||
}
|
||||
ObjCGame.Dispose();
|
||||
GvConcepto.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
protected void LimpiaConcepto()
|
||||
{
|
||||
TxtConcepto.Text = "";
|
||||
UpModal.Update();
|
||||
}
|
||||
|
||||
protected void LnkAgregarConcepto_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.RegistraScript("$('#DModalConcepto').modal();");
|
||||
LimpiaConcepto();
|
||||
BtnConceptoAdd.Visible = true;
|
||||
BtnConceptoEdit.Visible = false;
|
||||
DivEstatus.Visible = false;
|
||||
UpModal.Update();
|
||||
}
|
||||
|
||||
protected void GvConcepto_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
|
||||
if (Convert.ToBoolean(e.Row.DBCampo("Estatus")) == true)
|
||||
{
|
||||
e.Row.FCLabel("lblestatus").Text = "Activo";
|
||||
e.Row.FCLabel("lblestatus").ForeColor = System.Drawing.Color.Green;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCLabel("lblestatus").Text = "Inactivo";
|
||||
e.Row.FCLabel("lblestatus").ForeColor = System.Drawing.Color.Red;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user