Example #1
0
        public locationDMCS Insert(locationDMCS id)
        {
            string        ConnectionString = IDManager.connection();
            SqlConnection con = new SqlConnection(ConnectionString);

            try
            {
                con.Open();
                SqlCommand cmd = new SqlCommand("SP_DMCS_INSERT_LOCATIONDMCS", con);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@city", id.city);
                cmd.Parameters.AddWithValue("@county", id.county);
                cmd.Parameters.AddWithValue("@e_lat", id.e_lat);
                cmd.Parameters.AddWithValue("@e_long", id.e_long);
                cmd.Parameters.AddWithValue("@location_desc", id.location_desc);
                cmd.Parameters.AddWithValue("@n_lat", id.n_lat);
                cmd.Parameters.AddWithValue("@n_long", id.n_long);
                cmd.Parameters.AddWithValue("@state", id.state);
                cmd.Parameters.AddWithValue("@type", id.type);
                cmd.Parameters.AddWithValue("@w_lat", id.w_lat);
                cmd.Parameters.AddWithValue("@w_long", id.w_long);
                cmd.Parameters.AddWithValue("@zip", id.zip);
                cmd.ExecuteReader();
                con.Close();
                con.Open();
                cmd             = new SqlCommand("SP_DMCS_GET_LOCATIONDMCS", con);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@city", id.city);
                cmd.Parameters.AddWithValue("@county", id.county);
                cmd.Parameters.AddWithValue("@e_lat", id.e_lat);
                cmd.Parameters.AddWithValue("@e_long", id.e_long);
                cmd.Parameters.AddWithValue("@location_desc", id.location_desc);
                cmd.Parameters.AddWithValue("@n_lat", id.n_lat);
                cmd.Parameters.AddWithValue("@n_long", id.n_long);
                cmd.Parameters.AddWithValue("@state", id.state);
                cmd.Parameters.AddWithValue("@type", id.type);
                cmd.Parameters.AddWithValue("@w_lat", id.w_lat);
                cmd.Parameters.AddWithValue("@w_long", id.w_long);
                cmd.Parameters.AddWithValue("@zip", id.zip);
                SqlDataReader rdr = cmd.ExecuteReader();
                if (rdr.HasRows)
                {
                    rdr.Read();
                    id.locationdmcs_id = rdr.GetInt32(0);
                }
            }
            catch (Exception ex)
            {
                id.SetColumnDefaults();
            }
            finally
            {
                con.Close();
            }
            return(id);
        }
 public locationDMCS Insert_locationDMCS_select(int ID)
 {
     locationDMCS = locationDMCS.Select(ID);
     Insert_city_txt.Text = Convert.ToString(locationDMCS.city);
     Insert_county_txt.Text = Convert.ToString(locationDMCS.county);
     Insert_e_lat_txt.Text = Convert.ToString(locationDMCS.e_lat);
     Insert_e_long_txt.Text = Convert.ToString(locationDMCS.e_long);
     Insert_location_desc_txt.Text = Convert.ToString(locationDMCS.location_desc);
     Insert_n_lat_txt.Text = Convert.ToString(locationDMCS.n_lat);
     Insert_n_long_txt.Text = Convert.ToString(locationDMCS.n_long);
     Insert_state_txt.Text = Convert.ToString(locationDMCS.state);
     Insert_type_txt.Text = Convert.ToString(locationDMCS.type);
     Insert_w_lat_txt.Text = Convert.ToString(locationDMCS.w_lat);
     Insert_w_long_txt.Text = Convert.ToString(locationDMCS.w_long);
     Insert_zip_txt.Text = Convert.ToString(locationDMCS.zip);
     return locationDMCS;
 }
Example #3
0
 public locationDMCS Insert_locationDMCS_select(int ID)
 {
     locationDMCS                  = locationDMCS.Select(ID);
     Insert_city_txt.Text          = Convert.ToString(locationDMCS.city);
     Insert_county_txt.Text        = Convert.ToString(locationDMCS.county);
     Insert_e_lat_txt.Text         = Convert.ToString(locationDMCS.e_lat);
     Insert_e_long_txt.Text        = Convert.ToString(locationDMCS.e_long);
     Insert_location_desc_txt.Text = Convert.ToString(locationDMCS.location_desc);
     Insert_n_lat_txt.Text         = Convert.ToString(locationDMCS.n_lat);
     Insert_n_long_txt.Text        = Convert.ToString(locationDMCS.n_long);
     Insert_state_txt.Text         = Convert.ToString(locationDMCS.state);
     Insert_type_txt.Text          = Convert.ToString(locationDMCS.type);
     Insert_w_lat_txt.Text         = Convert.ToString(locationDMCS.w_lat);
     Insert_w_long_txt.Text        = Convert.ToString(locationDMCS.w_long);
     Insert_zip_txt.Text           = Convert.ToString(locationDMCS.zip);
     return(locationDMCS);
 }
 public locationDMCS Delete_locationDMCS_select(int ID)
 {
     locationDMCS = locationDMCS.Select(ID);
     Delete_locationdmcs_id_txt_lbl.Text = Convert.ToString(locationDMCS.locationdmcs_id);
     Delete_city_txt_lbl.Text = Convert.ToString(locationDMCS.city);
     Delete_county_txt_lbl.Text = Convert.ToString(locationDMCS.county);
     Delete_e_lat_txt_lbl.Text = Convert.ToString(locationDMCS.e_lat);
     Delete_e_long_txt_lbl.Text = Convert.ToString(locationDMCS.e_long);
     Delete_location_desc_txt_lbl.Text = Convert.ToString(locationDMCS.location_desc);
     Delete_n_lat_txt_lbl.Text = Convert.ToString(locationDMCS.n_lat);
     Delete_n_long_txt_lbl.Text = Convert.ToString(locationDMCS.n_long);
     Delete_state_txt_lbl.Text = Convert.ToString(locationDMCS.state);
     Delete_type_txt_lbl.Text = Convert.ToString(locationDMCS.type);
     Delete_w_lat_txt_lbl.Text = Convert.ToString(locationDMCS.w_lat);
     Delete_w_long_txt_lbl.Text = Convert.ToString(locationDMCS.w_long);
     Delete_zip_txt_lbl.Text = Convert.ToString(locationDMCS.zip);
     return locationDMCS;
 }
Example #5
0
 public locationDMCS Delete_locationDMCS_select(int ID)
 {
     locationDMCS = locationDMCS.Select(ID);
     Delete_locationdmcs_id_txt_lbl.Text = Convert.ToString(locationDMCS.locationdmcs_id);
     Delete_city_txt_lbl.Text            = Convert.ToString(locationDMCS.city);
     Delete_county_txt_lbl.Text          = Convert.ToString(locationDMCS.county);
     Delete_e_lat_txt_lbl.Text           = Convert.ToString(locationDMCS.e_lat);
     Delete_e_long_txt_lbl.Text          = Convert.ToString(locationDMCS.e_long);
     Delete_location_desc_txt_lbl.Text   = Convert.ToString(locationDMCS.location_desc);
     Delete_n_lat_txt_lbl.Text           = Convert.ToString(locationDMCS.n_lat);
     Delete_n_long_txt_lbl.Text          = Convert.ToString(locationDMCS.n_long);
     Delete_state_txt_lbl.Text           = Convert.ToString(locationDMCS.state);
     Delete_type_txt_lbl.Text            = Convert.ToString(locationDMCS.type);
     Delete_w_lat_txt_lbl.Text           = Convert.ToString(locationDMCS.w_lat);
     Delete_w_long_txt_lbl.Text          = Convert.ToString(locationDMCS.w_long);
     Delete_zip_txt_lbl.Text             = Convert.ToString(locationDMCS.zip);
     return(locationDMCS);
 }
Example #6
0
 public locationDMCS locationDMCS_insert()
 {
     locationDMCS.city          = Insert_city_txt.Text;
     locationDMCS.county        = Insert_county_txt.Text;
     locationDMCS.e_lat         = Convert.ToInt32(Insert_e_lat_txt.Text);
     locationDMCS.e_long        = Convert.ToInt32(Insert_e_long_txt.Text);
     locationDMCS.location_desc = Insert_location_desc_txt.Text;
     locationDMCS.n_lat         = Convert.ToInt32(Insert_n_lat_txt.Text);
     locationDMCS.n_long        = Convert.ToInt32(Insert_n_long_txt.Text);
     locationDMCS.state         = Insert_state_txt.Text;
     locationDMCS.type          = Insert_type_txt.Text;
     locationDMCS.w_lat         = Convert.ToInt32(Insert_w_lat_txt.Text);
     locationDMCS.w_long        = Convert.ToInt32(Insert_w_long_txt.Text);
     locationDMCS.zip           = Convert.ToInt32(Insert_zip_txt.Text);
     locationDMCS = locationDMCS.Insert(locationDMCS);
     Insert_locationDMCS_GridView.DataBind();
     Update_locationDMCS_GridView.DataBind();
     Delete_locationDMCS_GridView.DataBind();
     return(locationDMCS);
 }
Example #7
0
 public locationDMCS locationDMCS_update(int ID)
 {
     locationDMCS = locationDMCS.Select(ID);
     locationDMCS.locationdmcs_id = Convert.ToInt32(Update_locationdmcs_id_txt.Text);
     locationDMCS.city            = Update_city_txt.Text;
     locationDMCS.county          = Update_county_txt.Text;
     locationDMCS.e_lat           = Convert.ToInt32(Update_e_lat_txt.Text);
     locationDMCS.e_long          = Convert.ToInt32(Update_e_long_txt.Text);
     locationDMCS.location_desc   = Update_location_desc_txt.Text;
     locationDMCS.n_lat           = Convert.ToInt32(Update_n_lat_txt.Text);
     locationDMCS.n_long          = Convert.ToInt32(Update_n_long_txt.Text);
     locationDMCS.state           = Update_state_txt.Text;
     locationDMCS.type            = Update_type_txt.Text;
     locationDMCS.w_lat           = Convert.ToInt32(Update_w_lat_txt.Text);
     locationDMCS.w_long          = Convert.ToInt32(Update_w_long_txt.Text);
     locationDMCS.zip             = Convert.ToInt32(Update_zip_txt.Text);
     locationDMCS.Update(locationDMCS);
     Insert_locationDMCS_GridView.DataBind();
     Update_locationDMCS_GridView.DataBind();
     Delete_locationDMCS_GridView.DataBind();
     return(locationDMCS);
 }
Example #8
0
        public Boolean Update(locationDMCS id)
        {
            string        ConnectionString = IDManager.connection();
            SqlConnection con = new SqlConnection(ConnectionString);

            try
            {
                con.Open();
                SqlCommand cmd = new SqlCommand("SP_DMCS_UPDATE_LOCATIONDMCS", con);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@locationdmcs_id", id.locationdmcs_id);
                cmd.Parameters.AddWithValue("@city", id.city);
                cmd.Parameters.AddWithValue("@county", id.county);
                cmd.Parameters.AddWithValue("@e_lat", id.e_lat);
                cmd.Parameters.AddWithValue("@e_long", id.e_long);
                cmd.Parameters.AddWithValue("@location_desc", id.location_desc);
                cmd.Parameters.AddWithValue("@n_lat", id.n_lat);
                cmd.Parameters.AddWithValue("@n_long", id.n_long);
                cmd.Parameters.AddWithValue("@state", id.state);
                cmd.Parameters.AddWithValue("@type", id.type);
                cmd.Parameters.AddWithValue("@w_lat", id.w_lat);
                cmd.Parameters.AddWithValue("@w_long", id.w_long);
                cmd.Parameters.AddWithValue("@zip", id.zip);
                cmd.ExecuteReader();
                con.Close();
                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
            finally
            {
                con.Close();
            }
        }
 /////////////////////////
 ////////////////////////
 ///////////////////////
 //////////////////////
 /////////////////////
 //Update Tab Methods
 protected void Update_Select_Record(object sender, EventArgs e)
 {
     locationDMCS = Update_locationDMCS_select(Convert.ToInt32(Update_locationDMCS_GridView.SelectedValue));
 }
 protected void UPDATE(object sender, EventArgs e)
 {
     locationDMCS = locationDMCS_update(Convert.ToInt32(Update_locationDMCS_GridView.SelectedValue));
 }
 protected void INSERT(object sender, EventArgs e)
 {
     locationDMCS = locationDMCS_insert();
 }
 public locationDMCS Select(int id)
 {
     locationDMCS locationDMCS = new locationDMCS();
     string ConnectionString = IDManager.connection();
     SqlConnection con = new SqlConnection(ConnectionString);
     try
     {
     con.Open();
     SqlCommand cmd = new SqlCommand("SP_DMCS_SELECT_LOCATIONDMCS", con);
     cmd.CommandType = System.Data.CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@locationdmcs_id", id);
     SqlDataReader rdr = cmd.ExecuteReader();
     if (rdr.HasRows)
     {
         rdr.Read();
         if (!rdr.IsDBNull(0))
         {
             locationDMCS.locationdmcs_id = rdr.GetInt32(0);
         }
         else
         {
             locationDMCS.locationdmcs_id = 0;
         }
         if (!rdr.IsDBNull(1))
         {
             locationDMCS.city = rdr.GetString(1);
         }
         else
         {
             locationDMCS.city = " ";
         }
         if (!rdr.IsDBNull(2))
         {
             locationDMCS.county = rdr.GetString(2);
         }
         else
         {
             locationDMCS.county = " ";
         }
         if (!rdr.IsDBNull(3))
         {
             locationDMCS.e_lat = rdr.GetInt32(3);
         }
         else
         {
             locationDMCS.e_lat = 0;
         }
         if (!rdr.IsDBNull(4))
         {
             locationDMCS.e_long = rdr.GetInt32(4);
         }
         else
         {
             locationDMCS.e_long = 0;
         }
         if (!rdr.IsDBNull(5))
         {
             locationDMCS.location_desc = rdr.GetString(5);
         }
         else
         {
             locationDMCS.location_desc = " ";
         }
         if (!rdr.IsDBNull(6))
         {
             locationDMCS.n_lat = rdr.GetInt32(6);
         }
         else
         {
             locationDMCS.n_lat = 0;
         }
         if (!rdr.IsDBNull(7))
         {
             locationDMCS.n_long = rdr.GetInt32(7);
         }
         else
         {
             locationDMCS.n_long = 0;
         }
         if (!rdr.IsDBNull(8))
         {
             locationDMCS.state = rdr.GetString(8);
         }
         else
         {
             locationDMCS.state = " ";
         }
         if (!rdr.IsDBNull(9))
         {
             locationDMCS.type = rdr.GetString(9);
         }
         else
         {
             locationDMCS.type = " ";
         }
         if (!rdr.IsDBNull(10))
         {
             locationDMCS.w_lat = rdr.GetInt32(10);
         }
         else
         {
             locationDMCS.w_lat = 0;
         }
         if (!rdr.IsDBNull(11))
         {
             locationDMCS.w_long = rdr.GetInt32(11);
         }
         else
         {
             locationDMCS.w_long = 0;
         }
         if (!rdr.IsDBNull(12))
         {
             locationDMCS.zip = rdr.GetInt32(12);
         }
         else
         {
             locationDMCS.zip = 0;
         }
         }
         else
         {
             locationDMCS.SetColumnDefaults();
         }
     }
     catch (Exception ex)
     {
     locationDMCS.SetColumnDefaults();
     return locationDMCS;
     }
     finally
     {
     con.Close();
     }
     return locationDMCS;
 }
 public locationDMCS Insert(locationDMCS id)
 {
     string ConnectionString = IDManager.connection();
     SqlConnection con = new SqlConnection(ConnectionString);
     try
     {
     con.Open();
     SqlCommand cmd = new SqlCommand("SP_DMCS_INSERT_LOCATIONDMCS", con);
     cmd.CommandType = System.Data.CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@city", id.city);
     cmd.Parameters.AddWithValue("@county", id.county);
     cmd.Parameters.AddWithValue("@e_lat", id.e_lat);
     cmd.Parameters.AddWithValue("@e_long", id.e_long);
     cmd.Parameters.AddWithValue("@location_desc", id.location_desc);
     cmd.Parameters.AddWithValue("@n_lat", id.n_lat);
     cmd.Parameters.AddWithValue("@n_long", id.n_long);
     cmd.Parameters.AddWithValue("@state", id.state);
     cmd.Parameters.AddWithValue("@type", id.type);
     cmd.Parameters.AddWithValue("@w_lat", id.w_lat);
     cmd.Parameters.AddWithValue("@w_long", id.w_long);
     cmd.Parameters.AddWithValue("@zip", id.zip);
     cmd.ExecuteReader();
     con.Close();
     con.Open();
     cmd = new SqlCommand("SP_DMCS_GET_LOCATIONDMCS", con);
     cmd.CommandType = System.Data.CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@city", id.city);
     cmd.Parameters.AddWithValue("@county", id.county);
     cmd.Parameters.AddWithValue("@e_lat", id.e_lat);
     cmd.Parameters.AddWithValue("@e_long", id.e_long);
     cmd.Parameters.AddWithValue("@location_desc", id.location_desc);
     cmd.Parameters.AddWithValue("@n_lat", id.n_lat);
     cmd.Parameters.AddWithValue("@n_long", id.n_long);
     cmd.Parameters.AddWithValue("@state", id.state);
     cmd.Parameters.AddWithValue("@type", id.type);
     cmd.Parameters.AddWithValue("@w_lat", id.w_lat);
     cmd.Parameters.AddWithValue("@w_long", id.w_long);
     cmd.Parameters.AddWithValue("@zip", id.zip);
     SqlDataReader rdr = cmd.ExecuteReader();
     if (rdr.HasRows)
     {
         rdr.Read();
         id.locationdmcs_id = rdr.GetInt32(0);
     }
     }
     catch (Exception ex)
     {
     id.SetColumnDefaults();
     }
     finally
     {
     con.Close();
     }
     return id;
 }
Example #14
0
 protected void INSERT(object sender, EventArgs e)
 {
     locationDMCS = locationDMCS_insert();
 }
Example #15
0
 /////////////////////////
 ////////////////////////
 ///////////////////////
 //////////////////////
 /////////////////////
 //Insert Tab Methods
 protected void Insert_Select_Record(object sender, EventArgs e)
 {
     locationDMCS = Insert_locationDMCS_select(Convert.ToInt32(Insert_locationDMCS_GridView.SelectedValue));
 }
 public locationDMCS locationDMCS_insert()
 {
     locationDMCS.city = Insert_city_txt.Text;
     locationDMCS.county = Insert_county_txt.Text;
     locationDMCS.e_lat = Convert.ToInt32(Insert_e_lat_txt.Text);
     locationDMCS.e_long = Convert.ToInt32(Insert_e_long_txt.Text);
     locationDMCS.location_desc = Insert_location_desc_txt.Text;
     locationDMCS.n_lat = Convert.ToInt32(Insert_n_lat_txt.Text);
     locationDMCS.n_long = Convert.ToInt32(Insert_n_long_txt.Text);
     locationDMCS.state = Insert_state_txt.Text;
     locationDMCS.type = Insert_type_txt.Text;
     locationDMCS.w_lat = Convert.ToInt32(Insert_w_lat_txt.Text);
     locationDMCS.w_long = Convert.ToInt32(Insert_w_long_txt.Text);
     locationDMCS.zip = Convert.ToInt32(Insert_zip_txt.Text);
     locationDMCS = locationDMCS.Insert(locationDMCS);
     Insert_locationDMCS_GridView.DataBind();
     Update_locationDMCS_GridView.DataBind();
     Delete_locationDMCS_GridView.DataBind();
     return locationDMCS;
 }
 public Boolean Update(locationDMCS id)
 {
     string ConnectionString = IDManager.connection();
     SqlConnection con = new SqlConnection(ConnectionString);
     try
     {
     con.Open();
     SqlCommand cmd = new SqlCommand("SP_DMCS_UPDATE_LOCATIONDMCS", con);
     cmd.CommandType = System.Data.CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@locationdmcs_id", id.locationdmcs_id);
     cmd.Parameters.AddWithValue("@city", id.city);
     cmd.Parameters.AddWithValue("@county", id.county);
     cmd.Parameters.AddWithValue("@e_lat", id.e_lat);
     cmd.Parameters.AddWithValue("@e_long", id.e_long);
     cmd.Parameters.AddWithValue("@location_desc", id.location_desc);
     cmd.Parameters.AddWithValue("@n_lat", id.n_lat);
     cmd.Parameters.AddWithValue("@n_long", id.n_long);
     cmd.Parameters.AddWithValue("@state", id.state);
     cmd.Parameters.AddWithValue("@type", id.type);
     cmd.Parameters.AddWithValue("@w_lat", id.w_lat);
     cmd.Parameters.AddWithValue("@w_long", id.w_long);
     cmd.Parameters.AddWithValue("@zip", id.zip);
     cmd.ExecuteReader();
     con.Close();
     return true;
     }
     catch (Exception ex)
     {
     return false;
     }
     finally
     {
     con.Close();
     }
 }
 public locationDMCS locationDMCS_update(int ID)
 {
     locationDMCS = locationDMCS.Select(ID);
     locationDMCS.locationdmcs_id = Convert.ToInt32(Update_locationdmcs_id_txt.Text);
     locationDMCS.city = Update_city_txt.Text;
     locationDMCS.county = Update_county_txt.Text;
     locationDMCS.e_lat = Convert.ToInt32(Update_e_lat_txt.Text);
     locationDMCS.e_long = Convert.ToInt32(Update_e_long_txt.Text);
     locationDMCS.location_desc = Update_location_desc_txt.Text;
     locationDMCS.n_lat = Convert.ToInt32(Update_n_lat_txt.Text);
     locationDMCS.n_long = Convert.ToInt32(Update_n_long_txt.Text);
     locationDMCS.state = Update_state_txt.Text;
     locationDMCS.type = Update_type_txt.Text;
     locationDMCS.w_lat = Convert.ToInt32(Update_w_lat_txt.Text);
     locationDMCS.w_long = Convert.ToInt32(Update_w_long_txt.Text);
     locationDMCS.zip = Convert.ToInt32(Update_zip_txt.Text);
     locationDMCS.Update(locationDMCS);
     Insert_locationDMCS_GridView.DataBind();
     Update_locationDMCS_GridView.DataBind();
     Delete_locationDMCS_GridView.DataBind();
     return locationDMCS;
 }
Example #19
0
        public locationDMCS Select(int id)
        {
            locationDMCS  locationDMCS     = new locationDMCS();
            string        ConnectionString = IDManager.connection();
            SqlConnection con = new SqlConnection(ConnectionString);

            try
            {
                con.Open();
                SqlCommand cmd = new SqlCommand("SP_DMCS_SELECT_LOCATIONDMCS", con);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@locationdmcs_id", id);
                SqlDataReader rdr = cmd.ExecuteReader();
                if (rdr.HasRows)
                {
                    rdr.Read();
                    if (!rdr.IsDBNull(0))
                    {
                        locationDMCS.locationdmcs_id = rdr.GetInt32(0);
                    }
                    else
                    {
                        locationDMCS.locationdmcs_id = 0;
                    }
                    if (!rdr.IsDBNull(1))
                    {
                        locationDMCS.city = rdr.GetString(1);
                    }
                    else
                    {
                        locationDMCS.city = " ";
                    }
                    if (!rdr.IsDBNull(2))
                    {
                        locationDMCS.county = rdr.GetString(2);
                    }
                    else
                    {
                        locationDMCS.county = " ";
                    }
                    if (!rdr.IsDBNull(3))
                    {
                        locationDMCS.e_lat = rdr.GetInt32(3);
                    }
                    else
                    {
                        locationDMCS.e_lat = 0;
                    }
                    if (!rdr.IsDBNull(4))
                    {
                        locationDMCS.e_long = rdr.GetInt32(4);
                    }
                    else
                    {
                        locationDMCS.e_long = 0;
                    }
                    if (!rdr.IsDBNull(5))
                    {
                        locationDMCS.location_desc = rdr.GetString(5);
                    }
                    else
                    {
                        locationDMCS.location_desc = " ";
                    }
                    if (!rdr.IsDBNull(6))
                    {
                        locationDMCS.n_lat = rdr.GetInt32(6);
                    }
                    else
                    {
                        locationDMCS.n_lat = 0;
                    }
                    if (!rdr.IsDBNull(7))
                    {
                        locationDMCS.n_long = rdr.GetInt32(7);
                    }
                    else
                    {
                        locationDMCS.n_long = 0;
                    }
                    if (!rdr.IsDBNull(8))
                    {
                        locationDMCS.state = rdr.GetString(8);
                    }
                    else
                    {
                        locationDMCS.state = " ";
                    }
                    if (!rdr.IsDBNull(9))
                    {
                        locationDMCS.type = rdr.GetString(9);
                    }
                    else
                    {
                        locationDMCS.type = " ";
                    }
                    if (!rdr.IsDBNull(10))
                    {
                        locationDMCS.w_lat = rdr.GetInt32(10);
                    }
                    else
                    {
                        locationDMCS.w_lat = 0;
                    }
                    if (!rdr.IsDBNull(11))
                    {
                        locationDMCS.w_long = rdr.GetInt32(11);
                    }
                    else
                    {
                        locationDMCS.w_long = 0;
                    }
                    if (!rdr.IsDBNull(12))
                    {
                        locationDMCS.zip = rdr.GetInt32(12);
                    }
                    else
                    {
                        locationDMCS.zip = 0;
                    }
                }
                else
                {
                    locationDMCS.SetColumnDefaults();
                }
            }
            catch (Exception ex)
            {
                locationDMCS.SetColumnDefaults();
                return(locationDMCS);
            }
            finally
            {
                con.Close();
            }
            return(locationDMCS);
        }
Example #20
0
 protected void UPDATE(object sender, EventArgs e)
 {
     locationDMCS = locationDMCS_update(Convert.ToInt32(Update_locationDMCS_GridView.SelectedValue));
 }