public static void AddColumnsSettingViewDataContacto(MVCxGridViewColumnCollection Columns, IEnumerable <CRM.Business.Views.BaseViews.BaseView.DynObject> model, HtmlHelper Html) { if (model.Count() == 0) { return; } foreach (var property in model.First().GetDynamicMemberNames()) { if (property.ToUpper().Trim() == "ID" || property.ToUpper().Trim() == "CODIGOCLIENTE" || property.ToUpper().Trim() == "ESTADO") { continue; } if (property.ToUpper().Trim() == "CODCLIENTE") { Columns.Add(column => { column.Caption = property; column.SetDataItemTemplateContent(container => { Html.DevExpress().HyperLink(hyperlink => { var visibleIndex = container.VisibleIndex; var keyValue = container.KeyValue; var lastName = DataBinder.Eval(container.DataItem, "CodCliente"); var codCliente = DataBinder.Eval(container.DataItem, "CodigoCliente"); hyperlink.Name = "hl" + keyValue.ToString(); hyperlink.Properties.Text = lastName.ToString(); hyperlink.NavigateUrl = DevExpressHelper.GetUrl(new { Controller = "Cliente", Action = "View", id = codCliente }); }).Render(); }); }); //var style = new DevExpress.Web.GridViewHeaderStyle(); // style.BackColor = System.Drawing.Color.LightGray; Columns[property].HeaderStyle.BackColor = System.Drawing.Color.LightGray; Columns[property].HeaderStyle.Font.Bold = true; ((MVCxGridViewColumn)Columns[property]).Settings.AutoFilterCondition = AutoFilterCondition.Contains; } else { Columns.Add(property); //var style = new DevExpress.Web.GridViewHeaderStyle(); // style.BackColor = System.Drawing.Color.LightGray; Columns[property].HeaderStyle.BackColor = System.Drawing.Color.LightGray; Columns[property].HeaderStyle.Font.Bold = true; ((MVCxGridViewColumn)Columns[property]).Settings.AutoFilterCondition = AutoFilterCondition.Contains; } //Columns.Add(property); } }
public static string GetCarImageRouteUrl() { return(DevExpressHelper.GetUrl(new { Controller = "Customization", Action = "CarImage" })); }
public static string rpXuatKho1Phieu() { //var sttct = !string.IsNullOrEmpty(Request.Params["idSuCo"]) ? int.Parse(Request.Params["idSuCo"]) : 0; return(DevExpressHelper.GetUrl(new { Controller = "Report", Action = "rpXuatKho1Phieu" })); }
public static string getDMbaocao() { return(DevExpressHelper.GetUrl(new { Controller = "DanhSach", Action = "DMbaocao" })); }
public static string getDMNhomnguoidung() { return(DevExpressHelper.GetUrl(new { Controller = "DanhSach", Action = "DMNhomnguoidung" })); }
public static string getDMLoaiphieu() { return(DevExpressHelper.GetUrl(new { Controller = "DanhSach", Action = "DMLoaiphieu" })); }
public static string getDonViQL() { return(DevExpressHelper.GetUrl(new { Controller = "DanhSach", Action = "DMDonViQL" })); }
public static string getDMNhaCungCap() { return(DevExpressHelper.GetUrl(new { Controller = "DanhSach", Action = "DMNhaCungCap" })); }
public static string GetEmployeeImageRouteUrl() { return(DevExpressHelper.GetUrl(new { Controller = "GridView", Action = "EmployeeImage" })); }
/// <summary> /// Adds a menu subitem to the group. /// </summary> public static void AddMenuItem(this MVCxNavBarGroup group, string text, string controller, string action) { group.Items.Add(text, action, null, DevExpressHelper.GetUrl(new { Controller = controller, Action = action })); }