public int Update_Response_Status(long resId)
        {
            int Value = 0;
            try
            {
                using (fadv_touchlessEntities entities = new fadv_touchlessEntities())
                {
                    tbl_response_detail processData = entities.tbl_response_detail.Where(x => x.id == resId).First();

                    processData.status = 2;
                    entities.SaveChanges();
                }
                Value = 1;
            }
            catch (Exception ex)
            {
                Value = 0;
                throw ex;
            }
            return Value;
        }
Example #2
0
        public int Add_Response_Json(long request_id, List <tbl_yettostart_casecreation_data> lst, string json = "")
        {
            int Value = 0;

            try
            {
                if (lst.Count > 0)
                {
                    using (fadv_touchlessEntities entit = new fadv_touchlessEntities())
                    {
                        entit.tbl_yettostart_casecreation_data.AddRange(lst);
                        entit.SaveChanges();
                    }
                }
                tbl_response_detail        tbl         = new tbl_response_detail();
                List <tbl_response_detail> lstResponse = new List <tbl_response_detail>();
                tbl.request_id    = request_id; // Int64.Parse(request_id);
                tbl.response_json = json;
                tbl.status        = 1;

                lstResponse.Add(tbl);
                using (fadv_touchlessEntities entit = new fadv_touchlessEntities())
                {
                    entit.tbl_response_detail.AddRange(lstResponse);
                    entit.SaveChanges();

                    tbl_request_details processData = entit.tbl_request_details.Where(x => x.id == request_id).First();

                    processData.Status = 1;
                    entit.SaveChanges();
                }
                Value = 1;
            }
            catch (Exception ex)
            {
                Value = 0;
                throw ex;
            }
            return(Value);
        }
Example #3
0
        public int Add_Response_Json(long request_id, string json = "", string message_id = "", string service_id = "")
        {
            int Value = 0;
            fadv_touchlessEntities     entit = new fadv_touchlessEntities();
            tbl_response_detail        tbl   = new tbl_response_detail();
            List <tbl_response_detail> lst   = new List <tbl_response_detail>();

            tbl_request_details        tblReq = new tbl_request_details();
            List <tbl_request_details> lstReq = new List <tbl_request_details>();

            try
            {
                tbl.request_id    = request_id; // Int64.Parse(request_id);
                tbl.response_json = json;
                tbl.message_id    = message_id;
                tbl.service_id    = service_id;
                tbl.status        = 1;

                lst.Add(tbl);
                entit.tbl_response_detail.AddRange(lst);
                entit.SaveChanges();
                // Update Request Status
                using (fadv_touchlessEntities entities = new fadv_touchlessEntities())
                {
                    tbl_request_details processData = entities.tbl_request_details.Where(x => x.id == request_id).First();

                    processData.Status = 1;
                    entities.SaveChanges();
                }
                Value = 1;
            }
            catch (Exception ex)
            {
                Value = 0;
                throw ex;
            }
            return(Value);
        }
Example #4
0
        public int Add_Response_Json(string message_id, string json = "")
        {
            int Value = 0;
            fadv_touchlessEntities     entit = new fadv_touchlessEntities();
            tbl_response_detail        tbl   = new tbl_response_detail();
            List <tbl_response_detail> lst   = new List <tbl_response_detail>();

            try
            {
                tbl.request_id    = 1;
                tbl.response_json = json;

                lst.Add(tbl);
                entit.tbl_response_detail.AddRange(lst);
                entit.SaveChanges();
                Value = 1;
            }
            catch (Exception ex)
            {
                Value = 0;
                throw ex;
            }
            return(Value);
        }