Index View contains 96 lines
Child View Contains 292 lines
Controller
public ActionResult Index()
{
return View();
}
public ActionResult chield()
{
return View();
}
Views
Index View
@{
var X = Html.X();
}
@X.ResourceManager()
@(
Html.X().Viewport()
.Layout(LayoutType.Border)
.Border(false)
.Items(
X.Panel().Layout(LayoutType.HBox)
.Border(false)
.Height(50)
.Region(Region.North)
.BodyStyle("background: #DFE8F6").AutoScroll(false)
.Items
(
X.Image()
.Height(40)
.Width(300).ImageUrl("")
,
/*=================================================================*/
X.DisplayField().Padding(10).Margins("0 0 0 0"),
X.Container().Layout(LayoutType.VBox).Padding(0).Margins("0 0 0 0").Items(
)
/*====================================================================*/
)
,
Html.X().TreePanel()
.Split(true)
.Collapsible(true)
.ID("TreePanel")
.Region(Region.West)
.UseArrows(true)
.Width(300)
.Title("Menu")
.RootVisible(false)
,
Html.X().TabPanel()
.ID("TabPanel1")
.Region(Region.Center)
.Border(false)
.Items
(
Html.X().TabPanel()
.ID("TabPanel")
.Layout(LayoutType.Absolute)
.Border(false)
.Plugins(plugins => plugins.Add(new TabCloseMenu()))
.Items
(
X.Panel()
.ID("pdashboard")
.Title("Dash Board")
.BodyPadding(6)
.AutoScroll(true)
.Loader(X.ComponentLoader()
.Url(Url.Action("chield"))
.LoadMask(m => m.ShowMask = true)
.Mode(LoadMode.Frame)
)
)
)
.Plugins(plugins => plugins.Add(new TabCloseMenu()))
,
X.Panel().ID("pbottom")
.BodyPadding(0)
.AutoScroll(false)
.Region(Region.South)
.BottomBar(
X.StatusBar().StatusAlign(StatusAlign.Right).Border(false)
.Items(
X.ToolbarTextItem().Text("Test"),
X.ToolbarTextItem().ID("txttime"),
X.ToolbarTextItem()
)
).AlignTo("pbottom", "Left")
)
)
Child View
@{
var X = Html.X();
}
@X.ResourceManager()
@(Html.X().Viewport()
.Layout(LayoutType.Fit)
.Border(false)
.Items(
//=========================================Form Start==================================================
X.FormPanel().ID("f").Border(false).BodyStyle("background-color: #F1F1F1;").ButtonAlign(Alignment.Right)
.Items
(
X.Portal().Border(false).Title("1").Header(false).Layout(LayoutType.Table).BodyStyle("background-color: #F1F1F1;").Border(false)
.Padding(0).Margin(0).Height(120).LayoutConfig(new TableLayoutConfig { Columns = 3 }).AutoScroll(false)
.Items
(
//=========================================1st Column Start==================================================
X.PortalColumn().AnchorHorizontal("50%")
.Items(
X.TextField()
.FieldLabel("Requisition No")
.AnchorHorizontal("100%")
.Width(270)
.LabelAlign(LabelAlign.Right)
,
X.DateField()
.FieldLabel("Date")
.AnchorHorizontal("100%")
.Width(270)
.LabelAlign(LabelAlign.Right),
X.ComboBox()
.FieldLabel("Branch")
.AnchorHorizontal("100%")
.Width(270)
,
X.ComboBox()
.FieldLabel("Requested by")
.AnchorHorizontal("100%")
.Width(270)
),
//=========================================1st Column End====================================================
//=========================================2nd Column Start==================================================
X.PortalColumn().AnchorHorizontal("50%")
.Items(
X.ComboBox()
.FieldLabel("Cost center")
.AnchorHorizontal("100%")
.Width(270)
,
X.ComboBox()
.FieldLabel("Project")
.AnchorHorizontal("100%")
.Width(270)
,
X.ComboBox()
.FieldLabel("Site")
.AnchorHorizontal("100%")
.Width(270)
,
X.DateField()
.FieldLabel("Require Date")
.AnchorHorizontal("100%")
.Width(270)
.LabelAlign(LabelAlign.Right)
.Format("dd-MM-yyyy")
),
//=========================================2nd Column End==================================================
//=========================================3rd Column Start==================================================
X.PortalColumn().AnchorHorizontal("50%")
.Items(
X.ComboBox()
.FieldLabel("Vendor Name")
.AnchorHorizontal("100%")
.Width(350)
,
X.TextArea()
.ReadOnly(true)
.FieldLabel("Address")
.Height(52),
X.Container().Layout(LayoutType.Table).LayoutConfig(new TableLayoutConfig { Columns = 2 })
.Items
(
X.TextField()
.FieldLabel("City")
.AnchorHorizontal("100%")
.LabelAlign(LabelAlign.Right)
,
//X.DisplayField().Html(" "),
X.TextField()
.FieldLabel("Pin")
.AnchorHorizontal("100%")
.LabelAlign(LabelAlign.Right)
)
)
//=========================================3rd Column End==================================================
)
//==============================================================================Requisition Master entry End
,
/**
* details Entry GridPanle Starts here
*/
X.GridPanel()
.ID("GridPanel1")
.TopBarItem(X.Button().Text("Add").Icon(Icon.Add))
.Layout(LayoutType.Fit)
.Border(false)
.Header(false)
.AutoScroll(true)
.Height(270)
.Features(X.Summary().ShowSummaryRow(false))
.Title("Grid")
.ForceFit(true)
.View(
Html.X().GridView().MarkDirty(false)
)
.ColumnModel(
X.Column()
.Editor(
Html.X().TextField().AllowBlank(true).StyleSpec("text-align:left")
),
X.Column()
.Editor(
X.ComboBox()
)
,
X.Column()
.Editor(X.ComboBox()
.ID("ddlMaterial")
),
X.Column()
.Editor(X.ComboBox()
),
X.Column()
.Editor(
Html.X().NumberField()
),
X.Column()
.Editor(
Html.X().NumberField()
),
X.Column()
.Editor(
Html.X().NumberField()
),
X.SummaryColumn()
.Editor(
Html.X().NumberField()
)
)
/*=======================================================Grid End======================================================================*/
,
//=========================================Footer Start==================================================
X.Portal().Border(false).Title("1").Header(false).Layout(LayoutType.Table).BodyStyle("background-color: #F1F1F1;").Border(false)
.Padding(0).Margin(0).Height(200).LayoutConfig(new TableLayoutConfig { Columns = 3 }).AutoScroll(false)
.Items
(
//=========================================Footer 1st Column Start==================================================
X.PortalColumn().Border(false)
.Items(
X.Checkbox()
.BoxLabel("Forward to Purchas")
.BoxLabelAlign(BoxLabelAlign.After)
.HideLabel(true),
X.Checkbox()
.BoxLabel("Quotation Required")
.BoxLabelAlign(BoxLabelAlign.After)
.HideLabel(true),
X.Radio()
.BoxLabel("Requisition Approved")
.BoxLabelAlign(BoxLabelAlign.After)
.HideLabel(true)
.Name("r"),
X.Radio()
.BoxLabel("Requisition Rejected")
.BoxLabelAlign(BoxLabelAlign.After)
.HideLabel(true)
.Name("r")
),
//=========================================Footer 1st Column End==================================================
//=========================================Footer 2nd Column Start==================================================
X.PortalColumn().Border(false)
.Items(
X.ComboBox()
.FieldLabel("Status")
.EmptyText("Select")
.EmptyValue(0)
.Items(new ListItem { Text = "Hold" }, new ListItem { Text = "Approved" }, new ListItem { Text = "Rejected" })
.AllowBlank(true)
.Editable(true)
,
X.TextArea()
.FieldLabel("Remarks")
.AnchorHorizontal("100%")
.Width(350)
.LabelAlign(LabelAlign.Right)
.Height(52)
)
//=========================================Footer 2nd Column End==================================================
,
X.PortalColumn().Layout(LayoutType.VBox).LayoutConfig(new VBoxLayoutConfig { Align = VBoxAlign.Right })//StyleSpec("left:950px;top:10px")
.Items
(
X.Panel().Width(200).LayoutConfig(new HBoxLayoutConfig { Align = HBoxAlign.Middle }).Border(false).Padding(5)
.Items
(
X.DisplayField().Text("Total Value").HideLabel(true),
X.DisplayField().HideLabel(true)
)
)
)
//=========================================Footer End==================================================
)
.Buttons(
X.Button()
.Text("Save")
, X.Button()
.Text("Close")
.ID("btnClose")
)
)
//=========================================Form End==================================================
)
1 post can have 5 picture max that's why I will post 5 with this post and reaming with next.