private void InitializeConstructor()
        {
            //ComboFunctions.FillDriverNoCombo(ddlDriver);
            dtpLPDate.Value   = DateTime.Now.ToDate();
            dtpLostDate.Value = DateTime.Now.ToDate();
            FormatChargesGrid();
            grdLister.ShowGroupPanel      = false;
            grdLister.AutoCellFormatting  = true;
            grdLister.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            grdLister.ShowRowHeaderColumn = false;


            //  grdLister.Size = new Size(grdLister.Width, 70);
            grdLister.TableElement.RowHeight = 90;

            objMaster = new LostPropertyBO();
            this.SetProperties((INavigation)objMaster);

            grdLister.AllowAddNewRow = false;


            dtpFromDate.Value = DateTime.Now.ToDate().AddDays(-30);
            dtpTillDate.Value = DateTime.Now.ToDate();

            //  grdLister.TableElement.ROWE
            grdLister.CommandCellClick += new CommandCellClickEventHandler(grdLister_CommandCellClick);
            //txtCustomerMobileNo.TextChanged += new EventHandler(txtCustomerMobileNo_TextChanged);
        }
Пример #2
0
        void Grid_RowsChanging(object sender, GridViewCollectionChangingEventArgs e)
        {
            if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Remove)
            {
                objMaster = new LostPropertyBO();

                try
                {
                    objMaster.GetByPrimaryKey(grdLister.CurrentRow.Cells["Id"].Value.ToInt());

                    objMaster.Delete(objMaster.Current);
                }
                catch (Exception ex)
                {
                    if (objMaster.Errors.Count > 0)
                    {
                        ENUtils.ShowMessage(objMaster.ShowErrors());
                    }
                    else
                    {
                        ENUtils.ShowMessage(ex.Message);
                    }
                    e.Cancel = true;
                }
            }
        }
Пример #3
0
        public frmLostPropertyList()
        {
            InitializeComponent();
            grdLister.CellDoubleClick += new GridViewCellEventHandler(grdLister_CellDoubleClick);
            grdLister.RowsChanging    += new Telerik.WinControls.UI.GridViewCollectionChangingEventHandler(Grid_RowsChanging);
            objMaster = new LostPropertyBO();

            this.SetProperties((INavigation)objMaster);

            grdLister.ShowRowHeaderColumn = false;
            this.Shown += new EventHandler(frmCompanyInvoiceList_Shown);

            grdLister.CommandCellClick += new CommandCellClickEventHandler(grid_CommandCellClick);
        }