예제 #1
0
        private async void Login()
        {
            LoginButton.IsEnabled = false;
            string userName = LoginBox.Text;
            string password = PasswordBox.Password;

            if (userName == "" || password == "")
            {
                MessageBox.Show("Please provide your CRM credentials.");
            }
            else
            {
                crmConnector = new CrmConnector(userName, password, "https://bever.bever.am/XRMServices/2011/Organization.svc");

                Tuple <string, string> connectionStatus = await crmConnector.ConnectToMSCRMAsync();

                if (connectionStatus.Item1 != "0")
                {
                    LoginButton.IsEnabled = true;
                    MessageBox.Show(connectionStatus.Item2);
                }
                else
                {
                    TimeTrackerWindow timeTrackerWindow = new TimeTrackerWindow(crmConnector);
                    timeTrackerWindow.Show();
                    Close();
                }
            }
        }
예제 #2
0
        public NewTfsTaskWindow(CrmConnector connector)
        {
            InitializeComponent();

            _crmConnector = connector;

            RetrieveProjects();
        }
        public NewMeetingWindow(CrmConnector connector)
        {
            InitializeComponent();

            _crmConnector = connector;

            CompletedDatePicker.SelectedDate = DateTime.Now;

            RetrieveProjects();
        }
예제 #4
0
        public TimeTrackerWindow(CrmConnector Connector)
        {
            InitializeComponent();

            SetNotifyIcon();

            timer     = new DispatcherTimer();
            idleTimer = new DispatcherTimer();

            _crmConnector = Connector;

            RetrieveProjects();
            RetrieveUserName();

            SetIdleTimer();

            CheckForUpdates();
        }
예제 #5
0
        static void Main(string[] args)
        {
            var conn = new CrmConnector();



            var names = new List <Tuple <string, string> >();

            names.Add(new Tuple <string, string>("account", "Account"));

            var entities = conn.GetEntitiesMetadata(names);
            var forms    = new List <EntityForm>();

            foreach (var entity in entities)
            {
                conn.GetFormData(entity);
                forms.AddRange(Translator.TranslatorService.CreateEntityForm(entity));
            }

            var templateEngine = new EntityFormTemplate(forms[0]);

            var tempate = templateEngine.TransformText();
        }
 public PluginAssemblyQueryingUtilities(CrmConnector crmConnector)
 {
     orgService = crmConnector.GetConnection().OrgService;
 }
예제 #7
0
 /// <summary>
 ///
 /// </summary>
 private void LoadConnectionControl()
 {
     _crmConnector = new CrmConnector(this);
     _crmConnector.LoadConnector();
 }
예제 #8
0
 public WebResourceQueryingUtilities(CrmConnector crmConnector)
 {
     orgService = crmConnector.GetConnection().OrgService;
 }