Marish Littu

Marish Littu

  • NA
  • 252
  • 82.5k

how to insert and update by clicking submit button using transaction scope in jqgrid

Jun 28 2012 11:35 PM

you have to write dal for create and update and then in BAL write this code

 public bool submit(yourClass objectname)
        {

            using (TransactionScope objScope = new TransactionScope())
            {
                try
                {
                    youDALClass objdalclass = new youDALClass();
                    string s = objdalclass .Create(objectname);
                    bool up = objdalclass .update(objectname);
                    objScope.Complete();
                    return true;
                }
                catch (Exception ex)
                {
                    objScope.Dispose();
                    throw ex;
                }
            }

        }


Answers (1)