コード例 #1
0
 /// <summary>
 /// Tworzy nową sprawę w BPM
 /// </summary>
 /// <param name="issue">zgłoszenie Jira</param>
 /// <param name="login"login użytkownika</param>
 /// <param name="haslo">hasło użytkoniwka</param>
 /// <returns></returns>
 public int AddBillingIssueToWFS(BillingDTHIssueWFS issue, User user)
 {
     Entities.HeliosUser tmpuser = usersManager.SearchUserByEmail(issue.Email);
     if (tmpuser == null)
     {
         tmpuser          = new HeliosUser();
         tmpuser.telefon  = "";
         tmpuser.email    = issue.Email;
         tmpuser.imie     = issue.Imie;
         tmpuser.nazwisko = issue.Nazwisko;
         usersManager.AddUser(tmpuser);
     }
     return(manager.HPService.NewBillingIssue(issue, user));
 }
コード例 #2
0
        public Dictionary <KeyValuePair <int, string>, string> CheckIssuesPresenceOnBpm(List <BillingIssueDtoHelios> issues)
        {
            if (issues.Count == 0)
            {
                return(new Dictionary <KeyValuePair <int, string>, string>());
            }

            List <BillingDTHIssueWFS> list = new List <BillingDTHIssueWFS>();

            foreach (var item in issues)
            {
                BillingDTHIssueWFS issue = new BillingDTHIssueWFS();
                issue.JiraId          = item.issueHelios.jiraIdentifier;
                issue.NumerZgloszenia = item.issueHelios.number;
                list.Add(issue);
            }

            ResultValue <Dictionary <KeyValuePair <int, string>, string> > result = manager.HPService.CheckIssuesPresenceOnBpm(loggedUser, list.ToArray());

            return(result.GetResult());
        }
コード例 #3
0
        /// <summary>
        /// Zapisuje nowe zgłoszenie Jira w BPM
        /// </summary>
        /// <param name="issue">zgłoszenie Jira</param>
        /// <returns>id nowej sprawy BPM</returns>
        public int CreateNewIssue(BillingDTHIssueWFS issue)
        {
            throw new NotImplementedException();

            //return bpmClient.NewInsertIssueWithLoginAndTransaction(null, 614, paramz, this.loggedUser.login, this.loggedUser.password, string.Empty).Param;

            // Nowy proces - odkomentować po wdrożeniu - NEWPROC
            //param = new DSEventParamValue();
            //param.IdEventParam = 3702;
            //param.Value = issue.NumerZgloszenia;
            //param.DockNr = 0;
            //paramz[0] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3703;
            //param.Value = issue.TytulZgloszenia;
            //paramz[1] = param;
            //param = new DSEventParamValue();
            //param.IdEventParam = 3704;
            //param.Value = issue.Imie;
            //param.DockNr = 0;
            //paramz[2] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3705;
            //param.Value = issue.Nazwisko;
            //paramz[3] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3706;
            //param.Value = issue.Email;
            //paramz[4] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3707;
            //param.Value = issue.DataWystapieniaBledu;
            //paramz[5] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3708;
            //param.Value = issue.DataIGodzinaUtworzeniaZgloszenia;
            //paramz[6] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3709;
            //param.Value = issue.DataIGodzinaOstatniegoKomentarza;
            //paramz[7] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3710;
            //param.Value = issue.System.Text;
            //param.DBValue = issue.System.Value;
            //paramz[8] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3711;
            //param.Value = issue.Kategoria.Text;
            //param.DBValue = issue.Kategoria.Value;
            //paramz[9] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3712;
            //param.Value = issue.Rodzaj.Text;
            //param.DBValue = issue.Rodzaj.Value;
            //paramz[10] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3713;
            //param.Value = issue.Typ.Text;
            //param.DBValue = issue.Typ.Value;
            //paramz[11] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3714;
            //param.Value = issue.TrescZgloszenia;
            //paramz[12] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3715;
            //param.Value = issue.IdKontraktu;
            //paramz[13] = param;
            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3717;
            //param.Value = issue.IdZamowienia;
            //paramz[14] = param;

            //List<List<string>> priorytety = this.ExecStoredProcedure(user, "Billing_GetListOfPriorities", new string[] { }, "Support_ADDONS_PREPROD").GetResult();

            //param = new DSEventParamValue();
            //param.DockNr = 0;
            //param.IdEventParam = 3718;
            //param.Value = priorytety.Where(x => x[0].Equals(issue.Priorytet)).FirstOrDefault()[1];
            //param.DBValue = Convert.ToInt32(issue.Priorytet);
            //paramz[15] = param;

            //return bpmClient.NewInsertIssueWithLoginAndTransaction(null, 769, paramz, this.loggedUser.login, this.loggedUser.password, string.Empty).Param;
        }