public Poll(GmDataReader dr)
 {
     id       = dr.GetInt();
     date     = dr.GetDateTime();
     question = dr.GetString();
     status   = (RecordStatus)dr.GetInt();
 }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        log = MainMasterPage.InitPage(this);
        int forumTopicId = RequestUtils.GetForumTopicId(this);

        this.SqlDataSource1.SelectParameters["ForumTopicId"].DefaultValue = forumTopicId.ToString();
        try
        {
            string cmdText = "SELECT Forums.Id AS ForumId, Forums.Name AS ForumName, ForumTopics.Name AS ForumTopicName FROM Forums INNER JOIN   ForumTopics ON Forums.Id = ForumTopics.ForumId WHERE (ForumTopics.Id = @ForumTopicId)";
            using (GmConnection conn = Global.CreateConnection())
            {
                GmCommand cmd = conn.CreateCommand(cmdText);
                cmd.AddInt("ForumTopicId", forumTopicId);
                using (GmDataReader dr = cmd.ExecuteReader())
                {
                    if (dr.Read())
                    {
                        forumId        = dr.GetInt();
                        forumName      = dr.GetString();
                        forumTopicName = dr.GetString();
                    }
                    else
                    {
                        return;
                    }
                }
            }
        }
        catch (Exception ex)
        {
            log.Exception(ex);
        }
    }
        public string GetAnalysesList(GmConnection conn)
        {
            StringBuilder sb  = new StringBuilder();
            GmCommand     cmd = conn.CreateCommand(
                @"select RequestDate, Name from Analyses 
left join AnalysisTypes on AnalysisTypes.Id=AnalysisTypeId
where PatientId=@Id");

            cmd.AddInt("Id", id);
            using (DbDataReader dr = cmd.ExecuteReader())
            {
                while (dr.Read())
                {
                    GmDataReader gr   = new GmDataReader(dr);
                    DateTime     dt   = gr.GetDateTime();
                    string       name = gr.GetString();
                    if (sb.Length > 0)
                    {
                        sb.Append("; ");
                    }
                    sb.AppendFormat("{0:dd.MM} {1}", dt, name);
                }
            }
            if (sb.Length > 0)
            {
                sb.Append(".");
            }
            return(sb.ToString());
        }
Exemple #4
0
 public ArticleParam(GmDataReader dr)
 {
     id        = dr.GetInt();
     articleId = dr.GetInt();
     key       = dr.GetString();
     value     = dr.GetString();
     status    = (RecordStatus)dr.GetInt();
 }
 public PollAnswer(GmDataReader dr)
 {
     id     = dr.GetInt();
     pollId = dr.GetInt();
     answer = dr.GetString();
     count  = dr.GetInt();
     status = (RecordStatus)dr.GetInt();
 }
 public Forum(GmDataReader dr)
 {
     id          = dr.GetInt32();
     communityId = dr.GetInt();
     date        = dr.GetDateTime();
     name        = dr.GetString();
     description = dr.GetString();
     status      = (RecordStatus)dr.GetInt();
 }
        public WatchingScheme(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id     = gr.GetInt32();
            userId = gr.GetInt32();
            name   = gr.GetString();
            data   = WatchingSchemeData.DeserializeString(gr.GetString());
        }
        public AnalysisType(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id              = gr.GetInt32();
            name            = gr.GetString();
            code            = gr.GetString();
            handbookGroupId = gr.GetString();
        }
Exemple #9
0
 public Gallery(GmDataReader dr)
 {
     id          = dr.GetInt();
     communityId = dr.GetInt();
     name        = dr.GetString();
     text        = dr.GetString();
     status      = (RecordStatus)dr.GetInt();
     logo        = dr.GetString();
 }
 public WebPage(GmDataReader dr)
 {
     id            = dr.GetInt();
     name          = dr.GetString();
     bannerTopicId = dr.GetInt();
     title         = dr.GetString();
     description   = dr.GetString();
     keywords      = dr.GetString();
 }
Exemple #11
0
 public GalleryImage(GmDataReader dr)
 {
     id        = dr.GetInt32();
     galleryId = dr.GetInt32();
     filename  = dr.GetString();
     name      = dr.GetString();
     text      = dr.GetString();
     status    = (RecordStatus)dr.GetInt32();
 }
        public Reacard(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id          = gr.GetInt32();
            patientId   = gr.GetInt32();
            date        = gr.GetDateTime();
            reacardData = ReacardData.DeserializeString(gr.GetString());
        }
Exemple #13
0
 public ForumTopic(GmDataReader dr)
 {
     id          = dr.GetInt();
     forumId     = dr.GetInt();
     date        = dr.GetDateTime();
     name        = dr.GetString();
     description = dr.GetString();
     status      = (RecordStatus)dr.GetInt();
 }
        public Watching(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id        = gr.GetInt32();
            userId    = gr.GetInt32();
            startTime = gr.GetDateTime();
            endTime   = gr.GetDateTime();
            data      = WatchingData.DeserializeString(gr.GetString());
        }
        public Reacard(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);
            int          i  = 0;

            id          = dr.GetInt32(i++);
            patientId   = dr.GetInt32(i++);
            date        = dr.GetDateTime(i++);
            reacardData = ReacardData.Create(gr.GetString(i++));
        }
        public PatientConsultation(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id               = gr.GetInt32();
            patientId        = gr.GetInt32();
            requestDate      = gr.GetDateTime();
            executionDate    = gr.GetDateTime();
            consultationData = ConsultationData.Create(gr.GetString());
        }
 public Banner(GmDataReader dr)
 {
     id            = dr.GetInt();
     bannerGroupId = dr.GetInt();
     filename      = dr.GetString();
     link          = dr.GetString();
     status        = (RecordStatus)dr.GetInt();
     name          = dr.GetString();
     code          = dr.GetString();
 }
Exemple #18
0
        public WatchingScheme(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);
            int          i  = 0;

            id     = dr.GetInt32(i++);
            userId = dr.GetInt32(i++);
            name   = dr.GetString(i++);
            data   = WatchingSchemeData.Create(gr.GetString(i++));
        }
Exemple #19
0
        public Observation(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id                = gr.GetInt32();
            patientId         = gr.GetInt32();
            doctorId          = gr.GetInt32();
            time              = gr.GetDateTime();
            description       = ObservationData.Create(gr.GetString());
            observationTypeId = (ObservationTypeId)gr.GetInt32();
        }
Exemple #20
0
 public UserInfo(GmDataReader dr)
 {
     recordId = dr.GetInt();
     date     = dr.GetDateTime();
     name     = dr.GetString();
     email    = dr.GetString();
     psw      = dr.GetString();
     userRole = (UserRole)dr.GetInt();
     status   = (RecordStatus)dr.GetInt();
     picture  = dr.GetString();
 }
Exemple #21
0
 public ForumMessage(GmDataReader dr)
 {
     id           = dr.GetInt();
     messageId    = dr.GetInt();
     forumTopicId = dr.GetInt();
     date         = dr.GetDateTime();
     userId       = dr.GetInt();
     userName     = dr.GetString();
     text         = dr.GetString();
     status       = (RecordStatus)dr.GetInt();
 }
        public Analysis(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id             = gr.GetInt32();
            patientId      = gr.GetInt32();
            analysisTypeId = gr.GetInt32();
            requestDate    = gr.GetDateTime();
            executionDate  = (DateTime)gr.GetDateTime();
            analysisData   = AnalysisData.DeserializeString(gr.GetString());
        }
Exemple #23
0
        public Watching(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);
            int          i  = 0;

            id        = dr.GetInt32(i++);
            userId    = dr.GetInt32(i++);
            startTime = gr.GetDateTime(i++);
            endTime   = gr.GetDateTime(i++);
            data      = WatchingData.Create(gr.GetString(i++));
        }
        public ConfigRecord(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id         = gr.GetInt32();
            restoredId = gr.GetInt32();
            userId     = gr.GetInt32();
            version    = gr.GetInt32();
            time       = gr.GetDateTime();
            config     = Config.DeserializeString(gr.GetString());
            comment    = gr.GetString();
        }
        public PatientIdentification(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id                 = gr.GetInt32();
            surname            = gr.GetString();
            name               = gr.GetString();
            middleName         = gr.GetString();
            gender             = (GenderId)gr.GetInt();
            birthday           = gr.GetDateTime();
            identificationData = IdentificationData.Create(gr.GetString());
        }
        public Document(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);

            id             = gr.GetInt32();
            date           = gr.GetDateTime();
            userId         = gr.GetInt32();
            documentTypeId = (DocumentTypeId)gr.GetInt32();
            completed      = gr.GetBoolean();
            storekeeperId  = gr.GetInt32();
            nDays          = gr.GetInt32();
            documentData   = DocumentData.DeserializeString(gr.GetString());
        }
    public static Article GetArticle(GmConnection conn, string tag)
    {
        GmCommand cmd = conn.CreateCommand("select * from Articles where Tag=@Tag");

        cmd.AddString("Tag", tag);
        using (GmDataReader dr = cmd.ExecuteReader())
        {
            if (dr.Read())
            {
                return(new Article(dr));
            }
        }
        return(null);
    }
 public BannerTopic(GmDataReader dr)
 {
     id   = dr.GetInt32();
     name = dr.GetString();
     b1   = dr.GetInt32();
     b2   = dr.GetInt32();
     b3   = dr.GetInt32();
     b4   = dr.GetInt32();
     b5   = dr.GetInt32();
     b6   = dr.GetInt32();
     b7   = dr.GetInt32();
     b8   = dr.GetInt32();
     b9   = dr.GetInt32();
 }
Exemple #29
0
        public Document(DbDataReader dr)
        {
            GmDataReader gr = new GmDataReader(dr);
            int          i  = 0;

            id             = dr.GetInt32(i++);
            date           = dr.GetDateTime(i++);
            userId         = dr.GetInt32(i++);
            documentTypeId = (DocumentTypeId)dr.GetInt32(i++);
            completed      = dr.GetBoolean(i++);
            storekeeperId  = dr.GetInt32(i++);
            nDays          = dr.GetInt32(i++);
            documentData   = DocumentData.Create(gr.GetString(i++));
        }
Exemple #30
0
 public Candidate(GmDataReader dr)
 {
     id         = dr.GetInt();
     positionId = dr.GetInt();
     date       = dr.GetDateTime();
     name       = dr.GetString();
     surname    = dr.GetString();
     address    = dr.GetString();
     phone      = dr.GetString();
     link       = dr.GetString();
     email      = dr.GetString();
     resume     = dr.GetString();
     comments   = dr.GetString();
     status     = (RecordStatus)dr.GetInt();
 }