Commit inicial Ventas Productivo
This commit is contained in:
71
CGame/CatScat.aspx.cs
Normal file
71
CGame/CatScat.aspx.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class CGame_CatScat : ClsPaginas
|
||||
{
|
||||
|
||||
#region Propiedades
|
||||
|
||||
private int CveScat
|
||||
{
|
||||
get { return (ViewState["CveScat"] == null) ? 0 : Convert.ToInt32(ViewState["CveScat"]); }
|
||||
set { ViewState["CveScat"] = value; }
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaScat();
|
||||
}
|
||||
}
|
||||
protected void CargaScat()
|
||||
{
|
||||
ClsCGame ObjCGame = new ClsCGame();
|
||||
if (ObjCGame.GetScat(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvScat.DataSource = ObjCGame.DtResultados;
|
||||
}
|
||||
ObjCGame.Dispose();
|
||||
GvScat.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
protected void LimpiaScat()
|
||||
{
|
||||
TxtScat.Text = "";
|
||||
UpModal.Update();
|
||||
}
|
||||
|
||||
protected void LnkAgregarScat_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.RegistraScript("$('#DModalScat').modal();");
|
||||
LimpiaScat();
|
||||
BtnScatAdd.Visible = true;
|
||||
BtnScatEdit.Visible = false;
|
||||
DivEstatus.Visible = false;
|
||||
UpModal.Update();
|
||||
}
|
||||
|
||||
protected void GvScat_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