protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1 = new SuperForm();
        SuperForm1.ID = "SuperForm1"; 
        SuperForm1.Title="Registration Form";
        SuperForm1.AutoGenerateRows = false;
        SuperForm1.AutoGenerateInsertButton = false;
        SuperForm1.AutoGenerateEditButton = false;
        SuperForm1.AutoGenerateDeleteButton = false;
        SuperForm1.DataKeyNames = new string[] { "OrderID" };
        SuperForm1.AllowPaging = false;
        SuperForm1.ItemInserting += SuperForm1_Inserting;
        SuperForm1.DefaultMode = DetailsViewMode.Insert;
            
        CompareValidator compareEmail = new CompareValidator();
        compareEmail.ID="CompareValidator1";
        compareEmail.ValidationGroup="Group1";
        compareEmail.ControlToCompare="SuperForm1_EmailAddress";
        compareEmail.ErrorMessage="*";
        
        Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField();
        field1.DataField = "EmailAddress";
        field1.HeaderText = "E-mail Address";
        field1.Required = true;
        
        Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField();
        field2.DataField = "ConfirmEmailAddress";
        field2.HeaderText = "Confirm E-mail";
        field2.Required = true;
        field2.Validators.Add(compareEmail);

        Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField();
        field3.DataField = "FirstName";
        field3.HeaderText = "First Name";
        field3.Required = true;

        Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField();
        field4.DataField = "LastName";
        field4.HeaderText = "Last Name";
        field4.Required = true;

        Obout.SuperForm.CommandField field5 = new Obout.SuperForm.CommandField();
        field5.ShowInsertButton = true;
        field5.ShowCancelButton = false; 
        field5.ButtonType = ButtonType.Button; 
        field5.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
        field5.HeaderText = "OrderDate";
     
        SuperForm1.Fields.Add(field1);
        SuperForm1.Fields.Add(field2);
        SuperForm1.Fields.Add(field3);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field5);

        SuperForm1Container.Controls.Add(SuperForm1);

    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1                          = new SuperForm();
        SuperForm1.ID                       = "SuperForm1";
        SuperForm1.Title                    = "Registration Form";
        SuperForm1.AutoGenerateRows         = false;
        SuperForm1.AutoGenerateInsertButton = false;
        SuperForm1.AutoGenerateEditButton   = false;
        SuperForm1.AutoGenerateDeleteButton = false;
        SuperForm1.DataKeyNames             = new string[] { "OrderID" };
        SuperForm1.AllowPaging              = false;
        SuperForm1.ItemInserting           += SuperForm1_Inserting;
        SuperForm1.DefaultMode              = DetailsViewMode.Insert;

        CompareValidator compareEmail = new CompareValidator();

        compareEmail.ID = "CompareValidator1";
        compareEmail.ValidationGroup  = "Group1";
        compareEmail.ControlToCompare = "SuperForm1_EmailAddress";
        compareEmail.ErrorMessage     = "*";

        Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField();
        field1.DataField  = "EmailAddress";
        field1.HeaderText = "E-mail Address";
        field1.Required   = true;

        Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField();
        field2.DataField  = "ConfirmEmailAddress";
        field2.HeaderText = "Confirm E-mail";
        field2.Required   = true;
        field2.Validators.Add(compareEmail);

        Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField();
        field3.DataField  = "FirstName";
        field3.HeaderText = "First Name";
        field3.Required   = true;

        Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField();
        field4.DataField  = "LastName";
        field4.HeaderText = "Last Name";
        field4.Required   = true;

        Obout.SuperForm.CommandField field5 = new Obout.SuperForm.CommandField();
        field5.ShowInsertButton          = true;
        field5.ShowCancelButton          = false;
        field5.ButtonType                = ButtonType.Button;
        field5.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
        field5.HeaderText                = "OrderDate";

        SuperForm1.Fields.Add(field1);
        SuperForm1.Fields.Add(field2);
        SuperForm1.Fields.Add(field3);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field5);

        SuperForm1Container.Controls.Add(SuperForm1);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1 = new SuperForm();
        SuperForm1.ID = "SuperForm1"; 
        SuperForm1.AutoGenerateRows = false;
        SuperForm1.DefaultMode = DetailsViewMode.Insert;
        SuperForm1.ItemInserting += SuperForm1_Inserting;

        Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField();
        field1.DataField = "FirstName";
        field1.HeaderText = "First Name";

        Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField();
        field2.DataField = "LastName";
        field2.HeaderText = "Last Name";

        Obout.SuperForm.DropDownListField field3 = new Obout.SuperForm.DropDownListField();
        field3.DataField = "CountryID";
        field3.HeaderText = "Country";
        field3.Required = true;
        field3.DataSourceID = "CountriesDataSource";
        field3.DataValueField = "CountryID";
        field3.DataTextField = "CountryName";
        field3.Default = "219";
        field3.FieldsToEnable = "StateID";
        field3.EnablingValues = "219";
        field3.FieldsToDisable = "Province";
        field3.DisablingValues = "219";

        Obout.SuperForm.DropDownListField field4 = new Obout.SuperForm.DropDownListField();
        field4.DataField = "StateID";
        field4.HeaderText = "State / Province";
        field4.Required = true;
        field4.DataSourceID = "StatesDataSource";
        field4.DataValueField = "State";
        field4.DataTextField = "State";

        Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField();
        field5.DataField = "Province";

        Obout.SuperForm.CommandField field6 = new Obout.SuperForm.CommandField();
        field6.ShowInsertButton = true;
        field6.ShowCancelButton = false;
        field6.ButtonType = ButtonType.Button;
        field6.ItemStyle.HorizontalAlign = HorizontalAlign.Center;

        SuperForm1.Fields.Add(field1);
        SuperForm1.Fields.Add(field2);
        SuperForm1.Fields.Add(field3);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field5);
        SuperForm1.Fields.Add(field6);

        SuperForm1Container.Controls.Add(SuperForm1);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1    = new SuperForm();
        SuperForm1.ID = "SuperForm1";
        SuperForm1.AutoGenerateRows = false;
        SuperForm1.DefaultMode      = DetailsViewMode.Insert;
        SuperForm1.ItemInserting   += SuperForm1_Inserting;

        Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField();
        field1.DataField  = "FirstName";
        field1.HeaderText = "First Name";

        Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField();
        field2.DataField  = "LastName";
        field2.HeaderText = "Last Name";

        Obout.SuperForm.DropDownListField field3 = new Obout.SuperForm.DropDownListField();
        field3.DataField       = "CountryID";
        field3.HeaderText      = "Country";
        field3.Required        = true;
        field3.DataSourceID    = "CountriesDataSource";
        field3.DataValueField  = "CountryID";
        field3.DataTextField   = "CountryName";
        field3.Default         = "219";
        field3.FieldsToEnable  = "StateID";
        field3.EnablingValues  = "219";
        field3.FieldsToDisable = "Province";
        field3.DisablingValues = "219";

        Obout.SuperForm.DropDownListField field4 = new Obout.SuperForm.DropDownListField();
        field4.DataField      = "StateID";
        field4.HeaderText     = "State / Province";
        field4.Required       = true;
        field4.DataSourceID   = "StatesDataSource";
        field4.DataValueField = "State";
        field4.DataTextField  = "State";

        Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField();
        field5.DataField = "Province";

        Obout.SuperForm.CommandField field6 = new Obout.SuperForm.CommandField();
        field6.ShowInsertButton          = true;
        field6.ShowCancelButton          = false;
        field6.ButtonType                = ButtonType.Button;
        field6.ItemStyle.HorizontalAlign = HorizontalAlign.Center;

        SuperForm1.Fields.Add(field1);
        SuperForm1.Fields.Add(field2);
        SuperForm1.Fields.Add(field3);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field5);
        SuperForm1.Fields.Add(field6);

        SuperForm1Container.Controls.Add(SuperForm1);
    }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1                          = new SuperForm();
        SuperForm1.ID                       = "SuperForm1";
        SuperForm1.Title                    = "Registration Form";
        SuperForm1.AutoGenerateRows         = false;
        SuperForm1.AutoGenerateInsertButton = false;
        SuperForm1.AutoGenerateEditButton   = false;
        SuperForm1.AutoGenerateDeleteButton = false;
        SuperForm1.DataKeyNames             = new string[] { "Order ID" };
        SuperForm1.AllowPaging              = false;
        SuperForm1.DefaultMode              = DetailsViewMode.Insert;
        SuperForm1.DataBound               += SuperForm1_DataBound;
        SuperForm1.ItemInserting           += SuperForm1_Inserting;

        Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField();
        field1.DataField  = "UserName";
        field1.HeaderText = "Username";
        field1.Required   = true;

        Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField();
        field2.DataField  = "Password";
        field2.HeaderText = "Password";
        field2.Required   = true;

        Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField();
        field3.DataField  = "FirstName";
        field3.HeaderText = "First Name";
        field3.Required   = true;

        Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField();
        field4.DataField  = "LastName";
        field4.HeaderText = "Last Name";
        field4.Required   = true;

        Obout.SuperForm.CommandField field5 = new Obout.SuperForm.CommandField();
        field5.ShowInsertButton          = true;
        field5.ShowCancelButton          = false;
        field5.InsertText                = "Register";
        field5.ButtonType                = ButtonType.Button;
        field5.ItemStyle.HorizontalAlign = HorizontalAlign.Center;

        SuperForm1.Fields.Add(field1);
        SuperForm1.Fields.Add(field2);
        SuperForm1.Fields.Add(field3);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field5);

        SuperForm1Container.Controls.Add(SuperForm1);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1                        = new SuperForm();
        SuperForm1.ID                     = "SuperForm1";
        SuperForm1.DataSourceID           = "SqlDataSource1";
        SuperForm1.AutoGenerateRows       = true;
        SuperForm1.AutoGenerateDateFields = true;
        SuperForm1.DataKeyNames           = new string[] { "OrderID" };
        SuperForm1.AllowPaging            = true;
        SuperForm1.DefaultMode            = DetailsViewMode.Edit;

        Obout.SuperForm.CommandField field1 = new Obout.SuperForm.CommandField();


        if (ButtonType1.Checked)
        {
            field1.ButtonType = ButtonType.Button;
        }
        else if (ButtonType2.Checked)
        {
            field1.ButtonType     = ButtonType.Image;
            field1.EditImageUrl   = "resources/icons/Edit.png";
            field1.DeleteImageUrl = "resources/icons/Delete.png";
            field1.NewImageUrl    = "resources/icons/Add.png";
            field1.InsertImageUrl = "resources/icons/Save.png";
            field1.UpdateImageUrl = "resources/icons/Save.png";
            field1.CancelImageUrl = "resources/icons/Delete.png";
        }
        else
        {
            field1.ButtonType = ButtonType.Link;
        }

        field1.ShowCancelButton = ShowCancelButton.Checked;
        field1.ShowDeleteButton = ShowDeleteButton.Checked;
        field1.ShowEditButton   = ShowEditButton.Checked;
        field1.ShowInsertButton = ShowInsertButton.Checked;
        SuperForm1.Fields.Add(field1);
        SuperForm1Container.Controls.Add(SuperForm1);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1 = new SuperForm();
        SuperForm1.ID = "SuperForm1"; 
        SuperForm1.DataSourceID = "SqlDataSource1";
        SuperForm1.AutoGenerateRows = true;
        SuperForm1.AutoGenerateDateFields = true;
        SuperForm1.DataKeyNames = new string[] { "OrderID" };
        SuperForm1.AllowPaging = true;
        SuperForm1.DefaultMode = DetailsViewMode.Edit;
        
        Obout.SuperForm.CommandField field1 = new Obout.SuperForm.CommandField();
       

        if (ButtonType1.Checked)
        {
            field1.ButtonType = ButtonType.Button;
        }
        else if (ButtonType2.Checked)
        {
            field1.ButtonType = ButtonType.Image;
            field1.EditImageUrl = "resources/icons/Edit.png";
            field1.DeleteImageUrl = "resources/icons/Delete.png";
            field1.NewImageUrl = "resources/icons/Add.png";
            field1.InsertImageUrl = "resources/icons/Save.png";
            field1.UpdateImageUrl = "resources/icons/Save.png";
            field1.CancelImageUrl = "resources/icons/Delete.png";
        }
        else
        {
            field1.ButtonType = ButtonType.Link;
        }

        field1.ShowCancelButton = ShowCancelButton.Checked;
        field1.ShowDeleteButton = ShowDeleteButton.Checked;
        field1.ShowEditButton = ShowEditButton.Checked;
        field1.ShowInsertButton = ShowInsertButton.Checked;
        SuperForm1.Fields.Add(field1);
        SuperForm1Container.Controls.Add(SuperForm1);
    }
Ejemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1                       = new SuperForm();
        SuperForm1.ID                    = "SuperForm1";
        SuperForm1.Title                 = "Order Details";
        SuperForm1.DataSourceID          = "SqlDataSource1";
        SuperForm1.AutoGenerateRows      = false;
        SuperForm1.DataKeyNames          = new string[] { "OrderID" };
        SuperForm1.AllowPaging           = true;
        SuperForm1.AllowDataKeysInsert   = false;
        SuperForm1.EnableModelValidation = true;
        SuperForm1.DefaultMode           = DetailsViewMode.Edit;
        SuperForm1.ModeChanged          += SuperForm1_ModeChanged;

        Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField();
        field1.DataField     = "OrderID";
        field1.HeaderText    = "Order ID";
        field1.ReadOnly      = true;
        field1.InsertVisible = false;
        field1.FieldSetID    = "FieldSet1";

        Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField();
        field2.DataField  = "ShipName";
        field2.HeaderText = "Ship Name";
        field2.FieldSetID = "FieldSet1";

        Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField();
        field3.DataField  = "ShipCity";
        field3.HeaderText = "Ship City";
        field3.FieldSetID = "FieldSet1";

        Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField();
        field4.DataField  = "ShipCountry";
        field4.HeaderText = "Ship Country";
        field4.FieldSetID = "FieldSet1";

        Obout.SuperForm.CommandField field5 = new Obout.SuperForm.CommandField();
        field5.ButtonType       = ButtonType.Button;
        field5.ShowEditButton   = true;
        field5.ShowDeleteButton = true;
        field5.ShowInsertButton = true;
        field5.FieldSetID       = "FieldSet2";

        Obout.SuperForm.FieldSetRow fieldSetRow1 = new Obout.SuperForm.FieldSetRow();
        Obout.SuperForm.FieldSet    fieldSet1    = new Obout.SuperForm.FieldSet();
        fieldSet1.ID = "FieldSet1";
        fieldSetRow1.Items.Add(fieldSet1);

        Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow();
        Obout.SuperForm.FieldSet    fieldSet2    = new Obout.SuperForm.FieldSet();
        fieldSet2.ID = "FieldSet2";
        fieldSet2.HorizontalAlign = HorizontalAlign.NotSet;
        fieldSet2.CssClass        = "hidden-buttons";
        fieldSetRow2.Items.Add(fieldSet2);

        SuperForm1.FieldSets.Add(fieldSetRow1);
        SuperForm1.FieldSets.Add(fieldSetRow2);

        SuperForm1.Fields.Add(field1);
        SuperForm1.Fields.Add(field2);
        SuperForm1.Fields.Add(field3);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field5);


        SuperForm1Container.Controls.Add(SuperForm1);

        if (!IsPostBack)
        {
            UpdateButtonsState();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1    = new SuperForm();
        SuperForm1.ID = "SuperForm1";
        SuperForm1.AutoGenerateRows = false;
        SuperForm1.Width            = Unit.Pixel(630);
        SuperForm1.Title            = "Payment Information";
        SuperForm1.FolderStyle      = "styles/black_glass";

        SuperForm1.DefaultMode    = DetailsViewMode.Insert;
        SuperForm1.ItemInserting += SuperForm1_Inserting;
        SuperForm1.DataBound     += SuperForm1_DataBound;

        Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField();
        field5.DataField          = "CardNumber";
        field5.HeaderText         = "Card Number";
        field5.FieldSetID         = "FieldSet2";
        field5.Required           = true;
        field5.ControlStyle.Width = Unit.Pixel(150);

        /*MaskedEditExtender extender1 = new MaskedEditExtender();
         * extender1.ID = "MaskedEditExtender1";
         * extender1.Mask = "9999-9999-9999-9999";
         * extender1.MessageValidatorTip = true;
         * extender1.MaskType = MaskedEditType.Number;
         * field5.Masks.Add(extender1);*/

        Obout.SuperForm.DropDownListField field6 = new Obout.SuperForm.DropDownListField();
        field6.DataField          = "ExpirationYear";
        field6.HeaderText         = "Expiration Year";
        field6.FieldSetID         = "FieldSet2";
        field6.ControlStyle.Width = 93;
        field6.Required           = true;

        Obout.SuperForm.DropDownListField field7 = new Obout.SuperForm.DropDownListField();
        field7.DataField          = "ExpirationMonth";
        field7.HeaderText         = "ExpirationMonth";
        field7.FieldSetID         = "FieldSet2";
        field7.ControlStyle.Width = 117;
        field7.Required           = true;

        Obout.SuperForm.BoundField field8 = new Obout.SuperForm.BoundField();
        field8.DataField          = "CIN";
        field8.HeaderText         = "Security Code";
        field8.FieldSetID         = "FieldSet2";
        field8.ControlStyle.Width = 83;
        field8.Required           = true;
        field8.MaxLength          = 3;

        /*FilteredTextBoxExtender numbers = new FilteredTextBoxExtender();
         * numbers.FilterType = FilterTypes.Numbers;
         * field8.Filters.Add(numbers);*/

        Obout.SuperForm.TemplateField dummyField = new Obout.SuperForm.TemplateField();
        dummyField.FieldSetID      = "FieldSet3";
        dummyField.ItemTemplate    = new DummyItemTemplate();
        dummyField.ItemStyle.Width = 150;

        Obout.SuperForm.CheckBoxField field4 = new Obout.SuperForm.CheckBoxField();
        field4.DataField       = "SameAsBilling";
        field4.FieldSetID      = "FieldSet4";
        field4.Text            = "Same as the billing";
        field4.FieldsToDisable = "UserCompanyName";
        field4.FieldsToDisable = "UserCompanyName,UserFirstName,UserLastName,UserEmailAddress,UserAddress,UserCountryID,UserStateID,UserProvince,UserZip,UserVatID,UserPhone,UserFax";
        field4.ItemStyle.Width = 150;

        Obout.SuperForm.BoundField field9 = new Obout.SuperForm.BoundField();
        field9.DataField  = "BillingCompanyName";
        field9.HeaderText = "Company Name";
        field9.FieldSetID = "FieldSet3";

        Obout.SuperForm.BoundField field10 = new Obout.SuperForm.BoundField();
        field10.DataField  = "BillingFirstName";
        field10.HeaderText = "First Name";
        field10.FieldSetID = "FieldSet3";
        field10.Required   = true;

        Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField();
        field11.DataField  = "BillingLastName";
        field11.HeaderText = "Last Name";
        field11.FieldSetID = "FieldSet3";
        field11.Required   = true;

        Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField();
        field12.DataField  = "BillingEmailAddress";
        field12.HeaderText = "Email Address";
        field12.FieldSetID = "FieldSet3";
        field12.Required   = true;

        Obout.SuperForm.MultiLineField field13 = new Obout.SuperForm.MultiLineField();
        field13.DataField  = "BillingAddress";
        field13.HeaderText = "Address";
        field13.FieldSetID = "FieldSet3";
        field13.Required   = true;

        Obout.SuperForm.DropDownListField field14 = new Obout.SuperForm.DropDownListField();
        field14.DataField       = "BillingCountryID";
        field14.HeaderText      = "Country";
        field14.FieldSetID      = "FieldSet3";
        field14.Required        = true;
        field14.DataSourceID    = "CountriesDataSource";
        field14.DataValueField  = "CountryID";
        field14.DataTextField   = "CountryName";
        field14.Default         = "219";
        field14.FieldsToEnable  = "BillingStateID";
        field14.EnablingValues  = "219";
        field14.FieldsToDisable = "BillingProvince";
        field14.DisablingValues = "219";

        Obout.SuperForm.DropDownListField field15 = new Obout.SuperForm.DropDownListField();
        field15.DataField      = "BillingStateID";
        field15.HeaderText     = "State";
        field15.FieldSetID     = "FieldSet3";
        field15.Required       = true;
        field15.DataSourceID   = "StatesDataSource";
        field15.DataValueField = "State";
        field15.DataTextField  = "State";

        Obout.SuperForm.BoundField field16 = new Obout.SuperForm.BoundField();
        field16.DataField  = "BillingProvince";
        field16.FieldSetID = "FieldSet3";

        Obout.SuperForm.BoundField field17 = new Obout.SuperForm.BoundField();
        field17.DataField  = "BillingZip";
        field17.HeaderText = "Zip Code / Postal Code";
        field17.FieldSetID = "FieldSet3";

        Obout.SuperForm.BoundField field18 = new Obout.SuperForm.BoundField();
        field18.DataField  = "BillingVatID";
        field18.HeaderText = "VAT Exemption ID";
        field18.FieldSetID = "FieldSet3";

        Obout.SuperForm.BoundField field19 = new Obout.SuperForm.BoundField();
        field19.DataField  = "BillingPhone";
        field19.HeaderText = "Phone";
        field19.FieldSetID = "FieldSet3";

        /*MaskedEditExtender extender2 = new MaskedEditExtender();
         * extender2.ID = "MaskedEditExtender2";
         * extender2.Mask = "(999)999-9999";
         * extender2.MaskType = MaskedEditType.Number;
         * field19.Masks.Add(extender2);*/

        Obout.SuperForm.BoundField field20 = new Obout.SuperForm.BoundField();
        field20.DataField  = "BillingFax";
        field20.HeaderText = "Fax";
        field20.FieldSetID = "FieldSet3";

        /*MaskedEditExtender extender3 = new MaskedEditExtender();
         * extender3.ID = "MaskedEditExtender3";
         * extender3.Mask = "(999)999-9999";
         * extender3.MaskType = MaskedEditType.Number;
         * field20.Masks.Add(extender3);*/

        Obout.SuperForm.BoundField field21 = new Obout.SuperForm.BoundField();
        field21.DataField  = "UserCompanyName";
        field21.HeaderText = "Company Name";
        field21.FieldSetID = "FieldSet4";

        Obout.SuperForm.BoundField field22 = new Obout.SuperForm.BoundField();
        field22.DataField  = "UserFirstName";
        field22.HeaderText = "First Name";
        field22.FieldSetID = "FieldSet4";

        Obout.SuperForm.BoundField field23 = new Obout.SuperForm.BoundField();
        field23.DataField  = "UserLastName";
        field23.HeaderText = "Last Name";
        field23.FieldSetID = "FieldSet4";

        Obout.SuperForm.BoundField field24 = new Obout.SuperForm.BoundField();
        field24.DataField  = "UserEmailAddress";
        field24.HeaderText = "Email Address";
        field24.FieldSetID = "FieldSet4";

        Obout.SuperForm.MultiLineField field25 = new Obout.SuperForm.MultiLineField();
        field25.DataField  = "UserAddress";
        field25.HeaderText = "Address";
        field25.FieldSetID = "FieldSet4";

        Obout.SuperForm.DropDownListField field26 = new Obout.SuperForm.DropDownListField();
        field26.DataField  = "UserCountryID";
        field26.HeaderText = "Country";
        field26.FieldSetID = "FieldSet4";

        field26.DataSourceID    = "CountriesDataSource";
        field26.DataValueField  = "CountryID";
        field26.DataTextField   = "CountryName";
        field26.Default         = "219";
        field26.FieldsToEnable  = "UserStateID";
        field26.EnablingValues  = "219";
        field26.FieldsToDisable = "UserProvince";
        field26.DisablingValues = "219";

        Obout.SuperForm.DropDownListField field27 = new Obout.SuperForm.DropDownListField();
        field27.DataField  = "UserStateID";
        field27.HeaderText = "State";
        field27.FieldSetID = "FieldSet4";

        field27.DataSourceID   = "StatesDataSource";
        field27.DataValueField = "State";
        field27.DataTextField  = "State";


        Obout.SuperForm.BoundField field28 = new Obout.SuperForm.BoundField();
        field28.DataField  = "UserProvince";
        field28.FieldSetID = "FieldSet4";

        Obout.SuperForm.BoundField field29 = new Obout.SuperForm.BoundField();
        field29.DataField  = "UserZip";
        field29.FieldSetID = "FieldSet4";
        field29.HeaderText = "Zip Code / Postal Code";

        Obout.SuperForm.BoundField field30 = new Obout.SuperForm.BoundField();
        field30.DataField  = "UserVatID";
        field30.FieldSetID = "FieldSet4";
        field30.HeaderText = "VAT Exemption ID";

        Obout.SuperForm.BoundField field31 = new Obout.SuperForm.BoundField();
        field31.DataField  = "UserPhone";
        field31.FieldSetID = "FieldSet4";
        field31.HeaderText = "Phone";

        /*MaskedEditExtender extender4 = new MaskedEditExtender();
         * extender4.ID = "MaskedEditExtender4";
         * extender4.Mask = "(999)999-9999";
         * extender4.MaskType = MaskedEditType.Number;
         * field31.Masks.Add(extender4);*/

        Obout.SuperForm.BoundField field32 = new Obout.SuperForm.BoundField();
        field32.DataField  = "UserFax";
        field32.HeaderText = "Fax";
        field32.FieldSetID = "FieldSet4";

        /*MaskedEditExtender extender5 = new MaskedEditExtender();
         * extender5.ID = "MaskedEditExtender5";
         * extender5.Mask = "(999)999-9999";
         * extender5.MaskType = MaskedEditType.Number;
         * field32.Masks.Add(extender5);*/

        Obout.SuperForm.CommandField field33 = new Obout.SuperForm.CommandField();
        field33.ShowInsertButton          = true;
        field33.InsertText                = "Buy Now";
        field33.ShowCancelButton          = false;
        field33.ButtonType                = ButtonType.Button;
        field33.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
        field33.FieldSetID                = "CommandFields";

        Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow();
        Obout.SuperForm.FieldSet    fieldSet2    = new Obout.SuperForm.FieldSet();
        fieldSet2.ID         = "FieldSet2";
        fieldSet2.Direction  = Direction.Horizontal;
        fieldSet2.ColumnSpan = 2;
        fieldSetRow2.Items.Add(fieldSet2);

        Obout.SuperForm.FieldSetRow fieldSetRow4 = new Obout.SuperForm.FieldSetRow();
        Obout.SuperForm.FieldSet    fieldSet3    = new Obout.SuperForm.FieldSet();
        fieldSet3.ID    = "FieldSet3";
        fieldSet3.Title = "Billing Information";

        Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet();
        fieldSet4.ID    = "FieldSet4";
        fieldSet4.Title = "End-User Information";

        fieldSetRow4.Items.Add(fieldSet3);
        fieldSetRow4.Items.Add(fieldSet4);

        Obout.SuperForm.FieldSetRow fieldSetRow5  = new Obout.SuperForm.FieldSetRow();
        Obout.SuperForm.FieldSet    commandFields = new Obout.SuperForm.FieldSet();
        commandFields.ID = "CommandFields";
        commandFields.HorizontalAlign = HorizontalAlign.Center;
        commandFields.ColumnSpan      = 2;
        fieldSetRow5.Items.Add(commandFields);

        SuperForm1.FieldSets.Add(fieldSetRow2);
        SuperForm1.FieldSets.Add(fieldSetRow4);
        SuperForm1.FieldSets.Add(fieldSetRow5);

        SuperForm1.Fields.Add(field5);
        SuperForm1.Fields.Add(field6);
        SuperForm1.Fields.Add(field7);
        SuperForm1.Fields.Add(field8);
        SuperForm1.Fields.Add(dummyField);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field9);
        SuperForm1.Fields.Add(field10);
        SuperForm1.Fields.Add(field11);
        SuperForm1.Fields.Add(field12);
        SuperForm1.Fields.Add(field13);
        SuperForm1.Fields.Add(field14);
        SuperForm1.Fields.Add(field15);
        SuperForm1.Fields.Add(field16);
        SuperForm1.Fields.Add(field17);
        SuperForm1.Fields.Add(field18);
        SuperForm1.Fields.Add(field19);
        SuperForm1.Fields.Add(field20);
        SuperForm1.Fields.Add(field21);
        SuperForm1.Fields.Add(field22);
        SuperForm1.Fields.Add(field23);
        SuperForm1.Fields.Add(field24);
        SuperForm1.Fields.Add(field25);
        SuperForm1.Fields.Add(field26);
        SuperForm1.Fields.Add(field27);
        SuperForm1.Fields.Add(field28);
        SuperForm1.Fields.Add(field29);
        SuperForm1.Fields.Add(field30);
        SuperForm1.Fields.Add(field31);
        SuperForm1.Fields.Add(field32);
        SuperForm1.Fields.Add(field33);

        SuperForm1Container.Controls.Add(SuperForm1);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1 = new SuperForm();
        SuperForm1.ID = "SuperForm1";
        SuperForm1.Title = "Order Details";
        SuperForm1.DataSourceID = "SqlDataSource1";
        SuperForm1.AutoGenerateRows = false;
        SuperForm1.AutoGenerateDateFields = true;
        SuperForm1.DataKeyNames = new string[] { "OrderID" };
        SuperForm1.AllowPaging = true;
        SuperForm1.DefaultMode = DetailsViewMode.Edit;

        Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField();
        field11.DataField = "OrderID";
        field11.HeaderText = "Order ID";
        field11.ReadOnly = true;
        field11.InsertVisible = false;

        Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField();
        field12.DataField = "ShipName";
        field12.HeaderText = "Ship Name";

        Obout.SuperForm.BoundField field13 = new Obout.SuperForm.BoundField();
        field13.DataField = "ShipCity";
        field13.HeaderText = "Ship City";

        Obout.SuperForm.BoundField field14 = new Obout.SuperForm.BoundField();
        field14.DataField = "ShipCountry";
        field14.HeaderText = "Ship Country";

        Obout.SuperForm.CommandField field15 = new Obout.SuperForm.CommandField();
        field15.ButtonType = ButtonType.Button;
        field15.ShowEditButton = true;
        field15.ShowDeleteButton = true;
        field15.ShowInsertButton = true;

        SuperForm1.Fields.Add(field11);
        SuperForm1.Fields.Add(field12);
        SuperForm1.Fields.Add(field13);
        SuperForm1.Fields.Add(field14);
        SuperForm1.Fields.Add(field15);


        SuperForm1Container.Controls.Add(SuperForm1);

        SuperForm2 = new SuperForm();
        SuperForm2.ID = "SuperForm2";
        SuperForm2.Title = "Order Details";
        SuperForm2.DataSourceID = "SqlDataSource1";
        SuperForm2.AutoGenerateRows = false;
        SuperForm2.AutoGenerateDateFields = true;
        SuperForm2.DataKeyNames = new string[] { "OrderID" };
        SuperForm2.AllowPaging = true;
        SuperForm2.DefaultMode = DetailsViewMode.Edit;

        Obout.SuperForm.BoundField field21 = new Obout.SuperForm.BoundField();
        field21.DataField = "OrderID";
        field21.HeaderText = "Order ID";
        field21.ReadOnly = true;
        field21.InsertVisible = false;

        Obout.SuperForm.BoundField field22 = new Obout.SuperForm.BoundField();
        field22.DataField = "ShipName";
        field22.HeaderText = "Ship Name";

        Obout.SuperForm.BoundField field23 = new Obout.SuperForm.BoundField();
        field23.DataField = "ShipCity";
        field23.HeaderText = "Ship City";

        Obout.SuperForm.BoundField field24 = new Obout.SuperForm.BoundField();
        field24.DataField = "ShipCountry";
        field24.HeaderText = "Ship Country";

        Obout.SuperForm.CommandField field25 = new Obout.SuperForm.CommandField();
        field25.ButtonType = ButtonType.Link;
        field25.ShowEditButton = true;
        field25.ShowDeleteButton = true;
        field25.ShowInsertButton = true;

        SuperForm2.Fields.Add(field21);
        SuperForm2.Fields.Add(field22);
        SuperForm2.Fields.Add(field23);
        SuperForm2.Fields.Add(field24);
        SuperForm2.Fields.Add(field25);

        SuperForm2Container.Controls.Add(SuperForm2);

        SuperForm3 = new SuperForm();
        SuperForm3.ID = "SuperForm3";
        SuperForm3.Title = "Order Details";
        SuperForm3.DataSourceID = "SqlDataSource1";
        SuperForm3.AutoGenerateRows = false;
        SuperForm3.AutoGenerateDateFields = true;
        SuperForm3.DataKeyNames = new string[] { "OrderID" };
        SuperForm3.AllowPaging = true;
        SuperForm3.DefaultMode = DetailsViewMode.Edit;

        Obout.SuperForm.BoundField field31 = new Obout.SuperForm.BoundField();
        field31.DataField = "OrderID";
        field31.HeaderText = "Order ID";
        field31.ReadOnly = true;
        field31.InsertVisible = false;

        Obout.SuperForm.BoundField field32 = new Obout.SuperForm.BoundField();
        field32.DataField = "ShipName";
        field32.HeaderText = "Ship Name";

        Obout.SuperForm.BoundField field33 = new Obout.SuperForm.BoundField();
        field33.DataField = "ShipCity";
        field33.HeaderText = "Ship City";

        Obout.SuperForm.BoundField field34 = new Obout.SuperForm.BoundField();
        field34.DataField = "ShipCountry";
        field34.HeaderText = "Ship Country";

        Obout.SuperForm.CommandField field35 = new Obout.SuperForm.CommandField();
        field35.ButtonType = ButtonType.Image;
        field35.ShowEditButton = true;
        field35.ShowDeleteButton = true;
        field35.ShowInsertButton = true;
        field35.EditImageUrl = "resources/icons/Edit.png";
        field35.DeleteImageUrl = "resources/icons/Delete.png";
        field35.NewImageUrl = "resources/icons/Add.png";
        field35.InsertImageUrl = "resources/icons/Save.png";
        field35.UpdateImageUrl = "resources/icons/Save.png";
        field35.CancelImageUrl = "resources/icons/Delete.png";

        SuperForm3.Fields.Add(field31);
        SuperForm3.Fields.Add(field32);
        SuperForm3.Fields.Add(field33);
        SuperForm3.Fields.Add(field34);
        SuperForm3.Fields.Add(field35);

        SuperForm3Container.Controls.Add(SuperForm3);
 
    }
Ejemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1                  = new SuperForm();
        SuperForm1.ID               = "SuperForm1";
        SuperForm1.Title            = "Add a new order";
        SuperForm1.AutoGenerateRows = false;
        SuperForm1.DefaultMode      = DetailsViewMode.Insert;

        SuperForm1.ItemInserting += SuperForm1_Inserting;

        Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField();
        field1.DataField  = "ShipName";
        field1.HeaderText = "Ship Name";
        field1.Required   = true;

        Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField();
        field2.DataField  = "ShipCity";
        field2.HeaderText = "Ship City";
        field2.Required   = true;

        Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField();
        field3.DataField  = "ShipRegion";
        field3.HeaderText = "Ship Region";

        Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField();
        field4.DataField  = "ShipCountry";
        field4.HeaderText = "Ship Country";
        field4.Required   = true;

        Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField();
        field5.DataField  = "ShipPostalCode";
        field5.HeaderText = "Ship Postal Code";

        Obout.SuperForm.DateField field6 = new Obout.SuperForm.DateField();
        field6.DataField  = "OrderDate";
        field6.HeaderText = "Order Date";
        field6.Required   = true;

        Obout.SuperForm.CheckBoxField field7 = new Obout.SuperForm.CheckBoxField();
        field7.DataField  = "Sent";
        field7.HeaderText = "Sent";

        Obout.SuperForm.CommandField field8 = new Obout.SuperForm.CommandField();
        field8.ShowInsertButton          = true;
        field8.ShowCancelButton          = false;
        field8.ButtonType                = ButtonType.Button;
        field8.ItemStyle.HorizontalAlign = HorizontalAlign.Center;

        SuperForm1.Fields.Add(field1);
        SuperForm1.Fields.Add(field2);
        SuperForm1.Fields.Add(field3);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field5);
        SuperForm1.Fields.Add(field6);
        SuperForm1.Fields.Add(field7);
        SuperForm1.Fields.Add(field8);

        SuperForm1Container.Controls.Add(SuperForm1);

        if (!IsPostBack)
        {
            SuperForm1.DataBind();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1                        = new SuperForm();
        SuperForm1.ID                     = "SuperForm1";
        SuperForm1.Title                  = "Order Details";
        SuperForm1.DataSourceID           = "SqlDataSource1";
        SuperForm1.AutoGenerateRows       = false;
        SuperForm1.AutoGenerateDateFields = true;
        SuperForm1.DataKeyNames           = new string[] { "OrderID" };
        SuperForm1.AllowPaging            = true;
        SuperForm1.DefaultMode            = DetailsViewMode.Edit;

        Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField();
        field11.DataField     = "OrderID";
        field11.HeaderText    = "Order ID";
        field11.ReadOnly      = true;
        field11.InsertVisible = false;

        Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField();
        field12.DataField  = "ShipName";
        field12.HeaderText = "Ship Name";

        Obout.SuperForm.BoundField field13 = new Obout.SuperForm.BoundField();
        field13.DataField  = "ShipCity";
        field13.HeaderText = "Ship City";

        Obout.SuperForm.BoundField field14 = new Obout.SuperForm.BoundField();
        field14.DataField  = "ShipCountry";
        field14.HeaderText = "Ship Country";

        Obout.SuperForm.CommandField field15 = new Obout.SuperForm.CommandField();
        field15.ButtonType       = ButtonType.Button;
        field15.ShowEditButton   = true;
        field15.ShowDeleteButton = true;
        field15.ShowInsertButton = true;

        SuperForm1.Fields.Add(field11);
        SuperForm1.Fields.Add(field12);
        SuperForm1.Fields.Add(field13);
        SuperForm1.Fields.Add(field14);
        SuperForm1.Fields.Add(field15);


        SuperForm1Container.Controls.Add(SuperForm1);

        SuperForm2                        = new SuperForm();
        SuperForm2.ID                     = "SuperForm2";
        SuperForm2.Title                  = "Order Details";
        SuperForm2.DataSourceID           = "SqlDataSource1";
        SuperForm2.AutoGenerateRows       = false;
        SuperForm2.AutoGenerateDateFields = true;
        SuperForm2.DataKeyNames           = new string[] { "OrderID" };
        SuperForm2.AllowPaging            = true;
        SuperForm2.DefaultMode            = DetailsViewMode.Edit;

        Obout.SuperForm.BoundField field21 = new Obout.SuperForm.BoundField();
        field21.DataField     = "OrderID";
        field21.HeaderText    = "Order ID";
        field21.ReadOnly      = true;
        field21.InsertVisible = false;

        Obout.SuperForm.BoundField field22 = new Obout.SuperForm.BoundField();
        field22.DataField  = "ShipName";
        field22.HeaderText = "Ship Name";

        Obout.SuperForm.BoundField field23 = new Obout.SuperForm.BoundField();
        field23.DataField  = "ShipCity";
        field23.HeaderText = "Ship City";

        Obout.SuperForm.BoundField field24 = new Obout.SuperForm.BoundField();
        field24.DataField  = "ShipCountry";
        field24.HeaderText = "Ship Country";

        Obout.SuperForm.CommandField field25 = new Obout.SuperForm.CommandField();
        field25.ButtonType       = ButtonType.Link;
        field25.ShowEditButton   = true;
        field25.ShowDeleteButton = true;
        field25.ShowInsertButton = true;

        SuperForm2.Fields.Add(field21);
        SuperForm2.Fields.Add(field22);
        SuperForm2.Fields.Add(field23);
        SuperForm2.Fields.Add(field24);
        SuperForm2.Fields.Add(field25);

        SuperForm2Container.Controls.Add(SuperForm2);

        SuperForm3                        = new SuperForm();
        SuperForm3.ID                     = "SuperForm3";
        SuperForm3.Title                  = "Order Details";
        SuperForm3.DataSourceID           = "SqlDataSource1";
        SuperForm3.AutoGenerateRows       = false;
        SuperForm3.AutoGenerateDateFields = true;
        SuperForm3.DataKeyNames           = new string[] { "OrderID" };
        SuperForm3.AllowPaging            = true;
        SuperForm3.DefaultMode            = DetailsViewMode.Edit;

        Obout.SuperForm.BoundField field31 = new Obout.SuperForm.BoundField();
        field31.DataField     = "OrderID";
        field31.HeaderText    = "Order ID";
        field31.ReadOnly      = true;
        field31.InsertVisible = false;

        Obout.SuperForm.BoundField field32 = new Obout.SuperForm.BoundField();
        field32.DataField  = "ShipName";
        field32.HeaderText = "Ship Name";

        Obout.SuperForm.BoundField field33 = new Obout.SuperForm.BoundField();
        field33.DataField  = "ShipCity";
        field33.HeaderText = "Ship City";

        Obout.SuperForm.BoundField field34 = new Obout.SuperForm.BoundField();
        field34.DataField  = "ShipCountry";
        field34.HeaderText = "Ship Country";

        Obout.SuperForm.CommandField field35 = new Obout.SuperForm.CommandField();
        field35.ButtonType       = ButtonType.Image;
        field35.ShowEditButton   = true;
        field35.ShowDeleteButton = true;
        field35.ShowInsertButton = true;
        field35.EditImageUrl     = "resources/icons/Edit.png";
        field35.DeleteImageUrl   = "resources/icons/Delete.png";
        field35.NewImageUrl      = "resources/icons/Add.png";
        field35.InsertImageUrl   = "resources/icons/Save.png";
        field35.UpdateImageUrl   = "resources/icons/Save.png";
        field35.CancelImageUrl   = "resources/icons/Delete.png";

        SuperForm3.Fields.Add(field31);
        SuperForm3.Fields.Add(field32);
        SuperForm3.Fields.Add(field33);
        SuperForm3.Fields.Add(field34);
        SuperForm3.Fields.Add(field35);

        SuperForm3Container.Controls.Add(SuperForm3);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1 = new SuperForm();
        SuperForm1.ID = "SuperForm1";
        SuperForm1.Title = "Add a new order";
        SuperForm1.AutoGenerateRows = false;
        SuperForm1.DefaultMode = DetailsViewMode.Insert;

        SuperForm1.ItemInserting += SuperForm1_Inserting;

        Obout.SuperForm.BoundField field1 = new Obout.SuperForm.BoundField();
        field1.DataField = "ShipName";
        field1.HeaderText = "Ship Name";
        field1.Required = true;

        Obout.SuperForm.BoundField field2 = new Obout.SuperForm.BoundField();
        field2.DataField = "ShipCity";
        field2.HeaderText = "Ship City";
        field2.Required = true;

        Obout.SuperForm.BoundField field3 = new Obout.SuperForm.BoundField();
        field3.DataField = "ShipRegion";
        field3.HeaderText = "Ship Region";

        Obout.SuperForm.BoundField field4 = new Obout.SuperForm.BoundField();
        field4.DataField = "ShipCountry";
        field4.HeaderText = "Ship Country";
        field4.Required = true;

        Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField();
        field5.DataField = "ShipPostalCode";
        field5.HeaderText = "Ship Postal Code";

        Obout.SuperForm.DateField field6 = new Obout.SuperForm.DateField();
        field6.DataField = "OrderDate";
        field6.HeaderText = "Order Date";
        field6.Required = true;

        Obout.SuperForm.CheckBoxField field7 = new Obout.SuperForm.CheckBoxField();
        field7.DataField = "Sent";
        field7.HeaderText = "Sent";

        Obout.SuperForm.CommandField field8 = new Obout.SuperForm.CommandField();
        field8.ShowInsertButton = true;
        field8.ShowCancelButton = false;
        field8.ButtonType = ButtonType.Button;
        field8.ItemStyle.HorizontalAlign = HorizontalAlign.Center;

        SuperForm1.Fields.Add(field1);
        SuperForm1.Fields.Add(field2);
        SuperForm1.Fields.Add(field3);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field5);
        SuperForm1.Fields.Add(field6);
        SuperForm1.Fields.Add(field7);
        SuperForm1.Fields.Add(field8);

         SuperForm1Container.Controls.Add(SuperForm1);
     
        if (!IsPostBack)
        {
            SuperForm1.DataBind();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SuperForm1 = new SuperForm();
        SuperForm1.ID = "SuperForm1";
        SuperForm1.AutoGenerateRows = false;
        SuperForm1.Width = Unit.Pixel(630);
        SuperForm1.Title = "Payment Information";
        SuperForm1.FolderStyle = "styles/black_glass";
       
        SuperForm1.DefaultMode = DetailsViewMode.Insert;
        SuperForm1.ItemInserting += SuperForm1_Inserting;
        SuperForm1.DataBound += SuperForm1_DataBound;
        
        Obout.SuperForm.BoundField field5 = new Obout.SuperForm.BoundField();
        field5.DataField = "CardNumber";
        field5.HeaderText = "Card Number";
        field5.FieldSetID = "FieldSet2";
        field5.Required = true;
        field5.ControlStyle.Width = Unit.Pixel(150);

        /*MaskedEditExtender extender1 = new MaskedEditExtender();
        extender1.ID = "MaskedEditExtender1";
        extender1.Mask = "9999-9999-9999-9999";
        extender1.MessageValidatorTip = true;
        extender1.MaskType = MaskedEditType.Number;
        field5.Masks.Add(extender1);*/

        Obout.SuperForm.DropDownListField field6 = new Obout.SuperForm.DropDownListField();
        field6.DataField = "ExpirationYear";
        field6.HeaderText = "Expiration Year";
        field6.FieldSetID = "FieldSet2";
        field6.ControlStyle.Width = 93;
        field6.Required = true;

        Obout.SuperForm.DropDownListField field7 = new Obout.SuperForm.DropDownListField();
        field7.DataField = "ExpirationMonth";
        field7.HeaderText = "ExpirationMonth";
        field7.FieldSetID = "FieldSet2";
        field7.ControlStyle.Width = 117;
        field7.Required = true;

        Obout.SuperForm.BoundField field8 = new Obout.SuperForm.BoundField();
        field8.DataField = "CIN";
        field8.HeaderText = "Security Code";
        field8.FieldSetID = "FieldSet2";
        field8.ControlStyle.Width = 83;
        field8.Required = true;
        field8.MaxLength = 3;

        /*FilteredTextBoxExtender numbers = new FilteredTextBoxExtender();
        numbers.FilterType = FilterTypes.Numbers;
        field8.Filters.Add(numbers);*/

        Obout.SuperForm.TemplateField dummyField = new Obout.SuperForm.TemplateField();
        dummyField.FieldSetID = "FieldSet3";
        dummyField.ItemTemplate = new DummyItemTemplate();
        dummyField.ItemStyle.Width = 150;

        Obout.SuperForm.CheckBoxField field4 = new Obout.SuperForm.CheckBoxField();
        field4.DataField = "SameAsBilling";
        field4.FieldSetID = "FieldSet4";
        field4.Text = "Same as the billing";
        field4.FieldsToDisable = "UserCompanyName";
        field4.FieldsToDisable = "UserCompanyName,UserFirstName,UserLastName,UserEmailAddress,UserAddress,UserCountryID,UserStateID,UserProvince,UserZip,UserVatID,UserPhone,UserFax";
        field4.ItemStyle.Width = 150;

        Obout.SuperForm.BoundField field9 = new Obout.SuperForm.BoundField();
        field9.DataField = "BillingCompanyName";
        field9.HeaderText = "Company Name";
        field9.FieldSetID = "FieldSet3";

        Obout.SuperForm.BoundField field10 = new Obout.SuperForm.BoundField();
        field10.DataField = "BillingFirstName";
        field10.HeaderText = "First Name";
        field10.FieldSetID = "FieldSet3";
        field10.Required = true;

        Obout.SuperForm.BoundField field11 = new Obout.SuperForm.BoundField();
        field11.DataField = "BillingLastName";
        field11.HeaderText = "Last Name";
        field11.FieldSetID = "FieldSet3";
        field11.Required = true;

        Obout.SuperForm.BoundField field12 = new Obout.SuperForm.BoundField();
        field12.DataField = "BillingEmailAddress";
        field12.HeaderText = "Email Address";
        field12.FieldSetID = "FieldSet3";
        field12.Required = true;

        Obout.SuperForm.MultiLineField field13 = new Obout.SuperForm.MultiLineField();
        field13.DataField = "BillingAddress";
        field13.HeaderText = "Address";
        field13.FieldSetID = "FieldSet3";
        field13.Required = true;

        Obout.SuperForm.DropDownListField field14 = new Obout.SuperForm.DropDownListField();
        field14.DataField = "BillingCountryID";
        field14.HeaderText = "Country";
        field14.FieldSetID = "FieldSet3";
        field14.Required = true;
        field14.DataSourceID = "CountriesDataSource";
        field14.DataValueField = "CountryID";
        field14.DataTextField = "CountryName";
        field14.Default = "219";
        field14.FieldsToEnable = "BillingStateID";
        field14.EnablingValues = "219";
        field14.FieldsToDisable = "BillingProvince";
        field14.DisablingValues = "219";

        Obout.SuperForm.DropDownListField field15 = new Obout.SuperForm.DropDownListField();
        field15.DataField = "BillingStateID";
        field15.HeaderText = "State";
        field15.FieldSetID = "FieldSet3";
        field15.Required = true;
        field15.DataSourceID = "StatesDataSource";
        field15.DataValueField = "State";
        field15.DataTextField = "State";

        Obout.SuperForm.BoundField field16 = new Obout.SuperForm.BoundField();
        field16.DataField = "BillingProvince";
        field16.FieldSetID = "FieldSet3";

        Obout.SuperForm.BoundField field17 = new Obout.SuperForm.BoundField();
        field17.DataField = "BillingZip";
        field17.HeaderText = "Zip Code / Postal Code";
        field17.FieldSetID = "FieldSet3";
        
        Obout.SuperForm.BoundField field18 = new Obout.SuperForm.BoundField();
        field18.DataField = "BillingVatID";
        field18.HeaderText = "VAT Exemption ID";
        field18.FieldSetID = "FieldSet3";

        Obout.SuperForm.BoundField field19 = new Obout.SuperForm.BoundField();
        field19.DataField = "BillingPhone";
        field19.HeaderText = "Phone";
        field19.FieldSetID = "FieldSet3";

        /*MaskedEditExtender extender2 = new MaskedEditExtender();
        extender2.ID = "MaskedEditExtender2";
        extender2.Mask = "(999)999-9999";
        extender2.MaskType = MaskedEditType.Number;
        field19.Masks.Add(extender2);*/

        Obout.SuperForm.BoundField field20 = new Obout.SuperForm.BoundField();
        field20.DataField = "BillingFax";
        field20.HeaderText = "Fax";
        field20.FieldSetID = "FieldSet3";

        /*MaskedEditExtender extender3 = new MaskedEditExtender();
        extender3.ID = "MaskedEditExtender3";
        extender3.Mask = "(999)999-9999";
        extender3.MaskType = MaskedEditType.Number;
        field20.Masks.Add(extender3);*/

        Obout.SuperForm.BoundField field21 = new Obout.SuperForm.BoundField();
        field21.DataField = "UserCompanyName";
        field21.HeaderText = "Company Name";
        field21.FieldSetID = "FieldSet4";

        Obout.SuperForm.BoundField field22 = new Obout.SuperForm.BoundField();
        field22.DataField = "UserFirstName";
        field22.HeaderText = "First Name";
        field22.FieldSetID = "FieldSet4";

        Obout.SuperForm.BoundField field23 = new Obout.SuperForm.BoundField();
        field23.DataField = "UserLastName";
        field23.HeaderText = "Last Name";
        field23.FieldSetID = "FieldSet4";

        Obout.SuperForm.BoundField field24 = new Obout.SuperForm.BoundField();
        field24.DataField = "UserEmailAddress";
        field24.HeaderText = "Email Address";
        field24.FieldSetID = "FieldSet4";

        Obout.SuperForm.MultiLineField field25 = new Obout.SuperForm.MultiLineField();
        field25.DataField = "UserAddress";
        field25.HeaderText = "Address";
        field25.FieldSetID = "FieldSet4";

        Obout.SuperForm.DropDownListField field26 = new Obout.SuperForm.DropDownListField();
        field26.DataField = "UserCountryID";
        field26.HeaderText = "Country";
        field26.FieldSetID = "FieldSet4";
        
        field26.DataSourceID = "CountriesDataSource";
        field26.DataValueField = "CountryID";
        field26.DataTextField = "CountryName";
        field26.Default = "219";
        field26.FieldsToEnable = "UserStateID";
        field26.EnablingValues = "219";
        field26.FieldsToDisable = "UserProvince";
        field26.DisablingValues = "219";

        Obout.SuperForm.DropDownListField field27 = new Obout.SuperForm.DropDownListField();
        field27.DataField = "UserStateID";
        field27.HeaderText = "State";
        field27.FieldSetID = "FieldSet4";
        
        field27.DataSourceID = "StatesDataSource";
        field27.DataValueField = "State";
        field27.DataTextField = "State";


        Obout.SuperForm.BoundField field28 = new Obout.SuperForm.BoundField();
        field28.DataField = "UserProvince";
        field28.FieldSetID = "FieldSet4";

        Obout.SuperForm.BoundField field29 = new Obout.SuperForm.BoundField();
        field29.DataField = "UserZip";
        field29.FieldSetID = "FieldSet4";
        field29.HeaderText = "Zip Code / Postal Code";

        Obout.SuperForm.BoundField field30 = new Obout.SuperForm.BoundField();
        field30.DataField = "UserVatID";
        field30.FieldSetID = "FieldSet4";
        field30.HeaderText = "VAT Exemption ID";

        Obout.SuperForm.BoundField field31 = new Obout.SuperForm.BoundField();
        field31.DataField = "UserPhone";
        field31.FieldSetID = "FieldSet4";
        field31.HeaderText = "Phone";

        /*MaskedEditExtender extender4 = new MaskedEditExtender();
        extender4.ID = "MaskedEditExtender4";
        extender4.Mask = "(999)999-9999";
        extender4.MaskType = MaskedEditType.Number;
        field31.Masks.Add(extender4);*/

        Obout.SuperForm.BoundField field32 = new Obout.SuperForm.BoundField();
        field32.DataField = "UserFax";
        field32.HeaderText = "Fax";
        field32.FieldSetID = "FieldSet4";
        
        /*MaskedEditExtender extender5 = new MaskedEditExtender();
        extender5.ID = "MaskedEditExtender5";
        extender5.Mask = "(999)999-9999";
        extender5.MaskType = MaskedEditType.Number;
        field32.Masks.Add(extender5);*/

        Obout.SuperForm.CommandField field33 = new Obout.SuperForm.CommandField();
        field33.ShowInsertButton = true;
        field33.InsertText = "Buy Now";
        field33.ShowCancelButton = false;
        field33.ButtonType = ButtonType.Button;
        field33.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
        field33.FieldSetID = "CommandFields";

        Obout.SuperForm.FieldSetRow fieldSetRow2 = new Obout.SuperForm.FieldSetRow();
        Obout.SuperForm.FieldSet fieldSet2 = new Obout.SuperForm.FieldSet();
        fieldSet2.ID = "FieldSet2";
        fieldSet2.Direction = Direction.Horizontal;
        fieldSet2.ColumnSpan = 2;
        fieldSetRow2.Items.Add(fieldSet2);

        Obout.SuperForm.FieldSetRow fieldSetRow4 = new Obout.SuperForm.FieldSetRow();
        Obout.SuperForm.FieldSet fieldSet3 = new Obout.SuperForm.FieldSet();
        fieldSet3.ID = "FieldSet3";
        fieldSet3.Title = "Billing Information";
        
        Obout.SuperForm.FieldSet fieldSet4 = new Obout.SuperForm.FieldSet();
        fieldSet4.ID = "FieldSet4";
        fieldSet4.Title = "End-User Information";

        fieldSetRow4.Items.Add(fieldSet3);
        fieldSetRow4.Items.Add(fieldSet4);

        Obout.SuperForm.FieldSetRow fieldSetRow5 = new Obout.SuperForm.FieldSetRow();
        Obout.SuperForm.FieldSet commandFields = new Obout.SuperForm.FieldSet();
        commandFields.ID = "CommandFields";
        commandFields.HorizontalAlign = HorizontalAlign.Center;
        commandFields.ColumnSpan = 2;
        fieldSetRow5.Items.Add(commandFields);

        SuperForm1.FieldSets.Add(fieldSetRow2);
        SuperForm1.FieldSets.Add(fieldSetRow4);
        SuperForm1.FieldSets.Add(fieldSetRow5);
        
        SuperForm1.Fields.Add(field5);
        SuperForm1.Fields.Add(field6);
        SuperForm1.Fields.Add(field7);
        SuperForm1.Fields.Add(field8);
        SuperForm1.Fields.Add(dummyField);
        SuperForm1.Fields.Add(field4);
        SuperForm1.Fields.Add(field9);
        SuperForm1.Fields.Add(field10);
        SuperForm1.Fields.Add(field11);
        SuperForm1.Fields.Add(field12);
        SuperForm1.Fields.Add(field13);
        SuperForm1.Fields.Add(field14);
        SuperForm1.Fields.Add(field15);
        SuperForm1.Fields.Add(field16);
        SuperForm1.Fields.Add(field17);
        SuperForm1.Fields.Add(field18);
        SuperForm1.Fields.Add(field19);
        SuperForm1.Fields.Add(field20);
        SuperForm1.Fields.Add(field21);
        SuperForm1.Fields.Add(field22);
        SuperForm1.Fields.Add(field23);
        SuperForm1.Fields.Add(field24);
        SuperForm1.Fields.Add(field25);
        SuperForm1.Fields.Add(field26);
        SuperForm1.Fields.Add(field27);
        SuperForm1.Fields.Add(field28);
        SuperForm1.Fields.Add(field29);
        SuperForm1.Fields.Add(field30);
        SuperForm1.Fields.Add(field31);
        SuperForm1.Fields.Add(field32);
        SuperForm1.Fields.Add(field33);

        SuperForm1Container.Controls.Add(SuperForm1);
        
    }