// Retrieves a call list public CallList ListCalls(int limit = 20, int page = 0) { var resource = new CallLists(new CallList { Limit = limit, Page = page }); var result = restClient.Retrieve(resource); return((CallList)result.Object); }
private void btnSearch_Click(object sender, RoutedEventArgs e) { SearchCondition1 con = new SearchCondition1(); con.StartDate = sdate.Value; con.EndDate = edate.Value; con.Number = string.IsNullOrEmpty(txtNumber.Text.Trim()) == false ? string.Format("%{0}%", txtNumber.Text.Trim()) : string.Empty; if (tabs.SelectedIndex == 1) { calls = new CallLists(con); dgCallList.ItemsSource = calls; } else if (tabs.SelectedIndex == 2) { smslist = new Smses(con); dgSmsList.ItemsSource = smslist; } }
public CallLists GetCallListByCustIdx(int cust_idx, string cust_tel) { DataTable dt; CallLists lists = new CallLists(); using (FirebirdDBHelper db = new FirebirdDBHelper(util.GetFbDbStrConn())) { try { db.SetParameters("@I_IDX", FbDbType.Integer, cust_idx); db.SetParameters("@I_CUST_TEL", FbDbType.VarChar, cust_tel); dt = db.GetDataTableSP("GET_CALL_LIST2"); foreach (DataRow row in dt.Rows) { lists.Add(new CallList() { IsChecked = false, IsSelected = false, Idx = string.IsNullOrEmpty(row[0].ToString()) == false ? int.Parse(row[0].ToString()) : -1, Cust_Idx = string.IsNullOrEmpty(row[1].ToString()) == false ? int.Parse(row[1].ToString()) : -1, Name = row[2].ToString(), Direction = string.IsNullOrEmpty(row[3].ToString()) == false ? int.Parse(row[3].ToString()) : -1, Cust_Tel = row[4].ToString(), Startdate = string.IsNullOrEmpty(row[5].ToString()) == false ? DateTime.Parse(row[5].ToString()) : new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Local), Enddate = string.IsNullOrEmpty(row[6].ToString()) == false ? DateTime.Parse(row[6].ToString()) : new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Local), Memo = util.decStr(row[7].ToString()) }); } } catch (FbException ex) { util.WriteLog(ex.ErrorCode, ex.Message); } } return lists; }