Beispiel #1
0
        protected void btnNewCustomProp_Click(object sender, EventArgs e)
        {
            DBHelper dbh = new DBHelper("INSERT INTO custompropertytypes SET Title=?Title, FormatString=?FormatString, Type=?Type, Flags=?Flags, Description=?Desc, SortKey=''");

            dbh.DoNonQuery((comm) =>
            {
                comm.Parameters.AddWithValue("Title", txtCustomPropTitle.Text);
                comm.Parameters.AddWithValue("FormatString", txtCustomPropFormat.Text);
                comm.Parameters.AddWithValue("Desc", txtCustomPropDesc.Text);
                comm.Parameters.AddWithValue("Type", Convert.ToInt32(cmbCustomPropType.SelectedValue, CultureInfo.InvariantCulture));
                comm.Parameters.AddWithValue("Flags", Convert.ToInt32(lblFlags.Text, CultureInfo.InvariantCulture));
            });

            CustomPropertyType.FlushGlobalCache();
            FlushCache();
            gvCustomProps.DataBind();
            txtCustomPropTitle.Text         = txtCustomPropFormat.Text = "";
            cmbCustomPropType.SelectedIndex = 0;
            lblFlags.Text = Convert.ToString(0, CultureInfo.CurrentCulture);
            foreach (ListItem li in CheckBoxList1.Items)
            {
                li.Selected = false;
            }
        }
Beispiel #2
0
 protected void CustPropsRowEdited(object sender, EventArgs e)
 {
     CustomPropertyType.FlushGlobalCache();
 }