public static string GetReportPath(DevExpress.XtraReports.UI.XtraReport fReport, string ext)
 {
     System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
     string repName = fReport.Name;
     if(repName.Length == 0) repName = fReport.GetType().Name;
     string dirName = Path.GetDirectoryName(asm.Location);
     return Path.Combine(dirName, repName + "." + ext);
 }
 public override object Visit(DevExpress.Data.Filtering.OperandValue operand)
 {
     if (operand.GetType().FullName == "DevExpress.Persistent.Base.CriteriaWrapperOperandParameter") //Non Public Type
     {
         return new CriteriaToStringVisitResult(ValueToString(operand.Value));
     }
     else
     {
         return base.Visit(operand);
     }
 }
Exemple #3
0
 public bool HookShowForm(DevExpress.XtraEditors.XtraForm frm)
 {
     //Lấy tên của các warning của form đưa vào biến names.
     string frmName = frm.GetType().Name;
     //warSystem = WarningSupport.StartWarning(frmName);
     return true;
 }
Exemple #4
0
 private void SaveCaption(DevExpress.XtraTab.XtraTabPage ctrPage, Form pForm, string pLanguage)
 {
     InsertControl(pForm.Name, ctrPage.GetType().FullName, ctrPage.Name, ctrPage.Text, pLanguage, "");
     foreach (Control ctr in ctrPage.Controls)
     {
         if (strControlNotSave.Contains(ctr.GetType().Name))
         {
             continue;
         }
         else
         {
             CallSaveCaption(ctr.GetType().Name, ctr, pForm, pLanguage);
         }
     }
 }
Exemple #5
0
 private void SaveCaption(DevExpress.XtraEditors.GroupControl pGroupControl, Form pForm, string pLanguage)
 {
     InsertControl(pForm.Name, pGroupControl.GetType().FullName, pGroupControl.Name, pGroupControl.Text, pLanguage, "");
     foreach (Control ctr in pGroupControl.Controls)
     {
         if (strControlNotSave.Contains(ctr.GetType().Name))
         {
             continue;
         }
         else
         {
             CallSaveCaption(ctr.GetType().Name, ctr, pForm, pLanguage);
         }
     }
 }
Exemple #6
0
        public void ResetLayout(DevExpress.XtraGrid.Views.Grid.GridView view, string gridName)
        {
            RegUtils.DeleteSetting("GridLayout\\" + gridName);
            view.ClearColumnsFilter();
            view.ClearGrouping();
            view.ClearSorting();

            if (view.GetType() == typeof(DevExpress.XtraGrid.Views.BandedGrid.BandedGridView))
            {
                var bandedView = (DevExpress.XtraGrid.Views.BandedGrid.BandedGridView) view;
                foreach (DevExpress.XtraGrid.Views.BandedGrid.GridBand band in bandedView.Bands)
                    band.Visible=true;
            }
        }
Exemple #7
0
 static void LoadCompanyView(object sender, EventArgs e, DevExpress.XtraEditors.XtraUserControl caller)
 {
     System.Reflection.MethodInfo mi = caller.GetType().GetMethod("LoadCompanyView");
     mi.Invoke(caller, null);
 }
Exemple #8
0
        private void showSub(DevExpress.XtraBars.BarItem ctl, out  bool IsVisible)
        {
            IsVisible = false;
            try
            {
                if (ctl.GetType().ToString() == "DevExpress.XtraBars.BarButtonItem")
                {
                    string strForm = ctl.Tag.ToString() + ".cs";
                    if (Common._dicRoleInfo.ContainsKey(strForm))
                    {
                        string str = Common._dicRoleInfo[strForm];
                        if (Common._dicRoleInfo[strForm] == "1")
                        {
                            ctl.Visibility = BarItemVisibility.Always;
                            IsVisible = true;
                        }
                        else
                        {
                            ctl.Visibility = BarItemVisibility.Never;
                        }
                    }
                    else
                    {

                        ctl.Visibility = BarItemVisibility.Never;
                    }
                }
                if (ctl.GetType().ToString() == "DevExpress.XtraBars.BarSubItem")
                {
                    DevExpress.XtraBars.BarSubItem ct = (DevExpress.XtraBars.BarSubItem)ctl;
                    foreach (DevExpress.XtraBars.LinkPersistInfo item in ct.LinksPersistInfo)
                    {
                        bool TempVisible = false;
                        showSub(item.Item, out TempVisible);
                        item.Visible = TempVisible;
                        //用或运算将值传给上成BarSubItem
                        IsVisible = IsVisible || TempVisible;
                    }
                }


            }
            catch (Exception ex)
            {

                throw ex;
            }
        }