Exemplo n.º 1
0
 public override void OnShow(params object[] paralist)
 {
     techInfo = (TechnologyInfo)paralist[0];
     AudioManager.Instance.PlaySound(AudioClipPath.UISound.Page_Open);
     SetUpDialog();
     InitConfirmBtnState();
     SetUpTechEffect();
     SetUpTechRequire();
 }
        public void AddTechnologyAreaOfOperation(string userId)
        {
            try
            {
                this.company          = _officeService.GetCompanyByUserId(userId);
                this.TechnologyInfos  = new List <TechnologyInfo>();
                this.AreaOfOperations = new List <AreaOfOperation>();

                if (TechnologyList != null)
                {
                    foreach (var item in TechnologyList)
                    {
                        TechnologyInfo technologyInfo = new TechnologyInfo()
                        {
                            Name      = item,
                            CompanyId = this.company.Id
                        };
                        this.TechnologyInfos.Add(technologyInfo);
                    }
                    _officeService.AddTechnologyInfos(this.TechnologyInfos);
                }
                if (AreaOfOperationsList != null)
                {
                    foreach (var item in AreaOfOperationsList)
                    {
                        AreaOfOperation areaOfOperation = new AreaOfOperation()
                        {
                            Name      = item,
                            CompanyId = this.company.Id
                        };
                        this.AreaOfOperations.Add(areaOfOperation);
                    }
                    _officeService.AddAreaOfOperations(this.AreaOfOperations);
                }
            }
            catch (Exception)
            {
                Notification = new NotificationModel("Failed !!", "Error in Area Of Operation or Technology Info", NotificationType.Fail);
                throw;
            }
        }
Exemplo n.º 3
0
        public void RregisterTechnologyRecList()
        {
            _TechnologyRecList.Clear();

            string[] files = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory + "TechFile", "*.xml");
            if (files.Count() == 0)
            {
                return;
            }
            for (int i = 0; i < files.Length; i++)
            {
                TechnologyInfo _tobj = CommonFunTool.SerializerXMLToObject <TechnologyInfo>(files[i]);
                if (_tobj != null)
                {
                    if (_TechnologyRecList.Count > 0)
                    {
                        while (true)
                        {
                            if (_TechnologyRecList.Where(o => o.QuiqueCode == _tobj.QuiqueCode).Count() > 0)
                            {
                                _tobj.QuiqueCode = Guid.NewGuid().ToString();
                            }
                            else
                            {
                                _TechnologyRecList.Add(_tobj);
                                CommonFunTool.SerializeToXmlFile <TechnologyInfo>(_tobj, files[i]);
                                break;
                            }
                        }
                    }
                    else
                    {
                        _TechnologyRecList.Add(_tobj);
                    }
                }
            }
        }
Exemplo n.º 4
0
 public override void Awake(params object[] paralist)
 {
     techInfo = (TechnologyInfo)paralist[0];
     InitRef();
     AddBtnClick();
 }
Exemplo n.º 5
0
 private void SelectTechnologyInfoCommandClick(TechnologyInfo o)
 {
 }
Exemplo n.º 6
0
 public override void OnShow(params object[] paralist)
 {
     base.OnShow(paralist);
     _info = (TechnologyInfo)paralist[0];
 }