Пример #1
0
        private void dgDoors_UpdateCommand(object source, DataGridCommandEventArgs e)
        {
            TextBox tbName    = (TextBox)e.Item.FindControl("tbName");
            int     door_id   = Int32.Parse(e.Item.Cells[0].Text);
            int     theReturn = new doorData().UpdateDoor(door_id, tbName.Text);

            dgDoors.ItemUpdated(door_id);
            dgDoors.EditItemIndex = -1;
            ShowList();
        }
Пример #2
0
        //list support functions
        private void dgDoors_DeleteCommand(object sender, DataGridCommandEventArgs e)
        {
            //ListReport.Delete(Int32.Parse(e.Item.Cells[0].Text));
            //DelLocation
            int door_id   = Int32.Parse(e.Item.Cells[0].Text);
            int theReturn = new doorData().DelDoor(door_id);

            dgDoors.ItemUpdated(door_id);
            dgDoors.EditItemIndex = -1;
            ShowList();
        }
Пример #3
0
        protected void imgBtnAddRpt_Click(object sender, EventArgs e)
        {
            int newDoor = new doorData().AddBlankDoor(Int32.Parse(Request["LocationID"]));

            ShowList();

            /*
             * if (ddlSelectReport.SelectedValue.ToString() == "2")
             *  Response.Redirect(string.Format("default.aspx?page={0}&reportid=-1", AdvanceListWizardPageIDSetting));
             * else
             *  Response.Redirect(string.Format("default.aspx?page={0}&reportid=-1", ListReportWizardPageIDSetting));
             */
        }
Пример #4
0
        private void ShowList()
        {
            DataTable DataSource = null;
            //CategoryEnable = (ddlReportCategory.Items.Count > 1);
            //CategoryEnable = false;
            //int listcategoryid = (CategoryEnable ? Int32.Parse(ddlReportCategory.SelectedValue.ToString()) : -1);
            //EditEnabled = CurrentModule.Permissions.Allowed(OperationType.Edit, CurrentUser);
            bool EditEnabled = true;

            //dgDoors.Columns[4].Visible = CategoryEnable;

            //get the DataSource
            //DataSource = new ListData().GetPublicReports(ArenaContext.Current.Organization.OrganizationID, listcategoryid, CurrentPerson.PersonID);
            DataSource = new doorData().GetDoorByLocation(Int32.Parse(Request["LocationID"]));

            dgDoors.Columns[5].Visible = true;

            dgDoors.Visible            = true;
            dgDoors.ItemType           = "List";
            dgDoors.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgDoors.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgDoors.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgDoors.AddEnabled         = false;
            dgDoors.AddImageUrl        = "~/images/add_list.gif";
            dgDoors.MoveEnabled        = false;
            dgDoors.DeleteEnabled      = EditEnabled;
            dgDoors.EditEnabled        = EditEnabled;
            dgDoors.MergeEnabled       = false;
            dgDoors.MailEnabled        = false;
            dgDoors.ExportEnabled      = false;
            dgDoors.AllowSorting       = true;
            dgDoors.DataSource         = DataSource;
            dgDoors.DataBind();

            dgDoors.Visible = true;
            //lbAdd.Visible = true;
        }