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 { new GridFilter("PromotionType", "Reward Type", "LT"), // new GridFilter("is_Active","Active","T") }; grid.ColumnList = new List { 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 = "" + "Edit"; grid.CustomLinkText = "" + "Edit"; //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); } } }