Beispiel #1
0
 public void  MeetingDomicilio(int idMeeting)
 {
     using (var db = FactoryConn.GetConn()) {
         var MeetingId = int.Parse(idMeeting.ToString());
         var dto       = new ModelContainer();
         dto.Reference = db.Table <Meeting> ().Where(s => s.Id == MeetingId).FirstOrDefault().CaseDetentionId.ToString() ?? "";
         ImputedHome mdl = new ImputedHome();
         mdl.MeetingId = idMeeting;
         dto.JsonModel = JsonConvert.SerializeObject(mdl);
         var temp = new AddressUpsert {
             Model = dto
         };
         var pagestring = "nada que ver";
         pagestring = temp.GenerateString();
         webView.LoadHtmlString(pagestring);
         db.Close();
     }
 }
Beispiel #2
0
        public void  AddVerificationSource(int idCase)
        {
            using (var db = FactoryConn.GetConn()) {
                try {
                    db.CreateTable <User> ();
                    var  usrList  = db.Table <User> ().ToList();
                    User reviewer = usrList.FirstOrDefault();
                    int  revId    = 0;
                    if (reviewer != null && reviewer.Id > 0)
                    {
                        revId = reviewer.Id;
                    }

                    var casoId = int.Parse(idCase.ToString());
                    var caso   = db.Table <Case> ().Where(cs => cs.Id == casoId).FirstOrDefault();
//				var usuario = db.Table<User>().FirstOrDefault();
                    var verificacion = db.Table <Verification> ().Where(s => s.CaseDetentionId == casoId &&
                                                                        s.ReviewerId == revId).FirstOrDefault();
                    var dto = new ModelContainer();
                    dto.Reference = idCase.ToString();
                    SourceVerification mdl = new SourceVerification();
                    mdl.IdCase         = casoId;
                    mdl.IsAuthorized   = false;
                    mdl.Visible        = true;
                    mdl.VerificationId = verificacion.Id;
                    dto.JsonModel      = JsonConvert.SerializeObject(mdl);
                    var temp = new NewVerificationSource {
                        Model = dto
                    };
                    var pagestring = "nada que ver";
                    pagestring = temp.GenerateString();
                    webView.LoadHtmlString(pagestring);
                } catch (Exception e) {
                    db.Rollback();
                    Console.WriteLine("catched exception in MeetingController method PersonSocialNetwork");
                    Console.WriteLine("Exception message :::>" + e.Message);
                } finally {
                    db.Commit();
                }
                db.Close();
            }
        }
        public void  EditMeetingDomicilio(int idHome)
        {
            var HomeId = int.Parse(idHome.ToString());
            var dto    = new ModelContainer();

            using (var db = FactoryConn.GetConn()) {
                ImputedHome mdl = db.Table <ImputedHome> ().Where(lv => lv.Id == HomeId).FirstOrDefault();
                if (mdl != null)
                {
                    var schedule = db.Table <Schedule> ().Where(sc => sc.ImputedHomeId == mdl.Id).ToList();
                    if (schedule != null)
                    {
                        mdl.Schedule = JsonConvert.SerializeObject(schedule);
                    }
                }
                if (mdl != null)
                {
                    dto.JsonModel = JsonConvert.SerializeObject(mdl);
                    dto.Reference = db.Table <Meeting> ().Where(s => s.Id == mdl.MeetingId).FirstOrDefault().CaseDetentionId.ToString() ?? "";
                }
                else
                {
                    mdl           = new ImputedHome();
                    mdl.MeetingId = idHome;
                    dto.JsonModel = JsonConvert.SerializeObject(mdl);
                }
                db.Close();
            }
            var temp = new AddressUpsert {
                Model = dto
            };
            //			var temp = new NewMeeting{Model = new EntrevistaTabla{Name="nombre" , DateBirthString=DateTime.Today.ToString("yyyy/mm/dd")} };
            var pagestring = "nada que ver";

            pagestring = temp.GenerateString();
            webView.LoadHtmlString(pagestring);
        }