Пример #1
0
        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);
            }
        }
Пример #2
0
 public static string GetCarImageRouteUrl()
 {
     return(DevExpressHelper.GetUrl(new { Controller = "Customization", Action = "CarImage" }));
 }
Пример #3
0
 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" }));
 }
Пример #4
0
 public static string getDMbaocao()
 {
     return(DevExpressHelper.GetUrl(new { Controller = "DanhSach", Action = "DMbaocao" }));
 }
Пример #5
0
 public static string getDMNhomnguoidung()
 {
     return(DevExpressHelper.GetUrl(new { Controller = "DanhSach", Action = "DMNhomnguoidung" }));
 }
Пример #6
0
 public static string getDMLoaiphieu()
 {
     return(DevExpressHelper.GetUrl(new { Controller = "DanhSach", Action = "DMLoaiphieu" }));
 }
Пример #7
0
 public static string getDonViQL()
 {
     return(DevExpressHelper.GetUrl(new { Controller = "DanhSach", Action = "DMDonViQL" }));
 }
Пример #8
0
 public static string getDMNhaCungCap()
 {
     return(DevExpressHelper.GetUrl(new { Controller = "DanhSach", Action = "DMNhaCungCap" }));
 }
Пример #9
0
 public static string GetEmployeeImageRouteUrl()
 {
     return(DevExpressHelper.GetUrl(new { Controller = "GridView", Action = "EmployeeImage" }));
 }
Пример #10
0
 /// <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 }));
 }