Exemplo n.º 1
0
        /// <summary>
        /// 獲取角色的東東
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void client_GetSysRoleInfosCompleted(object sender, GetSysRoleInfosCompletedEventArgs e)
        {

            if (e.Result != null)
            {
                StateList.Clear();

                List<T_SYS_ROLE> dt = e.Result.ToList<T_SYS_ROLE>(); ;

                for (int i = 0; i < dt.Count; i++)
                {
                    StateType tmp = new StateType();
                    tmp.StateCode = "State" + new Guid(dt[i].ROLEID).ToString("N");
                    tmp.StateName = dt[i].ROLENAME;
                    StateList.Add(tmp);
                }
                // 1s 冉龙军
                //string tmpStateName = (StateList.Where(s => s.StateCode.ToString() == stepname).ToList().First().StateName);
                //lblStatusName.Text = tmpStateName;

                lblStatusName.Text = "";
                // 1e
            }
        }
Exemplo n.º 2
0
        public void SetRuleList(List<StateActive> list)
        {
            StateList.Clear();
            for (int i = 0; i < list.Count; i++)
            {
                StateType tmp = new StateType();
                tmp.StateCode = list[i].Name;
                tmp.StateName = list[i].StateName.Text;
                StateList.Add(tmp);
            }

            cboStartInfo.ItemsSource = StateList.Where(s => s.StateCode != "EndFlow").ToList();
            cboStartInfo.SelectedIndex = 0;

            cboNextInfo.ItemsSource = StateList.Where(s => s.StateCode != "StartFlow").ToList();
            cboNextInfo.SelectedIndex = 0;

            if (OptState != OptState.Add)
            {

                cboStartInfo.SelectedItem = StateList.Where(s => s.StateCode == StartStateName).ToList().First();
                cboNextInfo.SelectedItem = StateList.Where(s => s.StateCode == EndStateName).ToList().First();

            }
            //  cboInfo.SelectedItem = ActiveName;
        }
Exemplo n.º 3
0
        /// <summary>
        /// 獲取角色的東東
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void GetSysRoleInfosCompleted(object sender, GetSysRoleInfosCompletedEventArgs e)
        {
            // 1s 冉龙军
            if (e.Error != null && e.Error.Message != "")
            {
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); 
                return;
            }
            // 1e
            if (e.Result != null)
            {
                StateList.Clear();

                List<T_SYS_ROLE> dt = e.Result.ToList<T_SYS_ROLE>(); ;

                for (int i = 0; i < dt.Count; i++)
                {
                    StateType tmp = new StateType();
                    tmp.StateCode = "State" + new Guid(dt[i].ROLEID).ToString("N");
                    tmp.StateName = dt[i].ROLENAME;
                    StateList.Add(tmp);

                }
                SetStatelist();
            }
        }