Example #1
0
        public bool Update(Formx f)
        {
            string sql = "UPDATE Form SET ";

            sql += string.Format("FormName='{0}', ", f.Name);
            sql += string.Format("DataEntryTemplateId={0}, ", f.DataEntryTemplateId);
            sql += string.Format("SavePath='{0}', ", f.SavePath);
            sql += string.Format("FileName='{0}', ", f.FileName);
            sql += string.Format("DocumentType='{0}', ", f.DocumentType);
            sql += string.Format("DocumentLength={0}, ", f.DocumentLength);
            sql += string.Format("DocumentData='{0}', ", f.DocumentData);
            sql += string.Format("LastPrintDate='{0}', ", f.LastPrintedDate);
            sql += string.Format("CreateDate='{0}', ", f.CreateDate);
            sql += string.Format("ModifiedDate='{0}'", f.ModifiedDate);
            sql += string.Format(" WHERE ID={0}", f.Id);

            return(DB.Update(sql));
        }
Example #2
0
        private Formx getDataObject(DataRow row)
        {
            Formx f = new Formx();

            f.Id   = Convert.ToInt32(row[0].ToString());
            f.Name = row[1].ToString();
            f.DataEntryTemplateId = Convert.ToInt32(row[2].ToString());
            f.SavePath            = row[3].ToString();
            f.FileName            = row[4].ToString();
            f.DocumentType        = row[5].ToString();
            f.DocumentLength      = Convert.ToInt32(row[6].ToString());
            f.DocumentData        = (byte[])(row[7]);
            f.LastPrintedDate     = row[8].ToString();
            f.CreateDate          = DateTime.Parse(row[9].ToString());
            f.ModifiedDate        = DateTime.Parse(row[10].ToString());

            f.FormSeries = FormSeriesDAO.DAO.GetByFormId(f.Id);

            return(f);
        }
Example #3
0
 public rptForm(Formx nf)
 {
     this.f = nf;
     InitializeComponent();
 }
Example #4
0
 public bool Delete(Formx f)
 {
     return(this.Delete(f.Id));
 }
Example #5
0
 public int Insert(Formx f)
 {
     return(this.Insert(f.Name, f.DataEntryTemplateId, f.SavePath, f.FileName, f.DocumentType, f.DocumentLength, f.DocumentData, f.CreateDate, f.ModifiedDate));
 }