示例#1
0
        public void Personal_Registrar(int idPersonal, string nroDocumento, string imageURL, int idUsuarioRegistro)
        {
            //dmIntranetDataContext dci = new dmIntranetDataContext(ConfigurationManager.ConnectionStrings["genesys"].ConnectionString);
            dmIntranetDataContext dci = new dmIntranetDataContext(GS.configuration.Init.GetValue(Constant.sistema, Constant.key, "genesys"));

            using (TransactionScope scope = new TransactionScope())
            {
                try
                {
                    dci.Personal_Registrar(idPersonal, nroDocumento, imageURL, idUsuarioRegistro);
                    dci.SubmitChanges();
                    scope.Complete();
                }
                catch (Exception ex)
                {
                    dci.Excepcion_Registrar(ex.Message, ex.TargetSite.Name);
                    dci.SubmitChanges();
                    throw ex;
                }
            }
        }