Ejemplo n.º 1
0
        void ReleaseDesignerOutlets()
        {
            if (ActivityIsLoading != null)
            {
                ActivityIsLoading.Dispose();
                ActivityIsLoading = null;
            }

            if (ButtonSearch != null)
            {
                ButtonSearch.Dispose();
                ButtonSearch = null;
            }

            if (CollectionViewImages != null)
            {
                CollectionViewImages.Dispose();
                CollectionViewImages = null;
            }

            if (TextFieldQuery != null)
            {
                TextFieldQuery.Dispose();
                TextFieldQuery = null;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取所有按钮
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult GetButtonList(ButtonSearch model)
        {
            int totalCount = 0;
            Expression <Func <Button, int> > orderLambda = d => d.Sort;
            var whereLambda = PredicateBuilder.True <Button>();

            if (!string.IsNullOrEmpty(model.Name))
            {
                whereLambda = whereLambda.AndAlso(d => d.Name.Contains(model.Name));
            }
            var buttons    = new ButtonBLL().Get(orderLambda, whereLambda, model.Order, model.Rows, model.Page, out totalCount);
            var buttonList = buttons.Select(d => new ButtonList {
                Id             = d.Id,
                Name           = d.Name,
                Code           = d.Code,
                Icon           = d.Icon,
                Sort           = d.Sort,
                UpdateDateTime = d.UpdateTime,
                UpdateBy       = d.UpdateBy,
                Description    = d.Description
            }).ToList();
            var result = new DataResult <ButtonList>
            {
                total = totalCount,
                rows  = buttonList
            };

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
        void ReleaseDesignerOutlets()
        {
            if (ActivityLoader != null)
            {
                ActivityLoader.Dispose();
                ActivityLoader = null;
            }

            if (ButtonSearch != null)
            {
                ButtonSearch.Dispose();
                ButtonSearch = null;
            }

            if (TableFavorites != null)
            {
                TableFavorites.Dispose();
                TableFavorites = null;
            }

            if (TextSearch != null)
            {
                TextSearch.Dispose();
                TextSearch = null;
            }
        }
        public async Task <ResponseModel <List <ButtonListEntity> > > GetButtons([FromForm] ButtonSearch search)
        {
            List <ButtonListEntity> list = new List <ButtonListEntity>();
            string msg     = "";
            var    account = base.GetAccount();

            if (null == account)
            {
                return(new ResponseModel <List <ButtonListEntity> >(Enum.ResponseCode.NonLogin, "未登录或者登录超时", null));
            }
            var    parent   = base.FisrtEntity <HjsfSysChannel>(o => o.Status == 1 && o.EventName == search.EventName);
            var    parentId = parent.Data.Id;
            string sql      = $@"select distinct a.ChannelLink,ChannelName,ClassName,EventName,IconName,ViewLink,IsShow from Hjsf_SysChannel a 
                            left join HJSF_SysRoleChannelMapping b on a.id=b.ChannelId
                            left join HJSF_SysUserRoleMapping c on b.RoleId=c.RoleId
                            left join HJSF_SysUser d on c.UserId=d.Id
                            where d.Id=3 and a.Status=1 and a.ChannelType=1 and a.ParentId={parentId}";
            var    table    = _dB.QueryTableSql(sql, ref msg);

            foreach (DataRow item in table.Rows)
            {
                ButtonListEntity entity = new ButtonListEntity();
                entity.ChannelLink = item["ChannelLink"]?.ToString();
                entity.ViewLink    = item["ViewLink"]?.ToString();
                entity.IsShow      = item["IsShow"] == null ? false : Convert.ToBoolean(item["IsShow"]);
                entity.IconName    = item["IconName"]?.ToString();
                entity.ChannelName = item["ChannelName"]?.ToString();
                entity.ClassName   = item["ClassName"]?.ToString();
                entity.EventName   = item["EventName"]?.ToString();
                list.Add(entity);
            }
            return(new ResponseModel <List <ButtonListEntity> >(ResponseCode.Success, "", list));
        }
 private void TextFilter_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         e.SuppressKeyPress = true;
         ButtonSearch.PerformClick();
     }
 }
Ejemplo n.º 6
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     if (keyData == Keys.Enter)
     {
         ButtonSearch.PerformClick();
         return true;
     }
     return base.ProcessCmdKey(ref msg, keyData);
 }
Ejemplo n.º 7
0
        private void TextBoxSerialNumber_Leave(object sender, EventArgs e)
        {
            ButtonSearch.PerformClick();
            ReturnInfo getMeter = _meter.GetMeterBySerialNumber(new SmartDB(), TextBoxSerialNumber.Text);
            bool       flag     = getMeter.Code == ErrorEnum.NoError;

            if (flag)
            {
                ButtonEdit.PerformClick();
            }
        }
Ejemplo n.º 8
0
        public ImportantPage()
        {
            //Driver.DriverInstance.Navigate().GoToUrl(MAIL_IMP);
            //Search = new TextBox();
            //Search.by = (By.XPath("//h2[text()='Search']/../descendant::input"));
            Search.ClearAndType("is:important");

            //Search.by = (By.XPath("//h2[text()='Search']/../descendant::input"));
            //ButtonSearch = new Button();
            //ButtonSearch.by = (By.XPath("//button[@aria-label='Search Gmail']"));
            ButtonSearch.Click();

            //ButtonDelete = new Button();
            //ButtonDelete.by = (By.XPath("//div[text()='Delete forever']"));
        }
Ejemplo n.º 9
0
 private void TextBoxKeyword_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             ButtonSearch.PerformClick();
         }
     }
     catch (Exception oExcep)
     {
         ShowLogMessage(TraceEventType.Error, "情報検索フォーム検索キーワード入力時エラー:\n" + oExcep.Message);
         ShowLogMessage(TraceEventType.Verbose, " スタックトレース:\n" + oExcep.StackTrace);
     }
 }
Ejemplo n.º 10
0
        void ReleaseDesignerOutlets()
        {
            if (ButtonLoad != null)
            {
                ButtonLoad.Dispose();
                ButtonLoad = null;
            }

            if (ButtonSave != null)
            {
                ButtonSave.Dispose();
                ButtonSave = null;
            }

            if (ButtonSearch != null)
            {
                ButtonSearch.Dispose();
                ButtonSearch = null;
            }

            if (MyMap != null)
            {
                MyMap.Dispose();
                MyMap = null;
            }

            if (ProgressBar != null)
            {
                ProgressBar.Dispose();
                ProgressBar = null;
            }

            if (TextFieldQuery != null)
            {
                TextFieldQuery.Dispose();
                TextFieldQuery = null;
            }
        }
 public AccommodationPage StepClickOnSearch()
 {
     ButtonSearch.Click();
     return(this);
 }
Ejemplo n.º 12
0
 public MainPage OpenMoreInfoFields()
 {
     ButtonSearch.Click();
     return(this);
 }
 public AirportTaxisPage StepClickOnSearch()
 {
     ButtonSearch.Click();
     Thread.Sleep(15000);
     return(this);
 }