You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

80 lines
3.1 KiB

using Swift.web.Component.Grid;
using Swift.web.Component.Grid.gridHelper;
using Swift.web.Library;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Swift.web.Remit.Administration.ReferralSetup
{
public partial class ReferPointSetup : System.Web.UI.Page
{
private const string ViewFunctionId = "90400000";
private const string GridName = "grd_bldom";
private readonly SwiftGrid grid = new SwiftGrid();
private readonly RemittanceLibrary swiftLibrary = new RemittanceLibrary();
protected void Page_Load(object sender, EventArgs e)
{
//Authenticate();
if (!IsPostBack)
{
GetStatic.PrintMessage(Page);
}
LoadGrid();
}
private void LoadGrid()
{
grid.FilterList = new List<GridFilter>
{
new GridFilter("PromotionType", "Reward Type", "LT"),
// new GridFilter("is_Active","Active","T")
};
grid.ColumnList = new List<GridColumn>
{
new GridColumn("RowId", "Id", "", "T"),
new GridColumn("PromotionType", "Reward Type", "", "T"),
new GridColumn("Points", "Reward Value", "", "T"),
new GridColumn("IsActive", "Is Active", "", "T")
};
bool allowAddEdit = true;
grid.GridDataSource = SwiftGrid.GridDS.RemittanceDB;
grid.GridName = GridName;
grid.GridType = 1;
grid.ShowAddButton = true;
grid.ShowFilterForm = true;
grid.ShowPagingBar = true;
grid.AddButtonTitleText = "Add New";
grid.RowIdField = "PromotionType";
grid.AddPage = "Manage.aspx";
grid.InputPerRow = 5;
grid.AlwaysShowFilterForm = true;
grid.AllowEdit = true;
grid.AllowEdit = allowAddEdit;
grid.AllowDelete = false;
grid.CustomLinkVariables = "PromotionType";
//grid.EditText = "<a href='Manage.aspx?promotiontype=@detailTitle'>" + "<img src='/images/edit.gif' border='0' alt='Edit' /></a>";
grid.CustomLinkText = "<a href='Manage.aspx?Promotiontype=@PromotionType'>" + "<img src='/images/edit.gif' border='0' alt='Edit' /></a>";
//grid.AddPage = "manage.aspx?Id=" + (GetId() == 0 ? Id() : GetId()) + "";
string sql = "EXEC proc_InsertRewardPoints @flag = 'GET'";
//string sql = "EXEC proc_staticDataValue @flag = 's', @typeId = '8106'";
DataTable gridData = new DataTable();
grid.SetComma();
rpt_grid.InnerHtml = grid.CreateGrid(sql);
}
private void Authenticate()
{
swiftLibrary.CheckAuthentication(ViewFunctionId);
}
}
}