Example #1
0
        public DataSet GetFormData_Casi(string spName)
        {
            SQLiteCommand     cmd = null;
            CConnection       cn  = null;
            SQLiteDataAdapter da  = null;
            DataSet           ds  = null;

            try
            {
                cn = new CConnection();

                cmd             = new SQLiteCommand();
                cmd.Connection  = cn.cn;
                cmd.CommandText = spName;
                cmd.CommandType = CommandType.Text;

                da = new SQLiteDataAdapter(cmd);
                ds = new DataSet();
                da.Fill(ds);
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            finally
            {
                cmd = null;
                cn  = null;
            }

            return(ds);
        }
Example #2
0
        private void updateCampPatient_Detail(string id)
        {
            CDBOperations obj_op = null;
            CConnection   cn     = new CConnection();


            try
            {
                obj_op = new CDBOperations();

                SQLiteDataAdapter da = new SQLiteDataAdapter("update camp_patient_dtl set synced=1, synceddate='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "' where id = '" + id + "'", cn.cn);
                DataSet           ds = new DataSet();
                da.Fill(ds);
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            finally
            {
                obj_op = null;
            }
        }
Example #3
0
        public DataSet DeleteForm1(string FormID, string spName, string fldvalue, string visitid)
        {
            SQLiteCommand     cmd   = null;
            CConnection       cn    = null;
            SQLiteDataAdapter da    = null;
            DataSet           ds    = null;
            SQLiteTransaction trans = null;

            try
            {
                cn = new CConnection();
                cn.MConnOpen();

                trans = cn.cn.BeginTransaction();

                cmd             = new SQLiteCommand();
                cmd.Connection  = cn.cn;
                cmd.CommandText = spName;
                cmd.Transaction = trans;
                cmd.CommandType = CommandType.StoredProcedure;

                if (FormID == "")
                {
                    cmd.Parameters.AddWithValue("FormID", "NULL");
                }
                else
                {
                    cmd.Parameters.AddWithValue("FormID", FormID);
                }


                cmd.Parameters.AddWithValue("fldvalue", fldvalue);
                cmd.Parameters.AddWithValue("visitid", visitid);


                da = new SQLiteDataAdapter(cmd);
                ds = new DataSet();
                da.Fill(ds);


                trans.Commit();
            }

            catch (Exception ex)
            {
                trans.Rollback();
                MessageBox.Show(ex.Message);
            }

            finally
            {
                cn.MConnClose();
                cmd = null;
                cn  = null;
            }

            return(ds);
        }
Example #4
0
        private void getDistrict()
        {
            CConnection cn = new CConnection();

            SQLiteDataAdapter da = new SQLiteDataAdapter("select * from district where provid='" + q4.SelectedValue + "' order by district", cn.cn);
            DataSet           ds = new DataSet();

            da.Fill(ds);

            q5.DisplayMember = "district";
            q5.ValueMember   = "id";
            q5.DataSource    = ds.Tables[0];
        }
Example #5
0
        private void getProvince()
        {
            CConnection cn = new CConnection();

            SQLiteDataAdapter da = new SQLiteDataAdapter("select * from province order by province", cn.cn);
            DataSet           ds = new DataSet();

            da.Fill(ds);

            q4.DisplayMember = "province";
            q4.ValueMember   = "id";
            q4.DataSource    = ds.Tables[0];
        }
Example #6
0
        private void CheckMHSNo()
        {
            CDBOperations obj_op = null;
            CConnection   cn     = new CConnection();


            try
            {
                obj_op = new CDBOperations();

                SQLiteDataAdapter da = new SQLiteDataAdapter("select * from camp_patient where mh02='" + mh02.Text + "'", cn.cn);
                DataSet           ds = new DataSet();

                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        mh01.Text = ds.Tables[0].Rows[0]["mh01"].ToString();
                        mh02.Text = ds.Tables[0].Rows[0]["mh02"].ToString();
                        mh03.Text = ds.Tables[0].Rows[0]["mh03"].ToString();
                        mh04.Text = ds.Tables[0].Rows[0]["mh04"].ToString();
                        mh05.Text = ds.Tables[0].Rows[0]["mh05"].ToString();

                        mh06.SelectedValue = ds.Tables[0].Rows[0]["mh06"].ToString();

                        mh07.Text = ds.Tables[0].Rows[0]["mh07"].ToString();
                        mh08.Text = ds.Tables[0].Rows[0]["mh08"].ToString();
                    }
                    else
                    {
                        MessageBox.Show("MHS Id does not exist ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        mh02.Focus();
                    }
                }
                else
                {
                    MessageBox.Show("MHS Id does not exist ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    mh02.Focus();
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            finally
            {
                obj_op = null;
            }
        }
Example #7
0
        public List <forms_data_master> fetchData_master()
        {
            CConnection cn = new CConnection();

            List <forms_data_master> forms = new List <forms_data_master>();

            try
            {
                SQLiteDataAdapter da = new SQLiteDataAdapter("select * from camp_patient where synced is null or synced = ''", cn.cn);
                DataSet           ds = new DataSet();
                da.Fill(ds);


                for (int a = 0; a <= ds.Tables[0].Rows.Count - 1; a++)
                {
                    forms_data_master fd = new forms_data_master();

                    fd._id       = ds.Tables[0].Rows[a]["id"].ToString();
                    fd.deviceid  = SystemInformation.ComputerName;
                    fd.sysdate   = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    fd.id        = ds.Tables[0].Rows[a]["id"].ToString();
                    fd.mh01      = ds.Tables[0].Rows[a]["mh01"].ToString();
                    fd.mh02      = ds.Tables[0].Rows[a]["mh02"].ToString();
                    fd.mh03      = ds.Tables[0].Rows[a]["mh03"].ToString();
                    fd.mh04      = ds.Tables[0].Rows[a]["mh04"].ToString();
                    fd.mh05      = ds.Tables[0].Rows[a]["mh05"].ToString();
                    fd.uccode    = ds.Tables[0].Rows[a]["uccode"].ToString();
                    fd.dist_id   = ds.Tables[0].Rows[a]["dist_id"].ToString();
                    fd.databy    = "desktop";
                    fd.userid    = ds.Tables[0].Rows[a]["userid"].ToString();
                    fd.entrydate = ds.Tables[0].Rows[a]["entrydate"].ToString();
                    fd.form_id   = ds.Tables[0].Rows[a]["form_id"].ToString();


                    forms.Add(fd);
                }
            }

            catch (Exception ex)
            {
            }

            finally
            {
            }

            return(forms);
        }
Example #8
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            if (rdoMale.Checked == false && rdoFemale.Checked == false)
            {
                MessageBox.Show("Please select gender ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                rdoMale.Focus();
            }
            else
            {
                DateTime dt_q2 = new DateTime();
                System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB");
                dt_q2 = Convert.ToDateTime(q2.Text);

                string[] dt  = dt_q2.ToShortDateString().Split('/');
                string   dt1 = dt[1] + "/" + dt[0] + "/" + dt[2];



                string var_q8 = "";

                if (rdoMale.Checked == true)
                {
                    var_q8 = "1";
                }
                else if (rdoFemale.Checked == true)
                {
                    var_q8 = "2";
                }

                CConnection cn = new CConnection();

                //SQLiteDataAdapter da = new SQLiteDataAdapter("insert into form (q1, q2, q3, q4, q5, q6, q7, q8) values('" + q1.Text + "', '" + dt1 + "', '" + q3.Text + "', '" + q4.SelectedValue + "', '" + q5.SelectedValue + "', '" + q6.Text + "', '" + q7.Text + "', '" + var_q8 + "')", cn.cn);
                //DataSet ds = new DataSet();
                //da.Fill(ds);


                SQLiteDataAdapter da = new SQLiteDataAdapter("insert into forms (q1, q2, q3, q4, q5, q6, q7, q8) values('" + q1.Text + "', '" + dt1 + "', '" + q3.Text.Replace("'", "") + "', '" + q4.SelectedValue + "', '" + q5.SelectedValue + "', '" + q6.Text + "', '" + q7.Text.Replace("'", "") + "', '" + var_q8 + "')", cn.cn);
                DataSet           ds = new DataSet();
                da.Fill(ds);


                MessageBox.Show("Record saved successfully ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

                ClearFields();
            }
        }
Example #9
0
        private void UCDropDown()
        {
            try
            {
                CConnection cn = new CConnection();

                SQLiteDataAdapter da = new SQLiteDataAdapter("select * from UC ", cn.cn);
                DataSet           ds = new DataSet();
                da.Fill(ds);
                da.Fill(ds);

                combox_cr03.DataSource    = ds.Tables[0];
                combox_cr03.DisplayMember = "UC";
                combox_cr03.ValueMember   = "id";
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #10
0
        private void GetTotalForms()
        {
            CDBOperations obj_op = null;
            CConnection   cn     = new CConnection();


            try
            {
                obj_op = new CDBOperations();

                SQLiteDataAdapter da = new SQLiteDataAdapter("select count(*) count1 from camp_patient", cn.cn);
                DataSet           ds = new DataSet();

                if (ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        if (ds.Tables[0].Rows[0]["count1"].ToString() == "0")
                        {
                            label51.Text = "1";
                        }
                        else
                        {
                            label51.Text = ds.Tables[0].Rows[0]["count1"].ToString();
                        }
                    }
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            finally
            {
                obj_op = null;
            }
        }
Example #11
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (rdoEng.Checked == false && rdoUrdu.Checked == false)
            {
                MessageBox.Show("Please select at least one language ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            else
            {
                CConnection cn = new CConnection();

                SQLiteDataAdapter da = new SQLiteDataAdapter("select * from users where username='******' and password='******'", cn.cn);
                DataSet           ds = new DataSet();
                da.Fill(ds);

                if (ds != null)
                {
                    if (ds.Tables.Count > 0)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            CVariables.UserID      = ds.Tables[0].Rows[0][0].ToString();
                            CVariables.UserName    = ds.Tables[0].Rows[0][1].ToString();
                            CVariables.GetPassword = ds.Tables[0].Rows[0]["password"].ToString();
                            CVariables.GetDBName   = "gbdata";


                            CVariables.IsUserFirstOrSecond = "User1";


                            if (ds.Tables[0].Rows[0]["IsUserOrAdmin"].ToString() == "True")
                            {
                                CVariables.IsAdmin = true;
                            }
                            else
                            {
                                CVariables.IsAdmin = false;
                            }


                            if (rdoEng.Checked == true)
                            {
                                CVariables.setLanguage = "1";
                            }
                            else
                            {
                                CVariables.setLanguage = "2";
                            }


                            CVariables.frmlogin1 = this;
                            this.Hide();

                            frmMain obj_main = new frmMain();
                            obj_main.Show();
                        }
                        else
                        {
                            MessageBox.Show("User does not exist ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            txtUserID.Focus();
                        }
                    }
                    else
                    {
                        MessageBox.Show("User does not exist ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        txtUserID.Focus();
                    }
                }
                else
                {
                    MessageBox.Show("User does not exist ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    txtUserID.Focus();
                }
            }
        }
Example #12
0
        public void Download_ucs()
        {
            try
            {
                //string str_json = webGetMethod("http://*****:*****@"\\", "");
                //InsertData(str_json);


                WebRequest request = WebRequest.Create("http://f38158/gbapi/api/ucs.php");
                request.Method = "GET";
                WebResponse response = request.GetResponse();

                StreamReader sr         = new StreamReader(response.GetResponseStream());
                string       jsonString = sr.ReadToEnd();


                sr.Close();

                //String Users = File.ReadAllText(str[0]);


                //using (StreamReader re = new StreamReader(jsonString))
                //{

                //User usr = JsonConvert.DeserializeObject<User>(jsonString);


                var obj = JsonConvert.DeserializeObject <List <ucs_model> >(jsonString);


                CConnection cn = new CConnection();

                SQLiteDataAdapter da = null;
                DataSet           ds = null;

                da = new SQLiteDataAdapter("delete from ucs", cn.cn);
                ds = new DataSet();
                da.Fill(ds);


                for (int a = 0; a <= obj.Count - 1; a++)
                {
                    string qry = "insert into ucs(uc_code,uc_name,tehsil_code) values('" + obj[a].uc_code + "', '" + obj[a].uc_name + "', '" + obj[a].district_code + "')";

                    da = new SQLiteDataAdapter(qry, cn.cn);

                    ds = new DataSet();
                    da.Fill(ds);
                }


                MessageBox.Show("Users downloaded", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                txtUserID.Focus();
            }

            finally
            {
            }
        }
Example #13
0
        public DataSet ExecuteNonQuery_Casi(string[] fieldName, string[] fieldValues, string spName)
        {
            SQLiteCommand     cmd = null;
            CConnection       cn  = null;
            SQLiteDataAdapter da  = null;
            DataSet           ds  = null;

            CVariables.IsSuccess = false;

            string[] dt;

            try
            {
                cn = new CConnection();

                cmd             = new SQLiteCommand();
                cmd.Connection  = cn.cn;
                cmd.CommandText = spName;
                cmd.CommandType = CommandType.Text;

                for (int a = 0; a <= fieldName.Length - 1; a++)
                {
                    if (fieldValues[a] == " -" || fieldValues[a] == "  /  /" || fieldValues[a] == "  :" || fieldValues[a] == "" || fieldValues[a] == "  ." || fieldValues[a] == "  ." || fieldValues[a] == "    " || fieldValues[a] == "   ." || fieldValues[a] == "." || fieldValues[a] == "  .")
                    {
                        cmd.Parameters.AddWithValue(fieldName[a], DBNull.Value);
                    }
                    else
                    {
                        if (fieldName[a] == "mh01" || fieldName[a] == "EntryDate" || fieldName[a] == "CreationDate"
                            )
                        {
                            if (fieldValues[a].ToString() == "01/01/0001" || fieldValues[a].ToString() == "  /  /")
                            {
                                cmd.Parameters.AddWithValue(fieldName[a], DBNull.Value);
                            }
                            else
                            {
                                dt = fieldValues[a].Split('/');
                                cmd.Parameters.AddWithValue(fieldName[a], dt[1] + "/" + dt[0] + "/" + dt[2]);
                            }
                        }
                        else if (fieldName[a] == "mh012")
                        {
                            if (fieldValues[a].ToString() == "   .")
                            {
                                cmd.Parameters.AddWithValue(fieldName[a], DBNull.Value);
                            }
                            else
                            {
                                cmd.Parameters.AddWithValue(fieldName[a], fieldValues[a]);
                            }
                        }
                        else if (fieldName[a] == "mh013")
                        {
                            if (fieldValues[a].ToString() == "   .")
                            {
                                cmd.Parameters.AddWithValue(fieldName[a], DBNull.Value);
                            }
                            else
                            {
                                cmd.Parameters.AddWithValue(fieldName[a], fieldValues[a]);
                            }
                        }
                        else if (fieldName[a] == "mh014")
                        {
                            if (fieldValues[a].ToString() == "  .")
                            {
                                cmd.Parameters.AddWithValue(fieldName[a], DBNull.Value);
                            }
                            else
                            {
                                cmd.Parameters.AddWithValue(fieldName[a], fieldValues[a]);
                            }
                        }
                        else
                        {
                            cmd.Parameters.AddWithValue(fieldName[a], fieldValues[a]);
                        }
                    }
                }

                da = new SQLiteDataAdapter(cmd);
                ds = new DataSet();
                da.Fill(ds);

                CVariables.IsSuccess = true;
            }

            catch (Exception ex)
            {
                if (ex.Message == "String was not recognized as a valid DateTime.")
                {
                    MessageBox.Show("Invalid Date format. Date must be entered in dd/mm/yyyy format ", "Date Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    MessageBox.Show(ex.Message);
                }
            }

            finally
            {
                cmd = null;
                cn  = null;
            }

            return(ds);
        }
Example #14
0
        private void cmdSync_Click(object sender, EventArgs e)
        {
            CConnection cn = new CConnection();

            //SQLiteDataAdapter da = new SQLiteDataAdapter("select q1, strftime('%Y/%m/%d',datetime(substr(q2, 7, 4) || '-' || substr(q2, 1, 2) || '-' || substr(q2, 4, 2))) d2, q3, q4, q5, q6, q7, q8 from forms", cn.cn);

            SQLiteDataAdapter da = new SQLiteDataAdapter("select q1, strftime('%Y-%m-%d',datetime(substr(q2, 7, 4) || '-' || substr(q2, 1, 2) || '-' || substr(q2, 4, 2))) q2, q3, q4, q5, q6, q7, q8, _id, deviceid, strftime('%Y-%m-%d',datetime(substr(sysdate, 7, 4) || '-' || substr(sysdate, 1, 2) || '-' || substr(sysdate, 4, 2))) sysdate, synced, strftime('%Y-%m-%d', datetime(substr(syncedDate, 7, 4) || '-' || substr(syncedDate, 1, 2) || '-' || substr(syncedDate, 4, 2))) syncedDate from forms", cn.cn);
            DataSet           ds = new DataSet();

            da.Fill(ds);

            var httpWebRequest = (HttpWebRequest)WebRequest.Create("http://F46916:8080/uen_hfa/api/sync.php");

            httpWebRequest.ContentType = "application/json";
            httpWebRequest.Method      = "POST";

            string myjson = DataTableToJsonObj(ds.Tables[0]);


            //string JSONString = string.Empty;

            //JSONString = JsonConvert.SerializeObject(ds.Tables[0]);


            using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
            {
                streamWriter.Write(myjson);
            }



            //string json = "";

            //using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
            //{

            //    var objectToSerialize = new RootObject();
            //    objectToSerialize.frm = new List<forms>
            //              {
            //                 new forms { pro_q1 = "1", pro_q2 = "index1" }
            //              };


            //    streamWriter.Write(new JavaScriptConverter().Serialize()
            //        {
            //        });
            //}


            var result = "";

            var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();

            using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
            {
                result = streamReader.ReadToEnd();
            }


            //var result = "";
            //var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
            //using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
            //{
            //    result = streamReader.ReadToEnd();
            //}


            MessageBox.Show(result, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
Example #15
0
        public List <forms_data> fetchData()
        {
            CConnection cn = new CConnection();

            List <forms_data> forms = new List <forms_data>();

            try
            {
                SQLiteDataAdapter da = new SQLiteDataAdapter("select * from camp_patient_dtl where synced is null or synced = ''", cn.cn);
                DataSet           ds = new DataSet();
                da.Fill(ds);


                for (int a = 0; a <= ds.Tables[0].Rows.Count - 1; a++)
                {
                    forms_data fd = new forms_data();

                    fd._id      = ds.Tables[0].Rows[a]["id"].ToString();
                    fd.deviceid = SystemInformation.ComputerName;
                    fd.sysdate  = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    fd.id       = ds.Tables[0].Rows[a]["id"].ToString();
                    fd.form_id  = ds.Tables[0].Rows[a]["form_id"].ToString();
                    fd.mh01     = ds.Tables[0].Rows[a]["mh01"].ToString();
                    fd.mh02     = ds.Tables[0].Rows[a]["mh02"].ToString();
                    fd.mh03     = ds.Tables[0].Rows[a]["mh03"].ToString();
                    fd.mh04     = ds.Tables[0].Rows[a]["mh04"].ToString();
                    fd.mh05     = ds.Tables[0].Rows[a]["mh05"].ToString();
                    fd.mh06     = ds.Tables[0].Rows[a]["mh06"].ToString();
                    fd.mh07     = ds.Tables[0].Rows[a]["mh07"].ToString();
                    fd.mh08     = ds.Tables[0].Rows[a]["mh08"].ToString();
                    fd.mh09y    = ds.Tables[0].Rows[a]["mh09y"].ToString();
                    fd.mh09m    = ds.Tables[0].Rows[a]["mh09m"].ToString();
                    fd.mh09d    = ds.Tables[0].Rows[a]["mh09d"].ToString();
                    fd.mh010    = ds.Tables[0].Rows[a]["mh010"].ToString();

                    fd.mh010a = ds.Tables[0].Rows[a]["mh010a"].ToString();

                    fd.mh01101 = ds.Tables[0].Rows[a]["mh01101"].ToString();
                    fd.mh01102 = ds.Tables[0].Rows[a]["mh01102"].ToString();
                    fd.mh01103 = ds.Tables[0].Rows[a]["mh01103"].ToString();

                    fd.mh012     = ds.Tables[0].Rows[a]["mh012"].ToString();
                    fd.chkWeight = ds.Tables[0].Rows[a]["chkWeight"].ToString();


                    fd.mh013     = ds.Tables[0].Rows[a]["mh013"].ToString();
                    fd.mh014     = ds.Tables[0].Rows[a]["mh014"].ToString();
                    fd.mh015     = ds.Tables[0].Rows[a]["mh015"].ToString();
                    fd.chkHeight = ds.Tables[0].Rows[a]["chkHeight"].ToString();
                    fd.mh016     = ds.Tables[0].Rows[a]["mh016"].ToString();
                    fd.chkMUAC   = ds.Tables[0].Rows[a]["chkMUAC"].ToString();

                    fd.mh011 = ds.Tables[0].Rows[a]["mh011"].ToString();


                    fd.mh01701   = ds.Tables[0].Rows[a]["mh01701"].ToString();
                    fd.mh01702   = ds.Tables[0].Rows[a]["mh01702"].ToString();
                    fd.mh01703   = ds.Tables[0].Rows[a]["mh01703"].ToString();
                    fd.mh01704   = ds.Tables[0].Rows[a]["mh01704"].ToString();
                    fd.mh01705   = ds.Tables[0].Rows[a]["mh01705"].ToString();
                    fd.mh017077  = ds.Tables[0].Rows[a]["mh017077"].ToString();
                    fd.mh017077x = ds.Tables[0].Rows[a]["mh017077x"].ToString();


                    fd.mh01801   = ds.Tables[0].Rows[a]["mh01801"].ToString();
                    fd.mh01802   = ds.Tables[0].Rows[a]["mh01802"].ToString();
                    fd.mh01803   = ds.Tables[0].Rows[a]["mh01803"].ToString();
                    fd.mh01804   = ds.Tables[0].Rows[a]["mh01804"].ToString();
                    fd.mh01805   = ds.Tables[0].Rows[a]["mh01805"].ToString();
                    fd.mh01806   = ds.Tables[0].Rows[a]["mh01806"].ToString();
                    fd.mh01807   = ds.Tables[0].Rows[a]["mh01807"].ToString();
                    fd.mh01808   = ds.Tables[0].Rows[a]["mh01808"].ToString();
                    fd.mh01809   = ds.Tables[0].Rows[a]["mh01809"].ToString();
                    fd.mh018010  = ds.Tables[0].Rows[a]["mh018010"].ToString();
                    fd.mh018011  = ds.Tables[0].Rows[a]["mh018011"].ToString();
                    fd.mh018012  = ds.Tables[0].Rows[a]["mh018012"].ToString();
                    fd.mh018013  = ds.Tables[0].Rows[a]["mh018013"].ToString();
                    fd.mh018014  = ds.Tables[0].Rows[a]["mh018014"].ToString();
                    fd.mh018015  = ds.Tables[0].Rows[a]["mh018015"].ToString();
                    fd.mh018016  = ds.Tables[0].Rows[a]["mh018016"].ToString();
                    fd.mh018077  = ds.Tables[0].Rows[a]["mh018077"].ToString();
                    fd.mh018077x = ds.Tables[0].Rows[a]["mh018077x"].ToString();

                    fd.chkNoneDiag = ds.Tables[0].Rows[a]["chkNoneDiag"].ToString();


                    fd.mh01901   = ds.Tables[0].Rows[a]["mh01901"].ToString();
                    fd.mh01902   = ds.Tables[0].Rows[a]["mh01902"].ToString();
                    fd.mh01903   = ds.Tables[0].Rows[a]["mh01903"].ToString();
                    fd.mh01904   = ds.Tables[0].Rows[a]["mh01904"].ToString();
                    fd.mh01905   = ds.Tables[0].Rows[a]["mh01905"].ToString();
                    fd.mh01906   = ds.Tables[0].Rows[a]["mh01906"].ToString();
                    fd.mh01907   = ds.Tables[0].Rows[a]["mh01907"].ToString();
                    fd.mh01908   = ds.Tables[0].Rows[a]["mh01908"].ToString();
                    fd.mh01909   = ds.Tables[0].Rows[a]["mh01909"].ToString();
                    fd.mh019010  = ds.Tables[0].Rows[a]["mh019010"].ToString();
                    fd.mh019011  = ds.Tables[0].Rows[a]["mh019011"].ToString();
                    fd.mh019012  = ds.Tables[0].Rows[a]["mh019012"].ToString();
                    fd.mh019013  = ds.Tables[0].Rows[a]["mh019013"].ToString();
                    fd.mh019014  = ds.Tables[0].Rows[a]["mh019014"].ToString();
                    fd.mh019015  = ds.Tables[0].Rows[a]["mh019015"].ToString();
                    fd.mh019017  = ds.Tables[0].Rows[a]["mh019017"].ToString();
                    fd.mh019077  = ds.Tables[0].Rows[a]["mh019077"].ToString();
                    fd.mh019077x = ds.Tables[0].Rows[a]["mh019077x"].ToString();
                    fd.chkNone   = ds.Tables[0].Rows[a]["chkNone"].ToString();


                    fd.mh020 = ds.Tables[0].Rows[a]["mh020"].ToString();
                    fd.mh021 = ds.Tables[0].Rows[a]["mh021"].ToString();

                    fd.mh021a      = ds.Tables[0].Rows[a]["mh021a"].ToString();
                    fd.mh021TTDose = ds.Tables[0].Rows[a]["mh021TTDose"].ToString();


                    fd.mh022 = ds.Tables[0].Rows[a]["mh022"].ToString();
                    fd.mh023 = ds.Tables[0].Rows[a]["mh023"].ToString();
                    fd.mh024 = ds.Tables[0].Rows[a]["mh024"].ToString();
                    fd.mh025 = ds.Tables[0].Rows[a]["mh025"].ToString();



                    fd.mh032 = ds.Tables[0].Rows[a]["mh032"].ToString();
                    fd.mh030 = ds.Tables[0].Rows[a]["mh030"].ToString();
                    fd.mh033 = ds.Tables[0].Rows[a]["mh033"].ToString();
                    fd.mh031 = ds.Tables[0].Rows[a]["mh031"].ToString();



                    fd.mh02601 = ds.Tables[0].Rows[a]["mh02601"].ToString();
                    fd.mh02602 = ds.Tables[0].Rows[a]["mh02602"].ToString();
                    fd.mh02603 = ds.Tables[0].Rows[a]["mh02603"].ToString();
                    fd.mh02604 = ds.Tables[0].Rows[a]["mh02604"].ToString();
                    fd.mh02605 = ds.Tables[0].Rows[a]["mh02605"].ToString();
                    fd.mh02606 = ds.Tables[0].Rows[a]["mh02606"].ToString();
                    fd.mh027a  = ds.Tables[0].Rows[a]["mh027a"].ToString();

                    fd.mh02607  = ds.Tables[0].Rows[a]["mh02607"].ToString();
                    fd.mh02608  = ds.Tables[0].Rows[a]["mh02608"].ToString();
                    fd.mh02609  = ds.Tables[0].Rows[a]["mh02609"].ToString();
                    fd.mh026010 = ds.Tables[0].Rows[a]["mh026010"].ToString();
                    fd.mh026011 = ds.Tables[0].Rows[a]["mh026011"].ToString();
                    fd.mh027b   = ds.Tables[0].Rows[a]["mh027b"].ToString();

                    fd.mh026012       = ds.Tables[0].Rows[a]["mh026012"].ToString();
                    fd.mh026013       = ds.Tables[0].Rows[a]["mh026013"].ToString();
                    fd.mh026014       = ds.Tables[0].Rows[a]["mh026014"].ToString();
                    fd.mh026015       = ds.Tables[0].Rows[a]["mh026015"].ToString();
                    fd.mh026016       = ds.Tables[0].Rows[a]["mh026016"].ToString();
                    fd.mh026017       = ds.Tables[0].Rows[a]["mh026017"].ToString();
                    fd.mh026018       = ds.Tables[0].Rows[a]["mh026018"].ToString();
                    fd.mh026019       = ds.Tables[0].Rows[a]["mh026019"].ToString();
                    fd.mh026Sup       = ds.Tables[0].Rows[a]["mh026Sup"].ToString();
                    fd.chkVaccination = ds.Tables[0].Rows[a]["chkVaccination"].ToString();


                    fd.mh027 = ds.Tables[0].Rows[a]["mh027"].ToString();
                    fd.mh028 = ds.Tables[0].Rows[a]["mh028"].ToString();
                    fd.mh029 = ds.Tables[0].Rows[a]["mh029"].ToString();

                    fd.uccode    = ds.Tables[0].Rows[a]["uccode"].ToString();
                    fd.dist_id   = ds.Tables[0].Rows[a]["dist_id"].ToString();
                    fd.databy    = "desktop";
                    fd.userid    = ds.Tables[0].Rows[a]["userid"].ToString();
                    fd.entrydate = ds.Tables[0].Rows[a]["entrydate"].ToString();
                    fd.master_id = ds.Tables[0].Rows[a]["master_id"].ToString();
                    fd.ver       = ds.Tables[0].Rows[a]["ver"].ToString();


                    forms.Add(fd);
                }
            }

            catch (Exception ex)
            {
            }

            finally
            {
            }

            return(forms);
        }