Exemplo n.º 1
0
        public void UpdateCity(Vendor.BusinessLayer.CityBL argCity)
        {
            SqlConnection conn;

            conn = new SqlConnection();
            conn = BsfGlobal.OpenWorkFlowDB();
            SqlTransaction tran = conn.BeginTransaction();

            try
            {
                string sSql = "Update CityMaster set CityName= '" + argCity.CityName + "',StateId= " + argCity.StateId + "," +
                              "CountryId=" + argCity.CountryId + " Where CityID = " + argCity.CityId;
                SqlCommand Command = new SqlCommand(sSql, conn, tran);
                Command.ExecuteNonQuery();
                tran.Commit();
            }
            catch
            {
                tran.Rollback();
            }

            finally
            {
                conn.Close();
            }
        }
Exemplo n.º 2
0
        public void InsertCity(Vendor.BusinessLayer.CityBL argCity)
        {
            SqlConnection conn;

            conn = new SqlConnection();
            conn = BsfGlobal.OpenWorkFlowDB();
            SqlTransaction tran = conn.BeginTransaction();

            try
            {
                string sSql = "Insert into CityMaster(CityName,StateId,CountryID) " +
                              "Values('" + argCity.CityName + "'," + argCity.StateId + "," + argCity.CountryId + ")";
                SqlCommand Command = new SqlCommand(sSql, conn, tran);
                Command.ExecuteNonQuery();
                tran.Commit();
            }
            catch
            {
                tran.Rollback();
            }
            finally
            {
                conn.Close();
            }
        }
Exemplo n.º 3
0
 public frmCityEntry()
 {
     InitializeComponent();
     m_oCity    = new Vendor.BusinessLayer.CityBL();
     m_oCountry = new Vendor.BusinessLayer.CountryBL();
     m_oState   = new Vendor.BusinessLayer.StateBL();
 }
Exemplo n.º 4
0
 public frmCityMaster()
 {
     InitializeComponent();
     m_oCity = new Vendor.BusinessLayer.CityBL();
 }
Exemplo n.º 5
0
 public void InsertCity(Vendor.BusinessLayer.CityBL argCity)
 {
     m_oCity.InsertCity(argCity);
 }
Exemplo n.º 6
0
 public void UpdateCity(Vendor.BusinessLayer.CityBL argCity)
 {
     m_oCity.UpdateCity(argCity);
 }