private static string getSapUser(string id, string Size, string From, string Search) { if (s == null) { s = new Service(Tm); } Content cn = new Models.Content(); DataTable dll = s.sqlhelper.GetDataTable("call " + s.companyDb + ".\"U_PD_ZpGetUser\"('" + id + "'," + Size + "," + From + ",'" + Search + "')"); if (dll.Rows.Count > 0) { for (int i = 0; i < dll.Rows.Count; i++) { SapUser sa = new SapUser(); sa.CardCode = dll.Select("1=1 ")[i]["CardCode"].ToString(); sa.CardName = dll.Select("1=1 ")[i]["CardName"].ToString(); sa.Note = dll.Select("1=1 ")[i]["Notes"].ToString(); sa.Phone = dll.Select("1=1 ")[i]["Cellolar"].ToString(); sa.IsAttention = GetOnlyUser(dll.Select("1=1 ")[i]["Cellolar"].ToString()); cn.rows.Add(sa); } cn.total = Convert.ToInt32(dll.Select("1=1 ")[0]["sum"]); } else { } return(MyUtility.GetJsonFromObj(cn)); }
public async Task <bool> PutUserAsync(SapUser user) { return(await RequestWrapper.PutAsyncWrapper(user, Endpoints.UserSapEndpoint)); }