public bool InsertStk(string empresaid, tb_me_stockdiariocab BE)
        {
            using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
            {
                using (SqlCommand cmd = new SqlCommand("gspTbMeStock_INSERT_UPDATE", cnx))
                {
                    cmd.CommandTimeout = 0;
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add("@accion", SqlDbType.Char, 3).Value = BE.accion;
                    cmd.Parameters.Add("@Id_det", SqlDbType.VarChar, 200).Value =BE.almacaccionid.ToString() + BE.tipodoc.ToString() + BE.serdoc.ToString() + BE.numdoc.ToString();
                    cmd.Parameters.Add("@XMLStk", SqlDbType.Xml).Value = BE.GetItemXML();

                    try
                    {
                        cnx.Open();
                        if (cmd.ExecuteNonQuery() > 0)
                        {
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                }
            }
        }