Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static async Task<HttpStatusCode> ADD(Employee A)
- {
- dynamic jsonObject = new JObject();
- jsonObject.Name = A.Name;
- jsonObject.BranchName = A.BranchName;
- jsonObject.CreationDate = A.CreationDate;
- jsonObject.Last_Modified_Date = A.Last_Modified_Date;
- jsonObject.ISACTIVE = 1;
- jsonObject.ImageURL = A.ImageURL;
- jsonObject["data"] = JObject.FromObject(A.date);
- Task<FirebaseResponse> Respos_State = MainFClient.GetAsync("/Employee");
- SetResponse response;
- try
- {
- JArray jA = (Respos_State.Result != null) ? JArray.Parse(Respos_State.Result.Body.ToString()) : new JArray();
- response = StaticValues._8080_MainFClient.Set<JObject>("/Employee/" + jA.Count(), jsonObject);
- }
- catch (Exception i)
- {
- response = StaticValues._8080_MainFClient.Set<JObject>("/Employee/" + 0, jsonObject);
- }
- return response.StatusCode;
- }
- ////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement