Exemplo n.º 1
0
        public object Get(Tickets_Counts request)
        {
            ApiUser hdUser = request.ApiUser;

            request.status = request.status ?? "";

            TicketCount tk = new TicketCount(bigWebApps.bigWebDesk.Data.Tickets.SelectTicketCounts(hdUser.OrganizationId, hdUser.DepartmentId, 1, hdUser.UserId));

            switch (request.status.ToLower())
            {
            case "new": return(tk.New);

            case "open": return(tk.Open);

            case "total": return(tk.Total);

            case "onhold": return(tk.OnHold);

            case "reminder": return(tk.Reminder);

            case "parts_on_order": return(tk.PartsOnOrder);

            case "unconfirmed": return(tk.Unconfirmed);

            default: return(tk);
            }
            return(new HttpResult("", HttpStatusCode.OK));
        }
Exemplo n.º 2
0
        public void GetAllTicketCount()
        {
            TicketCount ticketCount = TestSetup.KayakoApiService.Tickets.GetTicketCounts();

            Assert.IsNotNull(ticketCount, "No ticket counts were returned");

            OutputMessage <TicketCount>("Ticket Count Result: ", ticketCount);
        }
        /// <summary>
        /// Retrieve a list of counts for different departments, ticket status'es, owners etc.
        /// </summary>
        public TicketCount GetTicketCounts()
        {
            string apiMethod = "/Tickets/TicketCount/";

            TicketCount ticketCount = Connector.ExecuteGet <TicketCount>(apiMethod);

            return(ticketCount);
        }
Exemplo n.º 4
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtCustomerName.Text.Trim()))
     {
         MessageBox.Show("请填写客户名称");
     }
     else if (string.IsNullOrEmpty(txtBankBranch.Text.Trim()))
     {
         MessageBox.Show("请填写开户银行");
     }
     else if (string.IsNullOrEmpty(txtChequeNumber.Text.Trim()))
     {
         MessageBox.Show("请填写支票号");
     }
     else
     {
         if (dt.Rows.Count > 0)
         {
             DialogResult dialogR = MessageBox.Show("已存在一张支票,确定覆盖吗?", "提示", MessageBoxButtons.YesNo);
             if (dialogR == DialogResult.Yes)
             {
                 dt.Rows.Clear();
                 DataRow dr = dt.NewRow();
                 dr["CustomerId"] = lblCustomerId.Text;
                 dr["日期"]         = ShowPlanDate;
                 dr["单位名称"]       = txtCustomerName.Text.Trim();
                 dr["联系人"]        = txtContact.Text.Trim();
                 dr["购票张数"]       = TicketCount.ToString();
                 dr["金额"]         = (TicketCount * Price).ToString();
                 dr["开户银行"]       = txtBankBranch.Text.Trim();
                 dr["支票号"]        = txtChequeNumber.Text.Trim();
                 dr["联系电话"]       = txtTelephone.Text.Trim();
                 dr["收款员"]        = FrmMain.curUser.UserId; //user lzz
                 dt.Rows.Add(dr);
                 dgvDebtList.DataSource = dt;
             }
         }
         else
         {
             DataRow dr = dt.NewRow();
             dr["CustomerId"] = lblCustomerId.Text;
             dr["日期"]         = ShowPlanDate;
             dr["单位名称"]       = txtCustomerName.Text.Trim();
             dr["联系人"]        = txtContact.Text.Trim();
             dr["购票张数"]       = TicketCount.ToString();
             dr["金额"]         = (TicketCount * Price).ToString();
             dr["开户银行"]       = txtBankBranch.Text.Trim();
             dr["支票号"]        = txtChequeNumber.Text.Trim();
             dr["联系电话"]       = txtTelephone.Text.Trim();
             dr["收款员"]        = FrmMain.curUser.UserId; //user
             dt.Rows.Add(dr);
             dgvDebtList.DataSource = dt;
         }
         isAllowNext = true;
     }
 }
Exemplo n.º 5
0
        private void LoadTags()
        {
            TicketCount T = new TicketCount();
            Ticket      t = new Ticket();

            L = new List <TicketCount>();
            SetUpTable();
            t.InventoryEventKey = x.ActiveEventId;
            T.Ticket            = t;
            T.Verified          = false;
            L = x.LoadTags_List(T);
            List2Table(L);
            dgv_FilteredTags.DataSource = _table;
            SetReadOnlyColumns();
        }
Exemplo n.º 6
0
        private object GetTickets_Counts(Tickets_Counts request)
        {
            ApiUser hdUser = request.ApiUser;

            request.status = request.status ?? "";

            TicketCount tk = new TicketCount(bigWebApps.bigWebDesk.Data.Tickets.SelectTicketCounts(hdUser.OrganizationId, hdUser.DepartmentId, 1, hdUser.UserId));

            switch (request.status.ToLower())
            {
            //v1
            case "new": return(tk.New);

            case "open": return(tk.Open);

            case "total": return(tk.Open);

            //v2
            case "new_mesages": return(tk.New);

            case "open_all": return(tk.Open);

            case "open_as_tech": return(tk.OpenAsTech);

            case "open_as_alttech": return(tk.OpenAsAltTech);

            case "open_as_user": return(tk.OpenAsUser);

            case "onhold": return(tk.OnHold);

            case "reminder": return(tk.Reminder);

            case "parts_on_order": return(tk.PartsOnOrder);

            case "unconfirmed": return(tk.Unconfirmed);

            case "waiting": return(tk.Waiting);

            default: return(tk);
            }
            return(new HttpResult("", HttpStatusCode.OK));
        }